Commit 1eae6abd authored by Darming's avatar Darming

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

parents 3b3c8cfd 9c8702c0
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: DJ
$Date: 2013-6-13 下午02:32:50
$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 * from ( select h.bp_name, h.bp_id
from hls_bp_master h
where h.bp_category = 'VENDER'
and h.enabled_flag='Y')
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="bp_name" displayWidth="200" forDisplay="true" prompt="厂商名称"/>
<bm:field name="bp_id" displayWidth="200" forDisplay="true" forQuery="true" prompt="厂商代码"/>
</bm:fields>
<bm:query-fields>
<bm:query-field field="bp_name" queryOperator="like"/>
<bm:query-field field="bp_id" queryOperator="like"/>
</bm:query-fields>
<!-- <bm:data-filters>
<bm:data-filter enforceOperations="query" expression="h.enabled_flag=&apos;Y&apos;"/>
</bm:data-filters>-->
</bm:model>
......@@ -61,6 +61,10 @@
<bm:field name="withhold_way_n" expression="(select code_value_name from sys_code_values_v scv where scv.code=&apos;WITHHOLD_WAYS&apos; and scv.code_value = t1.withhold_way)" forInsert="false" forUpdate="false"/>
<bm:field name="first_contract_flag"/>
<bm:field name="finance_type"/>
<bm:field name="secondary_lease"/>
<bm:field name="vender_id"/>
<bm:field name="vender_id_n" expression="(select scv.bp_name from hls_bp_master scv where scv.enabled_flag=&apos;Y&apos; and scv.bp_id = t1.vender_id)" forInsert="false" forUpdate="false"/>
<bm:field name="finance_type_n" expression="(select code_value_name from sys_code_values_v scv where scv.code=&apos;FINANCE_TYPE&apos; and scv.code_value = t1.finance_type)" forInsert="false" forUpdate="false"/>
</bm:fields>
<bm:features>
......
......@@ -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,19 +77,13 @@
--未付金额
(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,
......
......@@ -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,6 +284,14 @@
<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[
......
......@@ -21,12 +21,6 @@
hls_bp_master_pkg.bp_create_user_authority(p_bp_id => ${@bp_id}, p_user_id => ${/session/@user_id}, p_company_id => ${/session/@company_id});
--校验简称
hls_bp_master_pkg.check_extra_name(p_extra_nam => ${@extra_nam},p_bp_id => ${@bp_id}, p_user_id => ${/session/@user_id});
hls_bp_master_pkg.check_lease_item_agent(
p_bp_id =>${@bp_id},
p_division =>${@division},
p_user_id =>${/session/@user_id}
);
END;
]]></bm:update-sql>
</bm:operation>
......
......@@ -10,6 +10,10 @@
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
hls_bp_master_pkg.check_lease_item_count(
p_agent_division_id =>${@agent_division_id},
p_user_id =>${/session/@user_id}
);
hls_bp_master_pkg.check_lease_item_agent(
p_bp_id =>${@bp_id},
p_division =>${@division},
......
......@@ -12,13 +12,16 @@
begin
con_contract_workflow_pkg.check_con_record(
p_contract_id =>${@contract_id},
p_contract_status =>${@contract_status}
p_contract_status =>${@contract_status},
p_sign_contract_status =>${@sign_contract_status}
);
end;
]]></bm:update-sql>
<bm:parameters>
<bm:parameter name="contract_status" dataType="java.lang.String" input="false" output="true" outputPath="/parameter/@contract_status"/>
<bm:parameter name="sign_contract_status" dataType="java.lang.String" input="false" output="true" outputPath="/parameter/@sign_contract_status"/>
</bm:parameters>
</bm:operation>
</bm:operations>
......
......@@ -2,8 +2,13 @@ var add_datafilters = [
{
name:'contract_status',
expression:"t1.contract_status in ('SIGNING','SIGN','INCEPTING','INCEPT','INCEPT_RETURN')"
expression:"t1.contract_status in ('INCEPTING','INCEPT','INCEPT_RETURN','NEW')"
},
{
name:'sign_contract_status',
expression:"t1.sign_contract_status in ('SIGNING','SIGN')"
},
{
name : 'authority',
expression : "(exists (select 1 from aut_trx_user_authorize a1, aut_owner_user_authorize a2 where a1.trx_category = 'CONTRACT' and a1.trx_id = t1.contract_id and trunc(sysdate) between a1.start_date and nvl(a1.end_date, trunc(sysdate)) and a1.user_id = a2.owner_user_id and a1.trx_category = a2.trx_category and a2.authorized_user_id = ${/session/@user_id} and trunc(sysdate) between a2.start_date and nvl(a2.end_date, trunc(sysdate))))"
......
......@@ -5,8 +5,8 @@ var add_datafilters = [
expression: "t1.document_type = 'CARCON'"
},
{
name: 'contract_status',
expression: "t1.contract_status in ('NEW','SIGNING','SIGNING','SIGN_RETURN')"
name: 'sign_contract_status',
expression: "t1.sign_contract_status in ('NEW','SIGNING','SIGN','SIGN_RETURN')"
},
{
name : 'authority',
......
......@@ -65,7 +65,7 @@ var override_queryfields = [
//},
{
name:'project_status',
queryexpression : "(t1.project_status in ('NEW','PRE_APPROVING','APPROVED_RETURN')"
queryexpression : "t1.project_status in ('NEW','APPROVING','APPROVED_RETURN','REJECT','APPROVED','CONTRACT_CREATED')"
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -17,6 +17,7 @@
]]></script>
<a:dataSets>
<a:dataSet id="con202_withway_ds" lookupCode="WITHHOLD_WAYS"/>
<a:dataSet id="secondary_lease_ds" lookupCode="SECONDARY_LEASE"/>
<a:dataSet id="con202_finance_type" lookupCode="FINANCE_TYPE"/>
<a:dataSet id="hls_bp_class_ds" lookupCode="HLS211_BP_CLASS"/>
<a:dataSet id="other_tmpt_clause_ds" lookupCode="CON202_CON_PRINT_OTHER_CONDITON"/>
......@@ -30,6 +31,8 @@
<a:dataSet id="con_basic_clause_detail_ds" autoQuery="true" model="cont.CON202.con_contract_tmpt_clause_main" queryUrl="${/request/@context_path}/autocrud/cont.CON202.con_contract_tmpt_clause_main/query?tmpt_id=${/parameter/@tmpt_id}" selectable="true">
<a:fields>
<a:field name="withhold_way_n" displayField="code_value_name" options="con202_withway_ds" returnField="withhold_way" valueField="code_value"/>
<a:field name="secondary_lease_n" displayField="code_value_name" options="secondary_lease_ds" returnField="secondary_lease" valueField="code_value"/>
<a:field name="finance_type"/>
<a:field name="finance_type_n" displayField="code_value_name" options="con202_finance_type" returnField="finance_type" valueField="code_value"/>
<a:field name="contract_number" lovGridHeight="360" lovHeight="540" lovService="basic.con_contract_for_lov" lovWidth="680">
......@@ -44,6 +47,12 @@
<a:map from="description" to="bp_category_n"/>
</a:mapping>
</a:field>
<a:field name="vender_id_n" lovGridHeight="300" lovHeight="480" lovService="basic.hls_bp_agent_vender_lov" lovWidth="500">
<a:mapping>
<a:map from="bp_name" to="vender_id_n"/>
<a:map from="bp_id" to="vender_id"/>
</a:mapping>
</a:field>
<a:field name="bp_class_n" displayField="code_value_name" options="hls_bp_class_ds" returnField="bp_class" valueField="code_value"/>
<a:field name="business_type_n" lovGridHeight="300" lovHeight="480" lovService="basic.hls_business_type_for_lov" lovWidth="500">
<a:mapping>
......@@ -108,6 +117,8 @@
<a:column name="contract_number" editor="lov" prompt="合同编号" width="100"/>
<a:column name="withhold_way_n" editor="cb" prompt="代扣方式"/>
<a:column name="bp_category_n" editor="lov" prompt="商业伙伴类型" width="100"/>
<a:column name="vender_id_n" editor="lov" prompt="厂商" width="100"/>
<a:column name="secondary_lease_n" editor="cb" prompt="二次租赁" width="100"/>
<a:column name="bp_class_n" editor="cb" prompt="商业伙伴分类" width="100"/>
<a:column name="business_type_n" editor="lov" prompt="业务类型" width="80"/>
<a:column name="document_type_n" editor="lov" prompt="单据类型" width="80"/>
......@@ -120,6 +131,7 @@
<a:column name="price_list_n" editor="lov" prompt="报价方案" width="120"/>
<a:column name="first_contract_flag" editor="check" prompt="首个支付表标志" width="120"/>
<a:column name="other_tmpt_clause_n" editor="cb" prompt="其他" width="100"/>
</a:columns>
<a:editors>
<a:lov id="lov"/>
......
......@@ -75,8 +75,8 @@
url: $('con_contract_create_content_link_id').getUrl(),
para: {
contract_id: '${/parameter/@contract_id}',
content_type: '${/parameter/@content_type}',
templet_usage: 'CON_SALE'
content_type: '${/parameter/@content_type}'
/* templet_usage: 'CON_SALE'*/
},
success: function(res) {
var result_ds = $('con_contract_update_print_detail_line_ds');
......@@ -102,12 +102,12 @@
function update_attachment_renderer(value, record, name) {
var content_id = record.get('content_id');
return '<a href="javascript:downloadfile_link(' + content_id + ')">下载</a>';
return '<a href="javascript:downloadfile_link(' + content_id +')">下载</a>';
}
function downloadfile_link(content_id) {
var url = $('con543_con_batch_dl_link_id').getUrl() + '?content_id=' + content_id + '&contract_id=' + '${/parameter/@contract_id}' + '&content_type=' + '${/parameter/@content_type}';
window.open(url, '_self');
var url = $('con543_con_batch_dl_link_id').getUrl() + '?content_id=' + content_id + '&contract_id=' + '${/parameter/@contract_id}' + '&content_type=' + '${/parameter/@content_type}';
window.open(url, '_self');
}
function con_download_zip() {
......@@ -219,8 +219,8 @@
<a:column name="bp_category_desc" prompt="HLS.BP_CATEGORY"/>
<a:column name="content_print_flag_name" prompt="CON505.CON_CONTENT_STATUS" width="80"/>
<a:column name="attachment" align="center" prompt="HLS.ATTACHMENT" renderer="update_attachment_renderer" width="50"/>
<a:column align="center" prompt="附件上传" renderer="attachment_upload" width="80"/>
<a:column name="file_name" align="left" prompt="附件名" renderer="con500_link_render" width="220"/>
<!-- <a:column align="center" prompt="附件上传" renderer="attachment_upload" width="80"/>
<a:column name="file_name" align="left" prompt="附件名" renderer="con500_link_render" width="220"/>-->
</a:columns>
</a:grid>
</a:screenBody>
......
......@@ -19,7 +19,7 @@
function open_contract_win(ds_id, record_id) {
var record = $(ds_id).findById(record_id);
var param = record.data;
if(record.get('contract_status')=='NEW' || record.get('contract_status')=='SIGN_RETURN'){
if(record.get('sign_contract_status')=='NEW' || record.get('sign_contract_status')=='SIGN_RETURN'){
param['function_code'] = 'CON301MM';
param['function_usage'] = 'MODIFY';
}
......
......@@ -216,10 +216,16 @@
param['document_category'] = 'BP';
param['bp_class'] = record.get('bp_class');
param['bp_category'] = record.get('bp_category');
if( record.get('bp_category')=='AGENT'){
param['function_code'] = 'HLS303_Q';
param['function_usage'] = 'QUERY';
}else{
param['function_code'] = 'CON505H';
param['function_usage'] = 'QUERY';
}
param['bp_type'] = record.get('bp_type');
param['function_code'] = 'CON505H';
param['function_usage'] = 'QUERY';
param['maintain_type'] = 'QUERY';
param['url_title'] = '${l:HLS212.BP_MASTER_QUERY}';
hls_doc_get_layout_code('${/parameter/@layout_code}_con_contract_get_layout_code_link_id', param, 'con505_hls_bp_master_query_link', record.ds.id, '${/parameter/@layout_code}');
};
......
......@@ -18,7 +18,7 @@
function open_contract_win(ds_id, record_id) {
var record = $(ds_id).findById(record_id);
var param = record.data;
if(record.get('contract_status')=='SIGNING' || record.get('contract_status')=='INCEPT_RETURN'||record.get('contract_status')=='SIGN'){
if(record.get('contract_status')=='NEW' || record.get('contract_status')=='INCEPT_RETURN'||record.get('sign_contract_status')=='SIGNING' || record.get('sign_contract_status') =='SIGN'){
param['function_code'] = 'CON3200N';
param['function_usage'] = 'MODIFY';
}
......
......@@ -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');
......@@ -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="发票上传标志"/>
......
......@@ -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>';
}
}
};
......@@ -410,8 +417,8 @@
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
var bp_record = $(ds_id).getCurrentRecord();
if (ds_id == ds.id) {
record.set('taxpayer_type','Y');
record.set('taxpayer_type_n','否');
// record.set('taxpayer_type','Y');
// record.set('taxpayer_type_n','否');
if (record.get('taxpayer_type') == 'Y') {
record.getField('tax_registry_num').setRequired(true);
record.getField('invoice_bp_address').setRequired(true);
......@@ -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);
};
......@@ -466,15 +461,16 @@
var record = new Leaf.Record({
'primary_flag': 'Y',
'bp_category': 'AGENT',
'bp_category_n': '经销商',
'bp_category_n': '代理店',
'bp_type': 'AGENT',
'bp_type_n': '经销商',
'bp_type_n': '代理店',
'enabled_flag': 'Y'
});
bp_master_role_ds.add(record);
var current_record = bp_master_role_ds.getAt(0);
current_record.getField('primary_flag').setReadOnly(true);
current_record.getField('enabled_flag').setReadOnly(true);
current_record.getField('bp_type_n').setReadOnly(true);
}
});
]]></script>
......
......@@ -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,11 +111,26 @@
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']();
return false;
}else{
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}
};
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
......@@ -267,14 +282,14 @@
var grid_id = ds_id.replace('ds', 'layout_grid_id');
$(grid_id).showEditorByRecord($(ds_id).create());
}
};
//删除
window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_agent_renew');
$(ds_id).remove();
}
};
//超链接渲染
......
......@@ -799,7 +799,8 @@
},
success: function(res) {
var contract_status = res.result.contract_status;
if(contract_status=='SIGN'){
var sign_contract_status = res.result.sign_contract_status;
if(sign_contract_status=='SIGN'||sign_contract_status=='SIGNING'|| contract_status=='NEW' || contract_status=='INCEPT_RETURN'){
for (var i = 0;i < headRecords.length;i++) {
var column_name = headRecords[i].get('column_name')
if(column_name !="lease_start_date"&&column_name !="contract_inception_date"){
......
......@@ -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) {
......
......@@ -43,6 +43,8 @@
<a:link id="${/parameter/@layout_code}tenant_rate_query_link"
url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_history_display.lview"/>
<a:model-query fetchAll="true" model="prj.PRJ500D.prj_occu_object_display" rootPath="occu_object"/>
<a:link id="prj_two_secondary_lease_link_id" model="prj.PRJ501N.insert_two_secondary_lease" modelaction="update"/>
<script type="text/javascript"><![CDATA[
// alert('${/parameter/@division}')
//add by zhuxianfei
......@@ -257,9 +259,14 @@
var param = {};
param['bp_id'] = record.get('bp_id');
param['bp_class'] = record.get('bp_class');
param['function_code'] = 'HLS215D';
param['function_usage'] = 'QUERY';
param['maintain_type'] = 'READONLY';
if(record.get('bp_category') =='AGENT'){
param['function_code'] = 'HLS303_Q';
param['function_usage'] = 'QUERY';
}else{
param['function_code'] = 'HLS215D';
param['function_usage'] = 'QUERY';
}
param['winid'] = '${/parameter/@layout_code}_bp_win_id';
param['url_title'] = '${l:HLS212.BP_MASTER_MAINTAIN}';
hls_doc_get_layout_code('${/parameter/@layout_code}_get_layout_code_link_id', param, '${/parameter/@layout_code}hls_bp_master_query_link', record.ds.id, '${/parameter/@layout_code}');
......@@ -378,6 +385,9 @@
$(prj_quotation_ds_id).query();
}
var url='${/request/@context_path}/autocrud/prj.PRJ501N.prj_project_history_display/query?project_id=${/parameter/@project_id}&bp_id=${/parameter/@bp_id}';
$(tenant_ds_id).setQueryUrl(url);
$(tenant_ds_id).query();
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
};
......
......@@ -46,8 +46,8 @@
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var head_record = $(ds_id).getAt(0);
head_record.getField('invoice_agent_id_n').setRequired(true);
var invoice_agent_id = '${/model/user_agent_description/record/@agent_id}';
var invoice_agent_id_n = '${/model/user_agent_description/record/@agent_name}';
var invoice_agent_id = '${/model/user_agent_description/record/@bp_id}';
var invoice_agent_id_n = '${/model/user_agent_description/record/@bp_name}';
head_record.set('unit_id', '${/model/4s_root_path/record/@value_code}');
head_record.set('unit_id_n', '${/model/4s_root_path/record/@value_name}');
......
......@@ -333,9 +333,14 @@
var param = {};
param['bp_id'] = record.get('bp_id');
param['bp_class'] = record.get('bp_class');
param['function_code'] = 'HLS215D';
param['function_usage'] = 'QUERY';
param['maintain_type'] = 'READONLY';
if(record.get('bp_category') =='AGENT'){
param['function_code'] = 'HLS303_Q';
param['function_usage'] = 'QUERY';
}else{
param['function_code'] = 'HLS215D';
param['function_usage'] = 'QUERY';
}
param['winid'] = '${/parameter/@layout_code}_bp_win_id';
param['url_title'] = '${l:HLS212.BP_MASTER_MAINTAIN}';
hls_doc_get_layout_code('${/parameter/@layout_code}_get_layout_code_link_id', param, '${/parameter/@layout_code}hls_bp_master_query_link', record.ds.id, '${/parameter/@layout_code}');
......
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