Commit 37cad212 authored by lijingjing's avatar lijingjing

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

parents 67bd901b f924a9c4
package com.hand.hls.hlcm.util;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.channels.FileChannel;
public class Test4 {
public void fileChannelCopy(File s, File t) {
FileInputStream fi = null;
FileOutputStream fo = null;
FileChannel in = null;
FileChannel out = null;
try {
fi = new FileInputStream(s);
fo = new FileOutputStream(t);
in = fi.getChannel();//得到对应的文件通道
out = fo.getChannel();//得到对应的文件通道
in.transferTo(0, in.size(), out);//连接两个通道,并且从in通道读取,然后写入out通道
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
fi.close();
in.close();
fo.close();
out.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
public static void main(String[] args) {
Test4 test4=new Test4();
File s=new File("D:\\ttt\\tt3.docx");
File t=new File("D:\\ttt\\ttt4.docx");
long start,end;
start =System.currentTimeMillis();
test4.fileChannelCopy(s,t);
end =System.currentTimeMillis();
System.out.println("用时"+(end-start)+"ms");
}
}
......@@ -7,11 +7,11 @@
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="HLS_BP_MASTER_BANK_ACCOUNT_V">
<bm:fields>
<bm:field name="bank_account_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BANK_ACCOUNT_ID" prompt="HLS_BP_MASTER_BANK_ACCOUNT_V.BANK_ACCOUNT_ID"/>
<bm:field name="bank_account_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BANK_ACCOUNT_ID" prompt="HLS_BP_MASTER_BANK_ACCOUNT_V.BANK_ACCOUNT_ID" />
<bm:field name="bp_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_ID" prompt="HLS_BP_MASTER_BANK_ACCOUNT_V.BP_ID"/>
<bm:field name="bank_account_num" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BANK_ACCOUNT_NUM" prompt="HLS.BANK_ACCOUNT_NUM"/>
<bm:field name="bank_account_num" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BANK_ACCOUNT_NUM" prompt="HLS.BANK_ACCOUNT_NUM" forQuery="true" forDisplay="true"/>
<bm:field name="bank_account_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BANK_ACCOUNT_CODE" prompt="HLS.BANK_ACCOUNT_CODE"/>
<bm:field name="bank_account_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BANK_ACCOUNT_NAME" prompt="HLS.BANK_ACCOUNT_NAME"/>
<bm:field name="bank_account_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BANK_ACCOUNT_NAME" prompt="HLS.BANK_ACCOUNT_NAME" forDisplay="true" forQuery="true"/>
<bm:field name="bank_branch_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BANK_BRANCH_ID" prompt="HLS_BP_MASTER_BANK_ACCOUNT_V.BANK_BRANCH_ID"/>
<bm:field name="bank_branch_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BANK_BRANCH_NAME" prompt="HLS.BANK_BRANCH_NAME"/>
<bm:field name="bank_full_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BANK_FULL_NAME" prompt="HLS.BANK_FULL_NAME"/>
......@@ -26,6 +26,10 @@
<bm:field name="enabled_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENABLED_FLAG" prompt="HLS.ENABLED_FLAG"/>
<bm:field name="currency_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CURRENCY_NAME" prompt="HLS.CURRENCY"/>
</bm:fields>
<bm:query-fields>
<bm:query-field name="bank_account_name" queryExpression="t1.bank_account_name like &apos;%&apos;||${@bank_account_name}||&apos;%&apos;"/>
<bm:query-field name="bank_account_num" queryExpression="t1.bank_account_num like &apos;%&apos;||${@bank_account_num}||&apos;%&apos;"/>
</bm:query-fields>
<bm:features>
<f:standard-who/>
</bm:features>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: feng
$Date: 2013-9-11 下午15:13:20
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql>
<![CDATA[
select tt.bp_name,tt.bp_id ,tt.bp_code from (
select t.bp_id,
t.bp_name,
t.bp_code,
t.bp_type
from hls_bp_master t
where t.bp_category = 'TENANT'
and t.enabled_flag = 'Y'
union
select t.bp_id ,
t.bp_name ,
t.bp_code,
t.bp_type
from hls_bp_master_role d, hls_bp_master t
where d.bp_id = t.bp_id
and d.bp_category = 'TENANT'
and d.enabled_flag = 'Y')tt #WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="bp_name" fordisplay="true" forQuery="true" prompt="承租人名称"/>
<bm:field name="bp_code" fordisplay="true" forQuery="true" prompt="承租人代码"/>
<bm:field name="bp_id"/>
</bm:fields>
<bm:query-fields>
<bm:query-field field="bp_code" queryOperator="like"/>
<bm:query-field field="bp_name" queryOperator="like"/>
</bm:query-fields>
</bm:model>
......@@ -42,10 +42,10 @@
</bm:fields>
<bm:features>
<f:standard-who/>
<s:bm-script><![CDATA[
var cx = Packages.leaf.javascript.Context.getCurrentContext();
Packages.leaf.plugin.script.engine.ScriptImportor.defineExternScript(cx, this, $ctx.getData(), "aut_authority_bm_validate.js");
]]></s:bm-script>
<!--<s:bm-script><![CDATA[-->
<!--var cx = Packages.leaf.javascript.Context.getCurrentContext();-->
<!--Packages.leaf.plugin.script.engine.ScriptImportor.defineExternScript(cx, this, $ctx.getData(), "aut_authority_bm_validate.js");-->
<!--]]></s:bm-script>-->
</bm:features>
<bm:primary-key>
<bm:pk-field name="contract_id"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: feng
$Date: 2013-9-11 下午15:13:20
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql>
<![CDATA[
select v.code_value, v.code_value_name
from sys_code_values_v v
where v.code = 'CON500_CONTRACT_STATUS'
and v.code_value in ('ETING', 'INCEPT', 'TERMINATING')
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -9,10 +9,11 @@
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select rownum, v.*
select rownum, v.*
from (select c.contract_number,
c.contract_name,
c.contract_id,
c.bp_id_agent_level1,
(select hli.pattern
from con_contract_lease_item ccli, hls_lease_item hli
where ccli.lease_item_id = hli.lease_item_id
......@@ -28,6 +29,7 @@
hbm.bp_name,
to_char(cpr.apply_pay_date,'yyyy-mm-dd') apply_pay_date,
cpr.bp_bank_account_id,
cpr.vender_bank_account_id,
(select cph.payment_req_number
from csh_payment_req_hd cph
where cpr.payment_req_id = cph.payment_req_id) payment_req_number,
......@@ -53,9 +55,10 @@
and c.source_doc_id = cpr.payment_req_id
and c.transaction_type = 'PAYMENT') bank_slip_num,*/
(select bp_name
from hls_bp_master hbm
where hbm.bp_id = cpr.bp_id) BP_ID_AGENT_N,
(select h.bank_account_name
FROM hls_bp_master_bank_account h
WHERE
h.bank_account_id = cpr.bp_bank_account_id) BP_ID_AGENT_N,
(select hbm.bank_account_num
from hls_bp_master_bank_account hbm
......@@ -74,22 +77,19 @@
--未付金额
(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 =
(select bp_id
from hls_bp_master_bank_account t
where t.bank_account_id = cpr.vender_bank_account_id)) vender_name,
(select hbm.bank_account_name
from hls_bp_master_bank_account hbm
where hbm.bank_account_id = cpr.vender_bank_account_id) VENDER_BANK_ACCOUNT_ID,
where hbm.bank_account_id = cpr.vender_bank_account_id
) vender_name,
(select hbm.bank_account_num
from hls_bp_master_bank_account hbm
where hbm.bank_account_id = cpr.vender_bank_account_id) VENDER_BANK_ACCOUNT_number,
where hbm.bank_account_id = cpr.vender_bank_account_id) vender_bank_account_number,
(select hbm.bank_account_num
from hls_bp_master_bank_account hbm
where hbm.bank_account_id = cpr.vender_bank_account_id) vender_bank_account_number_n,
(select hbm.bank_account_name
from hls_bp_master_bank_account hbm
where hbm.bank_account_id = cpr.vender_bank_account_id) vender_bank_account_name,
cpr.amount,
--首付款抵充金额
(select nvl(hd.other_payment2, 0)
......
......@@ -14,12 +14,12 @@
(select v.code_value_name
from sys_code_values_v v
where v.code = 'CON_WRITE_OFF_FLAG'
and v.code_value = t1.cf_61_write_off_flag) cf_61_write_off_flag_n,
(select v.code_value_name
and v.code_value = t1.cf_61_write_off_flag) cf_61_write_off_flag_n
/* (select v.code_value_name
from sys_code_values_v v
where v.code = 'VENDER_NAME'
and v.code_value = t1.vender_name) vender_name_n
FROM (SELECT hli.vender_name,
and v.code_value = t1.vender_name) vender_name_n*/
FROM (SELECT
t.contract_id,
t.contract_name,
f.cashflow_id,
......@@ -36,6 +36,17 @@
h.description cf_item_desc,
h.cf_item,
f.due_amount,
--开票状态
f.billing_status,
(SELECT code_value_name
FROM sys_code_values_v scv
WHERE scv.code = 'CON_BILLING_STATUS'
AND code_value= f.billing_status
AND scv.code_value_enabled_flag = 'Y'
AND scv.code_enabled_flag = 'Y') billing_status_n,
--发票状态
acp_invoice_pkg.return_invoice_status(p_contract_id=>t.contract_id) invoice_status_n,
t.currency,
/* (SELECT dbms_lob.substr(wmsys.wm_concat(ci.serial_number))
FROM con_contract_lease_item ci
......@@ -146,8 +157,10 @@
--add by shen
(select bp_name
from hls_bp_master
where hls_bp_master.bp_id = t.bp_id_agent_level1) bp_id_agent_n
where hls_bp_master.bp_id = t.bp_id_agent_level1) bp_id_agent_n,
--查找厂商
(SELECT bp_name FROM hls_bp_master h WHERE h.bp_id=hli.vender_id) vender_name_n,
hli.vender_name
FROM con_contract_cashflow f,
hls_cashflow_item h,
con_contract_lease_item i,
......@@ -195,10 +208,18 @@
),
0)) > 0
AND t.data_class = 'NORMAL'
AND t.contract_status NOT IN
('NEW', 'SIGN', 'CANCEL', 'PENDING', 'CLOSED')
AND t.bp_id_agent_level1 IN (
select h.bp_id
from exp_emp_assign_e_v ee, hls_bp_master h
where ee.user_id = ${/session/@user_id}
and ee.unit_id = h.unit_id
and h.bp_category = 'AGENT'
)
AND t.contract_status IN
('INCEPT')
and t.sign_contract_status in ('SIGN')
--测试用,cf_itme应当为0
AND f.cf_item in (0,21)) t1
AND f.cf_item in (0)) t1
#WHERE_CLAUSE#
#ORDER_BY_CLAUSE#
......@@ -244,7 +265,7 @@
<bm:field name="con_business_type_n"/>
<bm:field name="cdd_list_id"/>
<bm:field name="bp_id_agent_n"/>
<bm:field name="vender_name"/>
<!-- <bm:field name="vender_name"/>-->
<bm:field name="vender_name_n"/>
<bm:field name="division"/>
<bm:field name="division_n"/>
......@@ -263,13 +284,21 @@
<bm:field name="agent_extra_nam"/>
<bm:field name="cf_61_write_off_flag"/>
<bm:field name="cf_61_write_off_flag_n"/>
<bm:field name="billing_status_n"/>
<bm:field name="invoice_status_n"/>
<!-- <bm:field name="bp_bank_account_id"/>-->
<!-- <bm:field name="vender_bank_account_id"/>-->
<!-- <bm:field name="vender_name"/>-->
<!-- <bm:field name="VENDER_BANK_ACCOUNT_NUMBER"/>-->
<!-- <bm:field name="bp_bank_account_name"/>-->
<!-- <bm:field name="bp_bank_account_num"/>-->
</bm:fields>
<bm:features>
<s:bm-script><![CDATA[
var cx = Packages.leaf.javascript.Context.getCurrentContext();
Packages.leaf.plugin.script.engine.ScriptImportor.defineExternScript(cx, this, $ctx.getData(), "aut_authority_bm_validate.js");
]]></s:bm-script>
</bm:features>
<!-- <bm:features>-->
<!-- <s:bm-script><![CDATA[-->
<!-- var cx = Packages.leaf.javascript.Context.getCurrentContext();-->
<!-- Packages.leaf.plugin.script.engine.ScriptImportor.defineExternScript(cx, this, $ctx.getData(), "aut_authority_bm_validate.js");-->
<!-- ]]></s:bm-script>-->
<!-- </bm:features>-->
<!--只查找该代理店-->
<bm:data-filters>
<!-- <bm:data-filter name="enabled_flag" enforceOperations="query" expression="(t1.enabled_flag=&apos;Y&apos;)"/>-->
......
......@@ -5,11 +5,13 @@
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" baseTable="csh_payment_req_hd">
<bm:model xmlns:s="leaf.plugin.script" xmlns:bm="http://www.leaf-framework.org/schema/bm" baseTable="csh_payment_req_hd">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT *
SELECT v.*
FROM( SELECT t.*
FROM (SELECT h.payment_req_number,
h.document_type,
--应付金额
......@@ -159,7 +161,17 @@
(SELECT company_id
FROM fnd_companies
START WITH company_id = 1
CONNECT BY prior company_id = parent_biz_company_id)) v
CONNECT BY prior company_id = parent_biz_company_id)
) t
WHERE t.bp_id_agent_n IN (
select h.bp_name
from exp_emp_assign_e_v ee, hls_bp_master h
where ee.user_id = ${/session/@user_id}
and ee.unit_id = h.unit_id
and h.bp_category = 'AGENT'
)
)v
#WHERE_CLAUSE#
ORDER BY v.req_date DESC, v.payment_req_number DESC
]]></bm:query-sql>
......@@ -175,6 +187,7 @@
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="payment_req_number" queryExpression="v.payment_req_number like &apos;%&apos; || ${@payment_req_number} || &apos;%&apos;"/>
<bm:query-field name="bp_id_tenant_n" queryExpression="v.bp_id_tenant_n like ${@bp_id_tenant_n}"/>
<bm:query-field name="print_flag" queryExpression="nvl(v.print_flag,&apos;N&apos;) = ${@print_flag}"/>
<bm:query-field name="employee_name" queryExpression="v.user_name like &apos;%&apos; || ${@employee_name} || &apos;%&apos;"/>
......@@ -197,4 +210,10 @@
<bm:query-field name="payment_req_number" queryExpression="v.payment_req_number like &apos;%&apos;||upper(${@payment_req_number})||&apos;%&apos;"/>
<bm:query-field name="user_name" queryExpression="v.user_name like ${@user_name}"/>
</bm:query-fields>
<bm:features>
<s:bm-script><![CDATA[
var cx = Packages.leaf.javascript.Context.getCurrentContext();
Packages.leaf.plugin.script.engine.ScriptImportor.defineExternScript(cx, this, $ctx.getData(), "aut_authority_bm_validate.js");
]]></s:bm-script>
</bm:features>
</bm:model>
......@@ -5,7 +5,7 @@
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:s="leaf.plugin.script">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
......@@ -58,11 +58,17 @@
--AND
--cc.cf_item = '52'
)) v #WHERE_CLAUSE#
ORDER BY transaction_date DESC, transaction_num
ORDER BY transaction_date DESC, transaction_num
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:features>
<s:bm-script><![CDATA[
var cx = Packages.leaf.javascript.Context.getCurrentContext();
Packages.leaf.plugin.script.engine.ScriptImportor.defineExternScript(cx, this, $ctx.getData(), "aut_authority_bm_validate.js");
]]></s:bm-script>
</bm:features>
<bm:query-fields>
<bm:query-field name="payment_req_number_from" datatype="java.lang.String" queryExpression="v.payment_req_number&gt;=${@payment_req_number_from}"/>
<bm:query-field name="payment_req_number_to" datatype="java.lang.String" queryExpression="v.payment_req_number&lt;=${@payment_req_number_to}"/>
......@@ -73,8 +79,10 @@
<bm:query-field name="transaction_amount_from" datatype="java.lang.String" queryExpression="v.transaction_amount&gt;=${@transaction_amount_from}"/>
<bm:query-field name="transaction_amount_to" datatype="java.lang.String" queryExpression="v.transaction_amount&lt;=${@transaction_amount_to}"/>
<bm:query-field name="bank_account_code_from" datatype="java.lang.String" queryexpression="v.bank_account_code &gt;= ${@bank_account_code_from}"/>
<bm:query-field name="bank_account_num" queryexpression="v.bank_account_num like &apos;%&apos; || ${@bank_account_num} || &apos;%&apos;"/>
<bm:query-field name="bank_account_code_to" datatype="java.lang.String" queryexpression="v.bank_account_code &lt;= ${@bank_account_code_to}"/>
<bm:query-field name="currency_code" datatype="java.lang.String" queryexpression="v.currency_code = ${@currency_code}"/>
<bm:query-field name="bp_id" datatype="java.lang.String" queryexpression="v.bp_id = ${@bp_id}"/>
<bm:query-field name="bp_name" datatype="java.lang.String" queryexpression="v.bp_name = ${@bp_name}"/>
</bm:query-fields>
</bm:model>
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -135,19 +135,21 @@
<a:dataSets>
<a:dataSet id="receivedAmountDs" autoQuery="true" model="cont.CON560.con_contract_received_amount"/>
<a:dataSet id="unreceivedAmountDs" autoQuery="true" model="cont.CON560.con_contract_unreceived_amount"/>
<a:dataSet id="con560_contract_status_ds" lookupCode="CON500_CONTRACT_STATUS"/>
<a:dataSet id="con560_contract_status_ds" autoQuery="true" model="cont.CON560.con_contract_status"/>
<a:dataSet id="con560_lease_organization_name_ds" loadData="true"
model="basic.hls_lease_organization_for_lov"/>
<a:dataSet id="con560_contract_query_ds" autoCreate="true">
<a:fields>
<a:field name="bp_name" autoComplete="true" lovGridHeight="350" lovHeight="500" lovLabelWidth="100"
lovService="cont.CON541.hls_bp_master_v_for_lov?bp_category=TENANT" lovWidth="520"
<a:field name="bp_name" lovGridHeight="350" lovHeight="500" lovLabelWidth="100"
lovService="cont.CON541.hls_bp_masster_for_lov" lovWidth="520"
title="HLS.BP_TITLE">
<a:mapping>
<a:map from="bp_name" to="bp_name"/>
<a:map from="bp_code" to="bp_code"/>
<a:map from="bp_id" to="bp_id_tenant"/>
</a:mapping>
</a:field>
<a:field name="bp_id_tenant"/>
<!-- <a:field name="contract_number" autoComplete="true" lovGridHeight="300" lovHeight="450" lovService="cont.CON531.con_contract_lov" lovWidth="500" title="HLS.CONTRACT_NUMBER">
<a:mapping>
<a:map from="contract_number" to="contract_number"/>
......@@ -206,7 +208,7 @@
renderer="con560_render_contractMaintainDs_grid" width="150"/>
<a:column name="bp_name" prompt="HLS.TENANT_NAME" width="240"/>
<a:column name="inception_of_lease" prompt="起租日期" renderer="Leaf.formatDate" width="100"/>
<a:column name="lease_end_date" prompt="合同预计结束日期" renderer="Leaf.formatDate" width="140"/>
<!-- <a:column name="lease_end_date" prompt="合同预计结束日期" renderer="Leaf.formatDate" width="140"/>-->
<a:column name="is_terminate" prompt="租金是否结清" width="100"/>
<a:column name="residual_value" align="right" prompt="留购价" renderer="Leaf.formatMoney" width="50"/>
<!--<a:column name="signing_user_id_n" prompt="签约人" width="100"/>-->
......
......@@ -135,7 +135,7 @@
<a:dataSets>
<a:dataSet id="receivedAmountDs" autoQuery="true" model="cont.CON560.con_contract_received_amount"/>
<a:dataSet id="unreceivedAmountDs" autoQuery="true" model="cont.CON560.con_contract_unreceived_amount"/>
<a:dataSet id="con560_contract_status_ds" lookupCode="CON500_CONTRACT_STATUS"/>
<a:dataSet id="con560_contract_status_ds" autoQuery="true" model="cont.CON560.con_contract_status"/>
<a:dataSet id="con560_lease_organization_name_ds" loadData="true"
model="basic.hls_lease_organization_for_lov"/>
<a:dataSet id="con560_contract_query_ds" autoCreate="true">
......
......@@ -223,7 +223,21 @@
}
}
};
window['${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function(ds, qpara, bp_seq) {
// var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
// var ds_id = '${/parameter/@layout_code}_G_CSH_REQ_1_csh_payment_req_hd_ds';
// var ds_id_2= '${/parameter/@layout_code}_G_CSH_REQ_2_csh_payment_req_hd_ds';
//
// if (ds.id == ds_id) {
aut_authority_list_validate_query(ds, qpara);
// }
// if (ds.id == ds_id_2) {
// aut_authority_list_validate_query(ds, qpara);
// }
};
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<a:screen-include screen="modules/cont/CON500/con_contract_authority_list_validate.lview?document_category=PAYMENT_REQ&amp;function_code=CSH501"/>
</a:view>
</a:screen>
......@@ -734,6 +734,8 @@
var amount_agent=line_data.get('amount_agent');
var amount_vender= line_data.get('amount_vender');
var due_amount= line_data.get('due_amount');
var bp_bank_account_id=line_data.get('bp_bank_account_id');
var vender_bank_account_id=line_data.get('vender_bank_account_id');
//首付款抵充金额
var other_payment2=line_data.get('other_payment2');
if(amount_agent<0||amount_vender<0){
......@@ -741,6 +743,19 @@
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
//根据金额判断代理店和厂商不能为空
if(amount_agent>0 &&!bp_bank_account_id){
$L.showErrorMessage("提示",'请选择代理店账号信息!');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
if(amount_vender>0 &&!vender_bank_account_id){
$L.showErrorMessage("提示",'请选择厂商账号信息!');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
if(plus(plus(amount_agent,amount_vender),other_payment2)!=due_amount){
$L.showErrorMessage("提示",'应付我司金额,委托付款金额和首付款抵充金额之后应等于应付金额!');
......@@ -773,8 +788,8 @@
//确认保存
var hd_record = $(ds_id).getCurrentRecord();
var payment_req_id = hd_record.get('payment_req_id');
//console.log( $(ds_id));
// console.log( $(ds_line_id));
if (payment_req_id) {
Leaf.request({
......
......@@ -39,15 +39,22 @@
return;
}
//对是否为同一个厂商进行检查
var vender_name=record.get('vender_name');
var vender_name=record.get('vender_name_n');
var vender_flag=true;
//校验发票状态必须是全部开票且发票已确认
for (i = 0; i < a.length; i++) {
//检验厂商
if(a[i].get('vender_name')!=vender_name){
if(a[i].get('vender_name_n')!=vender_name){
vender_flag=false;
$L.showErrorMessage("提示",'请选择厂商相同的现金流信息!');
return;
}
//暂时去掉
/* if(a[i].get('billing_status_n')!='FULL' ||a[i].get('billing_status_n')!='发票已确认'){
$L.showErrorMessage("提示",'请选择开票状态为已开票,发票状态为已确认的现金流!');
return;
}*/
cashflow_id = a[i].get('cashflow_id');
var arr = {};
contract_id_list[i] = a[i].get('contract_id');
......@@ -193,7 +200,7 @@
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<a:screen-include screen="modules/cont/CON500/con_contract_authority_list_validate.lview?document_category=CONTRACT&amp;function_code=CSH501"/>
<!-- <a:screen-include screen="modules/cont/CON500/con_contract_authority_list_validate.lview?document_category=CONTRACT&amp;function_code=CSH501"/>-->
<a:dataSets>
<a:dataSet id="vender_name_ds" lookupCode="VENDER_NAME"/>
<a:dataSet id="yes_no_ds" lookupCode="YES_NO"/>
......@@ -371,6 +378,8 @@
<a:column name="due_date" prompt="应付日期"/>
<a:column name="bp_id_agent_n" prompt="代理店"/>
<a:column name="vender_name_n" prompt="厂商"/>
<a:column name="billing_status_n" prompt="开票状态"/>
<a:column name="invoice_status_n" prompt="发票状态"/>
<!-- <a:column name="received_amount" align="right" prompt="实际支付金额" renderer="Leaf.formatMoney"/>
<a:column name="residual_amount" align="right" prompt="剩余未支付金额" renderer="Leaf.formatMoney" width="110"/>
<a:column name="invoice_uploaded_flag_n" align="center" prompt="发票上传标志"/>
......
......@@ -111,7 +111,6 @@
param['merge_flag'] = 'N';
param['bp_category'] =identify_category;
param['details'] = saveData;
Leaf.showConfirm('${l:PROMPT_MESSAGE}', '确定提交?', function okFun() {
Leaf.request({
url: $('csh_payment_req_pay_link_id').getUrl(),
......@@ -688,7 +687,7 @@
<a:field name="zero_amounts_allowed" defaultValue="N"/>
<a:field name="currency_code" defaultValue="CNY"/>
<a:field name="currency_name" defaultValue="人民币"/>
<a:field name="bank_account_id" defaultValue="1531"/>
<a:field name="bank_account_id"/>
<a:field name="bank_account_name"/>
<a:field name="bank_account_num" autoComplete="true" autoCompleteField="bank_account_num" lovGridHeight="350" lovHeight="550" lovLabelWidth="90" lovService="csh.CSH101.csh_bank_account_lov" lovWidth="850" required="true" title="CSH511.BANK_ACCOUNT_CODE">
<a:mapping>
......@@ -696,6 +695,7 @@
<a:map from="zero_amounts_allowed" to="zero_amounts_allowed"/>
<a:map from="bank_account_id" to="bank_account_id"/>
<a:map from="bank_account_num" to="bank_account_num"/>
<a:map from="bank_account_id" to="bank_account_id"/>
<a:map from="bank_account_name" to="bank_account_name"/>
<a:map from="bank_account_code" to="bank_account_code"/>
<a:map from="currency_code" to="currency_code"/>
......
......@@ -8,6 +8,7 @@
<a:screen xmlns:a="http://www.leaf-framework.org/application">
<a:init-procedure/>
<a:view>
<a:screen-include screen="modules/cont/CON500/con_contract_authority_list_validate.lview?document_category=CONTRACT&amp;function_code=CSH502"/>
<a:link id="payment_req_post_link" url="${/request/@context_path}/modules/csh/CSH502/payment_seq_insert_tmp.lsc"/>
<a:link id="payment_req_excel_link" url="${/request/@context_path}/modules/csh/CSH502/payment_seq_excel_sheets.lsc"/>
<a:link id="payment_req_excel_cib_link" url="${/request/@context_path}/modules/csh/CSH502/payment_seq_excel_sheets_cib.lsc"/>
......
......@@ -173,18 +173,19 @@
</a:dataSet>
<a:dataSet id="csh_payment_reverse_query_ds">
<a:fields>
<a:field name="bp_code" lovGridHeight="350" lovHeight="500" lovService="basic.hls_bp_master_v_for_lov" lovWidth="500">
<a:field name="bp_name" lovGridHeight="350" lovHeight="550" lovService="basic.hls_bp_master_bank_account_v" lovWidth="580">
<a:mapping>
<a:map from="bp_code" to="bp_code"/>
<a:map from="bp_name" to="bp_name"/>
<a:map from="bp_id" to="bp_id"/>
<!-- <a:map from="bp_code" to="bp_code"/>-->
<a:map from="bank_account_name" to="bp_name"/>
<!-- <a:map from="bp_id" to="bp_id"/>-->
</a:mapping>
</a:field>
<a:field name="transaction_date_from" validator="dateValidator"/>
<a:field name="transaction_date_to" validator="dateValidator"/>
<a:field name="bank_account_code_from" autoCompleteField="bank_account_num" lovGridHeight="350" lovHeight="550" lovLabelWidth="90" lovService="csh.CSH101.csh_bank_account_lov" lovWidth="580" title="CSH511.BANK_ACCOUNT_CODE">
<a:field name="bank_account_num" lovGridHeight="350" lovHeight="550" lovLabelWidth="90" lovService="csh.CSH101.csh_bank_account_lov" lovWidth="580" title="CSH511.BANK_ACCOUNT_CODE">
<a:mapping>
<a:map from="bank_account_code" to="bank_account_code_from"/>
<a:map from="bank_account_name" to="bank_account_name"/>
<a:map from="bank_account_num" to="bank_account_num"/>
</a:mapping>
</a:field>
<a:field name="bank_account_from_id"/>
......@@ -230,9 +231,9 @@
<a:textField name="payment_req_number_to" bindTarget="csh_payment_reverse_query_ds" prompt="CSH502.CSH_PAYMENT_REQ_HD.PAYMENT_REQ_NUMBER_TO" width="150"/>
<a:numberField name="transaction_amount_from" allowDecimals="true" allowFormat="true" allowNegative="false" bindTarget="csh_payment_reverse_query_ds" prompt="CSH502.CSH_PAYMENT_AMOUNT_FROM" width="150"/>
<a:numberField name="transaction_amount_to" allowDecimals="true" allowFormat="true" allowNegative="false" bindTarget="csh_payment_reverse_query_ds" prompt="CSH502.CSH_PAYMENT_AMOUNT_TO" width="150"/>
<a:lov name="bank_account_code_from" bindTarget="csh_payment_reverse_query_ds" prompt="CSH502.BANK_ACCOUNT_CODE_FROM" width="150"/>
<a:lov name="bank_account_code_to" bindTarget="csh_payment_reverse_query_ds" prompt="CSH502.BANK_ACCOUNT_CODE_TO" width="150"/>
<a:lov name="bp_code" bindTarget="csh_payment_reverse_query_ds" prompt="CSH502.CSH_PAYMENT_OBJ" width="150"><![CDATA[
<a:lov name="bank_account_num" bindTarget="csh_payment_reverse_query_ds" prompt="付款账号" width="150"/>
<!-- <a:lov name="bank_account_code_to" bindTarget="csh_payment_reverse_query_ds" prompt="CSH502.BANK_ACCOUNT_CODE_TO" width="150"/>-->
<a:lov name="bp_name" bindTarget="csh_payment_reverse_query_ds" prompt="CSH502.CSH_PAYMENT_OBJ" width="150"><![CDATA[
]]></a:lov>
<a:comboBox name="currency_name_display" bindTarget="csh_payment_reverse_query_ds" prompt="HLS.CURRENCY"/>
</a:form>
......
......@@ -84,7 +84,7 @@
<!-- <a:column name="bank_account_num" prompt="CSH511.BANK_ACCOUNT_NUM"/> -->
<a:column name="bp_name" prompt="HLS.BP_NAME" align="center"/>
<a:column name="bp_category_display" prompt="CSH511.CSH_TRANSACTION.BP_CATEGORY" align="center"/>
<a:column name="bank_slip_num" prompt="CSH511.CSH_TRANSACTION.BANK_SLIP_NUM" align="center"/>
<a:column name="bank_slip_num" prompt="银行流水号" align="center"/>
<a:column name="user_desc" prompt="HLS.DOCUMENT_CREATED_BY" align="center"/>
<a:column align="center" prompt="附件查看" renderer="csh515_attachment_download" width="80"/>
</a:columns>
......
......@@ -7,6 +7,9 @@
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true"
trace="true">
<a:init-procedure>
<a:model-query fetchAll="true" model="prj.PRJ500D.user_agent_description" rootPath="user_agent_description"/>
</a:init-procedure>
<a:view>
<a:link id="get_special_fields_link_id" model="cont.CON500.con_contract_get_special_fields"
modelaction="update"/>
......@@ -25,6 +28,9 @@
<!-- <a:link id="identity_query_link" model="interface.CCX_INTERFACE.identity_query" modelaction="update"/>-->
<script type="text/javascript"><![CDATA[
Leaf.onReady(function () {
var agent_name = '${/model/user_agent_description/record/@bp_id}';
var agent_name_n = '${/model/user_agent_description/record/@bp_name}';
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role');
var bp_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
......@@ -33,6 +39,9 @@
var bp_record = $(bp_ds_id).getCurrentRecord();
bp_record.set('bp_category','${/parameter/@bp_category}');
bp_record.set('owner_user_id','${/session/@user_id}');
bp_record.set('agent_name', agent_name);
bp_record.set('agent_name_n', agent_name_n);
if ('${/parameter/@bp_type}' == 'AGENT') {
bp_record.getField('agent_type_n').setReadOnly(false);
// bp_record.getField('agent_type_n').setRequired(true);
......@@ -73,7 +82,9 @@
bp_record.getField('brand_unbrand_n').setReadOnly(true);
current_record.getField('bp_type_n').setReadOnly(true);
current_record.getField('enabled_flag').setReadOnly(true);
} else {
}else if(head_record.get('bp_category') == 'VENDER'){
bp_record.getField('agent_name_n').setReadOnly(true);
}else {
current_record.getField('bp_type_n').setReadOnly(true);
current_record.getField('enabled_flag').setReadOnly(true);
}
......@@ -354,7 +365,7 @@
}
//保存前调用,生成商机编号
window['${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function (ds, record) {debugger;
window['${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function (ds, record) {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
var head_record = $(ds_id).getCurrentRecord();
var bp_class = head_record.get('bp_class');
......@@ -515,7 +526,7 @@
scope: this
});
}; */
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) {debugger;
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) {
var f_bp_create_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
var gird_ds_id = 'BP_NP_CREATE_BP_ASSETS01_hls_bp_assets_ds';
var gird_ds_id2 = 'BP_NP_CREATE_BP_ASSETS04_hls_bp_assets_ds';
......
......@@ -6,6 +6,9 @@
$Purpose: 商业伙伴维护
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true">
<a:init-procedure>
<a:model-query fetchAll="true" model="prj.PRJ500D.user_agent_description" rootPath="user_agent_description"/>
</a:init-procedure>
<a:view>
<a:link id="bank_account_num_link" model="hls.HLS214.hls_bp_bank_account_num" modelaction="update"/>
<a:link id="bp_agent_modify_link" url="${/request/@context_path}/modules/hls/HLS303/bp_agent_create.lview"/>
......@@ -218,16 +221,20 @@
//新增和加载时调用form
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function(ds, record, config_records, bp_seq) {
if ((ds.id).indexOf('hls_bp_master_credit') != -1 && (ds.id).indexOf('F_ORG_CREDIT') != -1) {
// if ((ds.id).indexOf('hls_bp_master_credit') != -1 && (ds.id).indexOf('F_ORG_CREDIT') != -1) {
// if (ds.fields.fin_institution_code) {
// ds.fields.fin_institution_code.pro.validator = fin_institution_code_validate;
// }
// if (ds.fields.trade_type_code) {
// ds.fields.trade_type_code.pro.validator = trade_type_code_validate;
// }
// }
// }
if ((ds.id).indexOf('hls_bp_master') != -1 && (ds.id).indexOf('F_BASIC') != -1) {
if (record.get('bp_category') == 'VENDER') {
record.getField('agent_name_n').setReadOnly(true);
}
}
};
......@@ -299,6 +306,12 @@
var hls_bp_master_credit_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_credit');
var bp_record = $(hls_bp_master_ds_id).getCurrentRecord();
if ((ds.id).indexOf('hls_bp_master') != -1 && (ds.id).indexOf('F_BASIC') != -1) {
var agent_name = '${/model/user_agent_description/record/@bp_id}';
var agent_name_n = '${/model/user_agent_description/record/@bp_name}';
record.set('agent_name', agent_name);
record.set('agent_name_n', agent_name_n);
if (name == 'agent_type') {
if (value == 'AGENT_NO_REBATE' || value == 'AGENT_EE') {
record.getField('parent_id_n').setReadOnly(false);
......
......@@ -338,6 +338,13 @@
return '<font color="RED">' + value + '</font>';
}
return value;
}else if(name == 'atm_attachment') {
link_function = 'upload_file';
if (record.get('attach_count') == 0 || !record.get('attach_count')) {
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + '附件上传' + '</a>';
} else {
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '(' + record.get('attach_count') + ')' + '</a>';
}
}
};
......@@ -435,26 +442,14 @@
};
//更新时调用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function(ds, record, name, value, old_value, bp_seq) {
//新增时调用(grid,table,gridBox)
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_add'] = function(ds, record, config_records, bp_seq) {
var role_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role');
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
if (ds_id == ds.id) {
if (record.get('taxpayer_type') == 'Y') {
record.getField('tax_registry_num').setRequired(true);
record.getField('invoice_bp_address').setRequired(true);
record.getField('invoice_title').setRequired(true);
record.getField('invoice_bp_phone_num').setRequired(true);
record.getField('invoice_bp_bank').setRequired(true);
record.getField('invoice_bp_bank_account_id').setRequired(true);
} else {
record.getField('tax_registry_num').setRequired(false);
record.getField('invoice_bp_address').setRequired(false);
record.getField('invoice_title').setRequired(false);
record.getField('invoice_bp_phone_num').setRequired(false);
record.getField('invoice_bp_bank').setRequired(false);
record.getField('invoice_bp_bank_account_id').setRequired(false);
}
}
var bp_record = $(ds_id).getCurrentRecord();
var bp_name = bp_record.get('bp_name');
// alert(bp_name);
record.set('bp_name',bp_name);
};
......
......@@ -74,23 +74,23 @@
//更新时调用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function(ds, record, name, value, old_value, bp_seq) {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
if (ds_id == ds.id) {
if (record.get('taxpayer_type') == 'Y') {
record.getField('tax_registry_num').setRequired(true);
record.getField('invoice_bp_address').setRequired(true);
record.getField('invoice_title').setRequired(true);
record.getField('invoice_bp_phone_num').setRequired(true);
record.getField('invoice_bp_bank').setRequired(true);
record.getField('invoice_bp_bank_account_id').setRequired(true);
} else {
record.getField('tax_registry_num').setRequired(false);
record.getField('invoice_bp_address').setRequired(false);
record.getField('invoice_title').setRequired(false);
record.getField('invoice_bp_phone_num').setRequired(false);
record.getField('invoice_bp_bank').setRequired(false);
record.getField('invoice_bp_bank_account_id').setRequired(false);
}
}
// if (ds_id == ds.id) {
// if (record.get('taxpayer_type') == 'Y') {
// record.getField('tax_registry_num').setRequired(true);
// record.getField('invoice_bp_address').setRequired(true);
// record.getField('invoice_title').setRequired(true);
// record.getField('invoice_bp_phone_num').setRequired(true);
// record.getField('invoice_bp_bank').setRequired(true);
// record.getField('invoice_bp_bank_account_id').setRequired(true);
// } else {
// record.getField('tax_registry_num').setRequired(false);
// record.getField('invoice_bp_address').setRequired(false);
// record.getField('invoice_title').setRequired(false);
// record.getField('invoice_bp_phone_num').setRequired(false);
// record.getField('invoice_bp_bank').setRequired(false);
// record.getField('invoice_bp_bank_account_id').setRequired(false);
// }
// }
var role_ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_role');
if (role_ds == ds.id) {
......@@ -111,7 +111,20 @@
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function(ds, record) {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var agent_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_agent_division');
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
var record_agent =$(agent_id).getAll();
//增加三位字母大写的校验
var head_record = $(ds_id).getCurrentRecord();
var english_name= head_record.get('english_name');
var patrn = /^[A-Z]{3}$/;
//对统一社会信用代码和身份生进行校验
if(patrn.test(english_name)==false){
$L.showErrorMessage('错误','代理店代码为三位大写字母!',null,null);
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
if(record_agent.length == 0){
Leaf.showMessage('${l:PROMPT}', '必须维护租赁物信息且每种租赁物只能维护一次!');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
......
......@@ -229,6 +229,9 @@
while (e && e.getCause && e.getCause()) e = e.getCause();
var error_code = e.getErrorCode();
if (error_code == 1) {
if(base_table.toUpperCase()=='HLS_LEASE_ITEM'){
raise_app_error('机种代码和型号不能重复!');
}else
raise_app_error('HLS_TABLE_UNIQUE.' + base_table.toUpperCase());
}
if (parent_error_code) {
......
......@@ -46,27 +46,27 @@
var isLoaded = 'N';
// set单元格颜色 load事件无法实现效果
//hongquan.dai 20180125
var check_isload = setInterval(function() {
if (isLoaded == 'N') {
// var ids = $('${/parameter/@layout_code}_ACY_prj_cdd_item_doc_ref_ds');
var ids = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_cdd_item_doc_ref');
var idsRecord = $(ids).getAll();
for (var i = 0;i < idsRecord.length;i++) {
var rowData = idsRecord[i];
var important_flag = rowData.get('important_flag');
//important_flag 是否必须上传
if (important_flag == 'Y') {
//普通动态布局 布局代码+组件名+基表名+_layout_grid_id-u-
//支撑文件 布局代码+组件名+基表名+_grid_id-u-
//tr_id = '#${/parameter/@layout_code}_ACY_prj_cdd_item_doc_ref_layout_grid_id-u-' + rowData.id;
tr_id = '#${/parameter/@layout_code}_ACY_con_contract_grid_id-u-' + rowData.id;
jQuery(tr_id).addClass('redBG');
}
}
} else {
clearInterval(check_isload);
}
}, 1000);
// var check_isload = setInterval(function() {
// if (isLoaded == 'N') {
// // var ids = $('${/parameter/@layout_code}_ACY_prj_cdd_item_doc_ref_ds');
// var ids = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_cdd_item_doc_ref');
// var idsRecord = $(ids).getAll();
// for (var i = 0;i < idsRecord.length;i++) {
// var rowData = idsRecord[i];
// var important_flag = rowData.get('important_flag');
// //important_flag 是否必须上传
// if (important_flag == 'Y') {
// //普通动态布局 布局代码+组件名+基表名+_layout_grid_id-u-
// //支撑文件 布局代码+组件名+基表名+_grid_id-u-
// //tr_id = '#${/parameter/@layout_code}_ACY_prj_cdd_item_doc_ref_layout_grid_id-u-' + rowData.id;
// tr_id = '#${/parameter/@layout_code}_ACY_con_contract_grid_id-u-' + rowData.id;
// jQuery(tr_id).addClass('redBG');
// }
// }
// } else {
// clearInterval(check_isload);
// }
// }, 1000);
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
new Leaf.Window({
id: 'contract_history_window',
......@@ -659,57 +659,57 @@
};
Leaf.onReady(function() {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var head_record = $(ds_id).getAt(0);
head_record.set('owner_user_id', '${/model/user_name_path/record/@user_id}');
head_record.set('owner_user_id_n', '${/model/user_name_path/record/@user_id_n}');
head_record.set('owner_user_tel', '${/model/user_name_path/record/@phone}');
Leaf.request({
url: $('get_car_organization_id').getUrl(),
para: {
unit_id: head_record.get('unit_id')
},
success: function(data) {
if (data.result.record && !data.result.record.length) {
head_record.set('organization_id', data.result.record.organization_id);
head_record.set('organization_id_n', data.result.record.organization_name);
} else {
//没有找到值置空
head_record.set('organization_id', '');
head_record.set('organization_id_n', '');
}
},
failure: function() {
},
error: function() {
},
scope: this
});
//公司带出区域
Leaf.request({
url: $('get_company_distrct_link').getUrl(),
para: {
company_id: head_record.get('company_id')
},
success: function(data) {
if (data.result.record && !data.result.record.length) {
head_record.set('district', data.result.record.district);
head_record.set('district_n', data.result.record.district_n);
}
},
failure: function() {
},
error: function() {
},
scope: this
});
});
// Leaf.onReady(function() {
// var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
// var head_record = $(ds_id).getAt(0);
// head_record.set('owner_user_id', '${/model/user_name_path/record/@user_id}');
// head_record.set('owner_user_id_n', '${/model/user_name_path/record/@user_id_n}');
// head_record.set('owner_user_tel', '${/model/user_name_path/record/@phone}');
// Leaf.request({
// url: $('get_car_organization_id').getUrl(),
// para: {
// unit_id: head_record.get('unit_id')
// },
// success: function(data) {
// if (data.result.record && !data.result.record.length) {
// head_record.set('organization_id', data.result.record.organization_id);
// head_record.set('organization_id_n', data.result.record.organization_name);
// } else {
// //没有找到值置空
// head_record.set('organization_id', '');
// head_record.set('organization_id_n', '');
// }
//
// },
// failure: function() {
//
// },
// error: function() {
//
// },
// scope: this
// });
// //公司带出区域
// Leaf.request({
// url: $('get_company_distrct_link').getUrl(),
// para: {
// company_id: head_record.get('company_id')
// },
// success: function(data) {
// if (data.result.record && !data.result.record.length) {
// head_record.set('district', data.result.record.district);
// head_record.set('district_n', data.result.record.district_n);
// }
// },
// failure: function() {
//
// },
// error: function() {
//
// },
// scope: this
// });
// });
//新增和加载时调用(form)
window['${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function(ds, record, config_records) {
......
......@@ -558,6 +558,8 @@ function prj501n_contract_number_renderer(id, name, query_only){
var url='${/request/@context_path}/autocrud/prj.PRJ501N.prj_project_history_display/query?project_id=${/parameter/@project_id}&bp_id=${/parameter/@bp_id}';
$(bp_ds_id).setQueryUrl(url);
$(bp_ds_id).query();
var quotation_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation');
$(quotation_ds_id).query();
})
//序号自增 add by lijingjing
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_add'] = function(ds, record, config_records, bp_seq) {
......
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