Commit c4568124 authored by Darming's avatar Darming

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

parents a522364c 5b5cf8aa
Pipeline #4051 canceled with stages
......@@ -94,6 +94,12 @@
<version>1.4.1</version>
</dependency>
<!-- 网银 代扣 ftp -->
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox-app</artifactId>
<version>1.8.10</version>
</dependency>
<dependency>
<groupId>com.jayway.jsonpath</groupId>
......
package leaf.plugin.word2pdf;
import com.jacob.activeX.ActiveXComponent;
import com.jacob.com.ComThread;
import com.jacob.com.Dispatch;
import com.jacob.com.Variant;
import org.apache.pdfbox.pdmodel.PDDocument;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import uncertain.core.UncertainEngine;
import uncertain.ocm.IObjectRegistry;
import java.io.File;
/**
* @author niminmin
*/
public class WordToPdf {
IObjectRegistry registry;
String jacobDllPath;
private static final Logger logger = LoggerFactory.getLogger(WordToPdf.class);
public WordToPdf(IObjectRegistry registry, String jacobDllName)
throws Exception {
this.registry = registry;
UncertainEngine engine = (UncertainEngine) this.registry
.getInstanceOfType(UncertainEngine.class);
String webInfPath = engine.getDirectoryConfig().getConfigDirectory();
// 添加jacob-1.18-x64.dll到C:\Java\jre1.7.0_79\bin目录 或者按照以下代码进行设置
// D:\work\leafProjects\MX_leasing\web\WEB-INF\server-script\jacob\jacob-1.18-x64.dll
jacobDllPath = webInfPath + "/server-script/jacob/" + jacobDllName;
System.setProperty("jacob.dll.path", jacobDllPath);
System.setProperty("com.jacob.debug", "true");
}
public static boolean word2pdf(String inFilePath, String outFilePath) {
logger.info("Word转PDF开始启动...");
long start = System.currentTimeMillis();
ActiveXComponent app = null;
Dispatch doc = null;
boolean flag = false;
try {
app = new ActiveXComponent("Word.Application");
app.setProperty("Visible", new Variant(false));
Dispatch docs = app.getProperty("Documents").toDispatch();
logger.info("打开文档:" + inFilePath);
doc = Dispatch.invoke(
docs,
"Open",
1,
new Object[]{inFilePath, new Variant(false),
new Variant(true)}, new int[1]).toDispatch();
logger.info("转换文档到PDF:" + outFilePath);
File tofile = new File(outFilePath);
if (tofile.exists()) {
tofile.delete();
}
Dispatch.invoke(doc, "SaveAs", 1, new Object[]{outFilePath,
new Variant(17)}, new int[1]);
Dispatch.call(doc, "Close", new Object[]{new Variant(false)});
long end = System.currentTimeMillis();
logger.info("转换完成,用时:" + (end - start) + "ms");
flag = true;
} catch (Exception e) {
logger.info("Word转PDF出错:" + e.getMessage());
flag = false;
logger.info("关闭文档");
if (app != null) {
app.invoke("Quit", 0);
}
ComThread.Release();
} finally {
logger.info("关闭文档");
if (app != null) {
app.invoke("Quit", 0);
}
ComThread.Release();
}
return flag;
}
/**
* 如果PDF存在则删除PDF
*
* @param pdfPath
*/
private static void deletePdf(String pdfPath) {
File pdfFile = new File(pdfPath);
if (pdfFile.exists()) {
pdfFile.delete();
}
}
/**
* excel to pdf
*
* @param inFilePath
* @param outFilePath
* @return
*/
public static boolean excel2pdf(String inFilePath, String outFilePath) {
ActiveXComponent activeXComponent = new ActiveXComponent("Excel.Application");
activeXComponent.setProperty("Visible", false);
// deletePdf(outFilePath);
Dispatch excels = activeXComponent.getProperty("Workbooks").toDispatch();
Dispatch excel = Dispatch.call(excels, "Open", inFilePath, false, true).toDispatch();
Dispatch.call(excel, "ExportAsFixedFormat", 0, outFilePath);
Dispatch.call(excel, "Close", false);
activeXComponent.invoke("Quit");
return true;
}
/**
* excel to pdf Orientation excel横向转成pdf
*
* @param inFilePath
* @param outFilePath
* @return
*/
public static boolean excel2pdfOrientation(String inFilePath, String outFilePath) {
ActiveXComponent activeXComponent = new ActiveXComponent("Excel.Application");
activeXComponent.setProperty("Visible", false);
// deletePdf(outFilePath);
Dispatch excels = activeXComponent.getProperty("Workbooks").toDispatch();
Dispatch excel = Dispatch.call(excels, "Open", inFilePath, false, true).toDispatch();
Dispatch currentSheet = Dispatch.get((Dispatch) excel,
"ActiveSheet").toDispatch();
Dispatch pageSetup = Dispatch.get(currentSheet, "PageSetup")
.toDispatch();
Dispatch.put(pageSetup, "Orientation", new Variant(2));
Dispatch.call(excel, "ExportAsFixedFormat", 0, outFilePath);
Dispatch.call(excel, "Close", false);
activeXComponent.invoke("Quit");
return true;
}
public static void cutPdf(String pdfPath)
{
File file = new File(pdfPath);
PDDocument document = new PDDocument();
try{
document = PDDocument.load(file);
}catch(Exception e){
logger.error("error",e);
}
int noOfPages = document.getNumberOfPages();
System.out.println(noOfPages);
document.removePage(noOfPages-1);
try{
document.save(pdfPath);
document.close();
}catch(Exception e){
logger.error("error",e);
}
}
public static void main(String[] args) throws Exception {
// String jacobDllPath = "D:\\ideaProjects\\leaf-hlcm\\src\\main\\webapp\\WEB-INF\\server-script\\jacob\\jacob-1.18-x64.dll";
// System.setProperty("jacob.dll.path", jacobDllPath);
// System.setProperty("com.jacob.debug", "true");
// word2pdf("D:\\hand-Prpjects\\付款请求书打印.doc",
// "D:\\hand-Prpjects\\付款请求书打印.pdf");
cutPdf("D:\\\\hand-Prpjects\\\\付款请求书打印.pdf");
// excel2pdf("D:\\work\\leafProjects\\YondaTl\\src\\test.xlsx",
// "D:\\work\\leafProjects\\YondaTl\\src\\付款通知书NEW.pdf");
// excel2pdfOrientation("D:\\work\\leafProjects\\YondaTl\\src\\test.xlsx",
// "D:\\work\\leafProjects\\YondaTl\\src\\付款通知书NEW.pdf");
}
}
......@@ -90,7 +90,7 @@ data.backup = false
data.backup.filePath=e:\\hand
# sso login flag
ssoLoginFlag=true
ssoLoginFlag=false
#Electronic Invoice Interface wsdl url FOR PROD
acr.webservice.url=
......
......@@ -10,9 +10,11 @@
<bm:operation name="query">
<bm:query-sql>
<![CDATA[
select c.contract_id, c.contract_number, c.contract_name
select *
from (select c.contract_id, c.contract_number, c.contract_name
from con_contract c
where c.data_class = 'NORMAL'
where c.data_class = 'NORMAL') V
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
......
......@@ -46,7 +46,7 @@
and c.code_value = t.billing_object) as billing_object_desc,
(select m.bp_name
from hls_bp_master_s_v m
where m.bp_id = con.bp_id_tenant) billing_object_name,
where m.bp_id =t.bp_id) billing_object_name,
t.due_amount,
t.billing_amount,
......
......@@ -6,7 +6,7 @@
$Purpose:
-->
<ns1:model xmlns:ns1="http://www.leaf-framework.org/schema/bm" alias="t1" extend="hls.HLS005.hls_cashflow_item_v" extendMode="reference">
<ns1:model xmlns:ns1="http://www.leaf-framework.org/schema/bm" alias="t1" extend="hls.HLS005.hls_cashflow_item_v" extendMode="reference" needAccessControl="false">
<ns1:fields>
<ns1:field name="cf_item" forDisplay="false" forQuery="false"/>
<ns1:field name="cf_item_desc" forDisplay="true" forQuery="true"/>
......
......@@ -80,8 +80,8 @@
<bm:query-field name="accounting_date_t" queryExpression="t1.accounting_date &lt;= to_date(${@accounting_date_t},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="total_amount_f" queryExpression="t1.total_amount &gt;= ${@total_amount_f}"/>
<bm:query-field name="total_amount_t" queryExpression="t1.total_amount &lt;= ${@total_amount_t}"/>
<bm:query-field name="invoice_bp_code_f" queryExpression="t1.invoice_bp_code &gt;= ${@invoice_bp_code_f}"/>
<bm:query-field name="invoice_bp_code_t" queryExpression="t1.invoice_bp_code &lt;= ${@invoice_bp_code_t}"/>
<bm:query-field name="invoice_bp_code" queryExpression="t1.invoice_bp_code= ${@invoice_bp_code}"/>
<!--<bm:query-field name="invoice_bp_code_t" queryExpression="t1.invoice_bp_code &lt;= ${@invoice_bp_code_t}"/>-->
<bm:query-field name="currency" queryExpression="t1.currency = ${@currency}"/>
<bm:query-field name="invoice_status" queryExpression="t1.invoice_status = ${@invoice_status}"/>
<bm:query-field name="vat_interface_status" queryExpression="t1.vat_interface_status = ${@vat_interface_status}"/>
......
......@@ -78,7 +78,13 @@
where ccc.contract_id = cc.contract_id
and ccc.overdue_status = 'Y'
and ccc.cf_item = 1
and ccc.write_off_flag <> 'FULL') business_due_amount --营业逾期总金额
and ccc.write_off_flag <> 'FULL') business_due_amount, --营业逾期总金额
(select sum(ccc.due_amount-nvl(ccc.received_amount,0))
from con_contract_cashflow ccc
where ccc.contract_id = cc.contract_id
and ccc.cf_item =9
and ccc.write_off_flag <> 'FULL') over_due_amount
FROM con_contract cc
where exists (select 1
from con_contract_cashflow ccw
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: Feng
$Date: 2013-9-24 下午2:19:04
$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
e.role_id,
e.role_code,
e.role_name
FROM
sys_role_vl e
WHERE
e.role_id = ${/session/@role_id}
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: sf
$Date: 2019-12-2 下午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 t1.unit_id,
t1.bp_code,
t1.enabled_flag,
t1.bp_category,
t1.bp_name
FROM hls_bp_master t1
WHERE
t1.bp_category='TENANT'
and t1.unit_id IN (
SELECT v.unit_id
FROM exp_emp_assign_e_v v
WHERE v.user_id=${/session/@user_id}
)
) v #WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="unit_id" displayWidth="200"/>
<bm:field name="bp_code" displayWidth="150" forDisplay="true" forQuery="true" prompt="商业伙伴编码"/>
<bm:field name="bp_name" displayWidth="200" forDisplay="true" forQuery="true" prompt="商业伙伴名称"/>
<bm:field name="enabled_flag"/>
<bm:field name="bp_category"/>
</bm:fields>
<bm:query-fields>
<bm:query-field field="bp_code" queryOperator="like"/>
<bm:query-field field="bp_name" queryOperator="like"/>
<bm:query-field field="bp_category" queryOperator="like"/>
</bm:query-fields>
<bm:data-filters>
<bm:data-filter enforceOperations="query" expression="v.enabled_flag=&apos;Y&apos;"/>
</bm:data-filters>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
hls_bp_master_credit_pkg.check_create_record(
p_bp_credit_hd_id =>${@bp_credit_hd_id}
);
end;]]></bm:update-sql>
</bm:operation>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select * from (select rd.bp_credit_hd_id,
rd.bp_id,
hbm.bp_name,
hbm.bp_code,
hbm.bp_category,
(select description
from hls_bp_category hbc
where hbc.bp_category = hbm.bp_category) bp_category_n,
hbm.bp_name bp_id_n,
rd.credit_total_amount,
rd.credit_type,
(select v.code_value_name
from sys_code_values_v v
where v.code = 'DS_CREDIT_TYPE'
and v.code_value = rd.credit_type) credit_type_n,
to_char(rd.credit_date_from,'yyyy-mm-dd')credit_date_from,
rd.credit_status,
(select code_value_name
from sys_code_values_v
where code = 'CREDIT_STATUS'
and code_value = rd.credit_status) credit_status_n,
to_char(rd.credit_date_to,'yyyy-mm-dd')credit_date_to,
rd.enable_flag,
to_char(rd.last_update_date,'yyyy-mm-dd')last_update_date,
(select description from sys_user s where s.user_id= rd.created_by)last_updated_by_desc
from HLS_BP_MASTER_CREDIT_HD hd,
hls_bp_master hbm,
hls_bp_mast_credit_hd_rd rd
where hd.bp_id = hbm.bp_id
and hd.bp_credit_hd_id = rd.bp_credit_hd_id)v
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:data-filters>
<bm:data-filter name="query" expression="bp_credit_hd_id=${@bp_credit_hd_id}"/>
</bm:data-filters>
</bm:model>
\ No newline at end of file
var override_queryfields = [
{
name: 'invoice_date_from',
queryexpression: "trunc(t1.invoice_date) >= to_date(${/parameter/@invoice_date_from},'yyyy-mm-dd')"
},
{
name: 'invoice_date_to',
queryexpression: "trunc(t1.invoice_date) <= to_date(${/parameter/@invoice_date_to},'yyyy-mm-dd')"
},
];
var add_datafilters = [ {
name : 'confirmation_status',
expression : "t1.confirmation_status is not null"
} ];
}
];
add_datafilter();
override();
var override_queryfields = [
{
name: 'invoice_date',
queryexpression: "trunc(t1.invoice_date) >= to_date(${/parameter/@invoice_date},'yyyy-mm-dd')"
},
{
name: 'to_invoice_date',
queryexpression: "trunc(t1.invoice_date) <= to_date(${/parameter/@to_invoice_date},'yyyy-mm-dd')"
},
{
name: 'creation_date',
queryexpression: "trunc(t1.update_date) >= to_date(${/parameter/@creation_date},'yyyy-mm-dd')"
},
{
name: 'to_creation_date',
queryexpression: "trunc(t1.update_date) <= to_date(${/parameter/@to_creation_date},'yyyy-mm-dd')"
}
];
override();
......@@ -30,7 +30,7 @@
}
};
function ap_invoice_import_detail(record_id,ds_id){debugger;
function ap_invoice_import_detail(record_id,ds_id){
var record = $(ds_id).findById(record_id);
var param = record.data;
param['function_usage'] = 'MODIFY';
......
......@@ -8,6 +8,7 @@
<script><![CDATA[
function invoice_inf_process(dataset, record, name, value, oldvalue) {
debugger
if(name == 'invoice') {
record.getField('invoice').setReadOnly(true);
var contract_id = record.get('contract_id');
......@@ -17,7 +18,9 @@
var invoice_number = strs[3];
var net_amount = strs[4];
var invoice_date = strs[5];
if (strs.length == 8) {
//检验设备价格需要大于不含税金额
if (strs.length ==9) {
Leaf.request({
url: $('acp_invoice_inf_import_link').getUrl(),
para: {
......@@ -45,7 +48,7 @@
});
} else {
// $('acp600_acp_invoice_hd_ds').getAt(0).setReadOnly(true);
Leaf.showMessage('提示', '发票信息误!');
Leaf.showMessage('提示', '发票信息有错误!');
record.getField('invoice').setReadOnly(false);
}
}else {
......
......@@ -297,7 +297,7 @@
</a:screenTopToolbar>-
<a:queryForm id="condition_queryForm" bindTarget="allConditionDs" createSearchButton="false" resultTarget="contractDs">
<a:formToolBar labelWidth="100">
<a:lov name="billing_object_name" bindTarget="allConditionDs" prompt="承租人"/>
<a:lov name="billing_object_name" bindTarget="allConditionDs" prompt="开票对象"/>
<!--
<a:comboBox name="bill_object_bp_class_desc" bindTarget="allConditionDs" prompt="客户类型"/>
......@@ -343,7 +343,7 @@
<!--<a:column name="invoice_type_desc" prompt="发票类型"/>-->
<!--<a:column name="object_taxpayer_type_desc" prompt="纳税人类型"/>-->
<a:column name="contract_number" lock="true" prompt="合同编号" width="150"/>
<a:column name="billing_object_name" prompt="开票对象名称"/>
<a:column name="billing_object_name" prompt="发票抬头"/>
<a:column name="bp_id_agent_level1" prompt="代理店"/>
<a:column name="times" align="right" lock="true" prompt="期数" width="40"/>
<a:column name="cf_item_desc" lock="true" prompt="应收项目"/>
......@@ -359,7 +359,7 @@
<a:column name="billing_amount" align="right" prompt="已开票金额" renderer="Leaf.formatMoney"/>
<!-- <a:column name="billing_principal" align="right" prompt="已开票本金" renderer="Leaf.formatMoney"/>
<a:column name="billing_interest" align="right" prompt="已开票利息" renderer="Leaf.formatMoney"/>-->
<a:column name="last_received_date" prompt="最后收款日" renderer="Leaf.formatDate"/>
<a:column name="last_received_date" prompt="最后核销日" renderer="Leaf.formatDate"/>
<!--
<a:column name="termination_date" prompt="正常结清日" renderer="Leaf.formatDate"/>
-->
......
......@@ -428,27 +428,29 @@
<a:datePicker name="invoice_date_f" bindTarget="acr515_invoiceVatParaDs" prompt="ACR.INVOICE_DATE_FROM" width="150"/>
<div><![CDATA[${l:ACR.INVOICE_DATE_TO}]]></div>
<a:datePicker name="invoice_date_t" bindTarget="acr515_invoiceVatParaDs" prompt="" width="150"/>
<a:lov name="invoice_bp_code_f" bindTarget="acr515_invoiceVatParaDs" prompt="HLS.CUSTOMER_NUMBER_FROM" width="150"/>
<div><![CDATA[${l:HLS.CUSTOMER_NUMBER_TO}]]></div>
<a:lov name="invoice_bp_code_t" bindTarget="acr515_invoiceVatParaDs" prompt="" width="150"/>
<!-- <div><![CDATA[${l:HLS.CUSTOMER_NUMBER_TO}]]></div>
<a:lov name="invoice_bp_code_t" bindTarget="acr515_invoiceVatParaDs" prompt="" width="150"/>-->
<a:textField name="invoice_number_f" bindTarget="acr515_invoiceVatParaDs" prompt="ACR.INVOICE_NUMBER_FROM" width="150"/>
<div><![CDATA[${l:ACR.INVOICE_NUMBER_TO}]]></div>
<a:textField name="invoice_number_t" bindTarget="acr515_invoiceVatParaDs" prompt="" width="150"/>
<a:comboBox name="invoice_status_desc" bindTarget="acr515_invoiceVatParaDs" width="150"/>
<a:comboBox name="vat_interface_status_desc" bindTarget="acr515_invoiceVatParaDs" width="150"/>
</a:hBox>
<a:hBox labelSeparator=" " labelWidth="100">
<a:textField name="invoice_number_f" bindTarget="acr515_invoiceVatParaDs" prompt="ACR.INVOICE_NUMBER_FROM" width="150"/>
<div><![CDATA[${l:ACR.INVOICE_NUMBER_TO}]]></div>
<a:textField name="invoice_number_t" bindTarget="acr515_invoiceVatParaDs" prompt="" width="150"/>
<a:datePicker name="accounting_date_f" bindTarget="acr515_invoiceVatParaDs" prompt="HLS.ACCOUNT_DATE_FROM" width="150"/>
<div><![CDATA[${l:HLS.ACCOUNT_DATE_TO}]]></div>
<a:datePicker name="accounting_date_t" bindTarget="acr515_invoiceVatParaDs" prompt="" width="150"/>
<a:numberField name="total_amount_f" allowFormat="true" bindTarget="acr515_invoiceVatParaDs" prompt="发票金额从" width="150"/>
<div><![CDATA[${l:ACR.TOTAL_AMOUNT_TO}]]></div>
<a:numberField name="total_amount_t" allowFormat="true" bindTarget="acr515_invoiceVatParaDs" prompt="" width="150"/>
<a:comboBox name="invoice_kind_desc" bindTarget="acr515_invoiceVatParaDs" width="150"/>
<a:lov name="created_by_name" bindTarget="acr515_invoiceVatParaDs" width="150"/>
</a:hBox>
<a:hBox labelWidth="100">
<a:numberField name="total_amount_f" allowFormat="true" bindTarget="acr515_invoiceVatParaDs" prompt="发票金额从" width="150"/>
<div><![CDATA[${l:ACR.TOTAL_AMOUNT_TO}]]></div>
<a:numberField name="total_amount_t" allowFormat="true" bindTarget="acr515_invoiceVatParaDs" prompt="" width="150"/>
<a:lov name="invoice_bp_code_f" bindTarget="acr515_invoiceVatParaDs" prompt="客户编号" width="150"/>
</a:hBox>
</a:form>
......
......@@ -37,7 +37,7 @@
<a:field name="cf_item"/>
<a:field name="cf_item_n" options="cf_item_options" displayField="description" returnField="cf_item" valueField="cf_item"/>
<a:field name="claim_status" options="claim_status_ds" displayField="code_value_name" valueField="code_value" returnField="claim_status"/>
<a:field name="cf_item_desc" autoComplete="true" lovGridHeight="350" lovHeight="500" lovLabelWidth="100" lovService="csh.CSH518.hls_cashflow_item_v_lov?cf_direction=INFLOW" lovWidth="520" title="现金流项目">
<a:field name="cf_item_desc" autoComplete="true" lovGridHeight="350" lovHeight="500" lovLabelWidth="100" lovService="acr.ACR510.hls_cashflow_item_v_lov" lovWidth="520" title="现金流项目">
<a:mapping>
<a:map from="cf_item" to="cf_item"/>
<a:map from="cf_item_desc" to="cf_item_desc"/>
......
......@@ -148,9 +148,6 @@
return;
}
}
//判断所有的单据是否已经进行测算过
Leaf.request({
url: $('con_contract_penalty_reduction_link').getUrl(),
......@@ -161,7 +158,7 @@
// var v_status = res.result.v_status;
//if (v_status == 1) {
Leaf.SideBar.show({
msg: '取消成功',
msg: '操作成功',
duration: 2000
});
//}
......
......@@ -35,7 +35,9 @@
if (res.result.header_result == 'success') {
var ds_id2 = 'CON_PENALTY_REDUCTION_MAINTAIN_G_PENALTY_DETAIL_con_contract_cashflow_ds';
$(ds_id2).setQueryParameter('copy_contract_id',record1.get('copy_contract_id'));
$(ds_id2).setQueryParameter('copy_contract_id',record1.get('copy_contract_id'));
$(ds_id2).query();
debugger
var records2 = $(ds_id2).getAll();
if (records2 && records2.length != 0) {
var param_list = [];
......@@ -222,17 +224,26 @@
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) {
if (value != old_value) {
if (update_falg != 'Y') {
if (name == 'reduce_amount_total') {
var ratio = parseFloat(Leaf.formatNumber(div(record.get('reduce_amount_total'), record.get('unreceived_overdue_amount')), 4));
update_falg = 'Y';
// record.set('reduce_amount_total',value>record.get('unreceived_overdue_amount') ?record.get('unreceived_overdue_amount'):value);
if(value>record.get('unreceived_overdue_amount')){
$L.showErrorMessage('提示','减免金额不能大于最大减免金额!');
record.set('reduce_amount_total',record.get('unreceived_overdue_amount'));
$(ds).getAt(0).set('reduce_amount_total','');
return;
}
var ratio = parseFloat(Leaf.formatNumber(div(record.get('reduce_amount_total'), record.get('total_overdue_amount')), 4));
// update_falg = 'Y';
record.set('reduce_amount_total_ratio', ratio);
}
if (name == 'reduce_amount_total_ratio') {
var amount = parseFloat(mul(record.get('reduce_amount_total_ratio'), record.get('unreceived_overdue_amount')), 2);
update_falg = 'Y';
var amount = parseFloat(mul(record.get('reduce_amount_total_ratio'), record.get('total_overdue_amount')), 2);
// update_falg = 'Y';
record.set('reduce_amount_total', amount);
}
......
......@@ -47,7 +47,7 @@
function open_contract_detail_win(ds_id, record_id) {
var record = $(ds_id).findById(record_id);
var param = record.data;
if (record.data.status == 'APPROVED' || record.data.status == 'APPROVING'||record.data.status == 'CANCEL') {
if (record.data.status == 'APPROVED' || record.data.status == 'APPROVING'||record.data.status == 'CANCEL'||record.data.status == 'REJECT') {
param['function_code'] = 'CON1020_C_R';
param['function_usage'] = 'QUERY';
param['maintain_type'] = 'QUERY';
......
......@@ -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 model="cont.CON620.get_sys_role" rootPath="role_info"/>
</a:init-procedure>
<a:view>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}zj_wfl_approve_history_check"
url="${/request/@context_path}/modules/zjwfl/zj_wfl_approve_history_check.lview"/>
......@@ -30,7 +33,20 @@
<script type="text/javascript"><![CDATA[
// stopDymanicAutoQuery('${/parameter/@layout_code}', 'G_CONTRACT_RESULT', 'con_contract');
Leaf.onReady(function() {
if("${/model/role_info/record/@role_code}"!="0018"&&"${/model/role_info/record/@role_code}"!="0019") {
document.getElementById("CONTRACT_QUERY_ENTRANCE_F_QUERY_NULL_AGENT_EXTRA_NAM_prompt").style.display = "";
document.getElementById("CONTRACT_QUERY_ENTRANCE_F_QUERY_NULL_AGENT_EXTRA_NAM").style.display = "";
document.getElementById("CONTRACT_QUERY_ENTRANCE_F_QUERY_NULL_BP_ID_AGENT_LEVEL1_prompt").style.display = "";
document.getElementById("CONTRACT_QUERY_ENTRANCE_F_QUERY_NULL_BP_ID_AGENT_LEVEL1").style.display = "";
} else {
document.getElementById("CONTRACT_QUERY_ENTRANCE_F_QUERY_NULL_AGENT_EXTRA_NAM_prompt").style.display = "none";
document.getElementById("CONTRACT_QUERY_ENTRANCE_F_QUERY_NULL_AGENT_EXTRA_NAM").style.display = "none";
document.getElementById("CONTRACT_QUERY_ENTRANCE_F_QUERY_NULL_BP_ID_AGENT_LEVEL1_prompt").style.display = "none";
document.getElementById("CONTRACT_QUERY_ENTRANCE_F_QUERY_NULL_BP_ID_AGENT_LEVEL1").style.display = "none";
}
});
function open_contract_win(ds_id, record_id) {
var record = $(ds_id).findById(record_id);
var param = record.data;
......
......@@ -13,6 +13,7 @@
$ctx.parameter.tomcat_source = con_print_path['tomcat_source'];
]]>
</s:server-script>
<a:model-query model="cont.CON620.get_sys_role" rootPath="role_info"/>
</a:init-procedure>
<a:view>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_uploadFile_id"
......@@ -154,6 +155,16 @@
}
}
};
Leaf.onReady(function() {
if("${/model/role_info/record/@role_code}"!="0018"&&"${/model/role_info/record/@role_code}"!="0019") {
document.getElementById("CON_DUE_DETAIL_user_button4").style.display = "";
document.getElementById("CON_DUE_DETAIL_user_button3").style.display = "";
} else {
document.getElementById("CON_DUE_DETAIL_user_button4").style.display = "none";
document.getElementById("CON_DUE_DETAIL_user_button3").style.display = "none";
}
});
]]></script>
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true">
<a:init-procedure/>
<a:init-procedure>
<a:model-query model="cont.CON620.get_sys_role" rootPath="role_info"/>
</a:init-procedure>
<a:view>
<a:link id="con_dun_record_id" url="${/request/@context_path}/modules/cont/CON620/con_dun_record.lview"/>
<a:link id="hls_bp_master_id"
......@@ -109,70 +111,46 @@
}
function summaryRenderer(datas, name) {
var sum = 0;
var sum2 = 0;
var sum3 = 0;
var sum4 = 0;
var sum5 = 0;
for (var i = 0; i < datas.length; i++) {
record = datas[i];
if (name == "overdue_amount") {
var t_1 = record.get("overdue_amount");
var t_2 = parseFloat(t_1);
if (!isNaN(t_2)) {
sum += t_2;
}
}
if (name == "remain_principal") {
var d_1 = record.get("remain_principal");
var d_2 = parseFloat(d_1);
if (!isNaN(d_2)) {
sum2 += d_2;
}
}
if (name == "penalty") {
var p_1 = record.get("penalty");
var p_2 = parseFloat(p_1);
if (!isNaN(p_2)) {
sum3 += p_2;
}
}
if (name == "promised_return_amount") {
var r_1 = record.get("promised_return_amount");
if (name == "account_due_amount") {
var r_1 = record.get("account_due_amount")||0;
var r_2 = parseFloat(r_1);
if (!isNaN(r_2)) {
sum4 += r_2;
sum += r_2;
}
}
if (name == "deposit") {
var s_1 = record.get("deposit");
if (name == "business_due_amount") {
var s_1 = record.get("business_due_amount")||0;
var s_2 = parseFloat(s_1);
if (!isNaN(s_2)) {
sum5 += s_2;
sum2 += s_2;
}
}
if (name == "over_due_amount") {
debugger;
var t_1 = record.get("over_due_amount")||0;
var t_2 = parseFloat(t_1);
if (!isNaN(t_2)) {
sum3 += t_2;
}
}
}
if (name == "overdue_days") {
if (name == "division_n") {
return '<div align="right">合计:</div>';
}
if (name == "overdue_amount") {
if (name == "account_due_amount") {
return '<font color="red">' + Leaf.formatNumber(sum, 2) + '</font>';
}
if (name == "remain_principal") {
if (name == "business_due_amount") {
return '<font color="red">' + Leaf.formatNumber(sum2, 2) + '</font>';
}
if (name == "penalty") {
if (name == "over_due_amount") {
return '<font color="red">' + Leaf.formatNumber(sum3, 2) + '</font>';
}
if (name == "promised_return_amount") {
return '<font color="red">' + Leaf.formatNumber(sum4, 2) + '</font>';
}
if (name == "deposit") {
return '<font color="red">' + Leaf.formatNumber(sum5, 2) + '</font>';
}
}
// function onIndexChange(ds, record, name, value, oldvalue) {
......@@ -180,12 +158,14 @@
// $('bgt_contract_payment_detail_line_ds').query();
// }
// function ds_query(ds) {
// if (ds.getAll().length == 0) {
// $('bgt_contract_payment_detail_line_ds').setQueryParameter('contract_id', null);
// $('bgt_contract_payment_detail_line_ds').query();
// }
// }
function ds_query(ds) {
var grid_id = $('CON601_con_contract_grid_ds');
if("${/model/role_info/record/@role_code}"=="0018"||"${/model/role_info/record/@role_code}"=="0019"){
grid_id.hideColumn('account_due_times');
grid_id.hideColumn('account_due_days');
grid_id.hideColumn('account_due_amount');
}
}
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
......@@ -236,7 +216,7 @@
</a:fields>
<a:events>
<!--<a:event name="indexChange" handler="onIndexChange"/>-->
<!--<a:event name="load" handler="ds_query"/>-->
<a:event name="load" handler="ds_query"/>
</a:events>
</a:dataSet>
<!--<a:dataSet id="bgt_contract_payment_detail_line_ds" fetchAll="true" model="cont.CON620.bgt_contract_payment_detail_line"/>-->
......@@ -279,18 +259,20 @@
align="center"/>
<a:column name="bp_id_agent_desc" align="center" prompt="代理店" width="200"/>
<a:column name="business_type_n" align="center" prompt="业务类型" width="60"/>
<a:column name="division_n" align="center" prompt="租赁物" width="60"/>
<a:column name="division_n" align="center" prompt="租赁物" width="60" footerRenderer="summaryRenderer"/>
<a:column name="account_due_times" align="center" prompt="会计逾期总期数"
width="100"/>
<a:column name="account_due_days" align="center" prompt="会计逾期总天数"
width="100"/>
<a:column name="account_due_amount" align="right" prompt="会计逾期总金额" renderer="Leaf.formatMoney"
<a:column name="account_due_amount" align="right" prompt="会计逾期总金额" footerRenderer="summaryRenderer"
width="100"/>
<a:column name="business_due_times" align="center" prompt="营业逾期总期数"
width="100"/>
<a:column name="business_due_days" align="center" prompt="营业逾期总天数"
width="100"/>
<a:column name="business_due_amount" align="right" prompt="营业逾期总金额" renderer="Leaf.formatMoney"
<a:column name="business_due_amount" align="right" prompt="营业逾期总金额" footerRenderer="summaryRenderer"
width="100"/>
<a:column name="over_due_amount" align="right" prompt="违约金" footerRenderer="summaryRenderer"
width="100"/>
</a:columns>
</a:grid>
......
......@@ -227,7 +227,7 @@
</a:field>
<a:field name="times"/>
<a:field name="due_date_to" defaultValue="${/model/sys_time_default_value_list/record/@now_time}"/>
<a:field name="due_date_to"/>
<a:field name="project_number_from" lovGridHeight="300" lovHeight="450" lovService="prj.PRJ501.prj_project_for_lov" lovWidth="500" title="ACR510.FIELD.PROJECT_NUMBER_FROM">
<a:mapping>
<a:map from="project_number" to="project_number_from"/>
......@@ -255,7 +255,7 @@
</a:field>
<a:field name="bp_name" readOnly="true"/>
<a:field name="bp_code_tenant" readOnly="true"/>
<a:field name="bp_name_tenant" lovGridHeight="300" lovHeight="450" lovLabelWidth="120" lovService="basic.hls_bp_master_v_for_lov?bp_category=TENANT" lovWidth="600" title="承租人">
<a:field name="bp_name_tenant" lovGridHeight="300" lovHeight="450" lovLabelWidth="120" lovService="csh.CSH501.hls_bp_master_same_agent_for_lov?bp_category=TENANT" lovWidth="600" title="承租人">
<a:mapping>
<a:map from="bp_code" to="bp_code_tenant"/>
<a:map from="bp_name" to="bp_name_tenant"/>
......
......@@ -262,8 +262,8 @@
record.getField('unit_id_n').setReadOnly(true);
record.getField('unit_id_n').setRequired(false);
}else{
record.getField('unit_id_n').setReadOnly(false);
record.getField('unit_id_n').setRequired(true);
record.getField('unit_id_n').setReadOnly(true);
record.getField('unit_id_n').setRequired(false);
}
}
......
......@@ -12,6 +12,8 @@
modelaction="update"/>
<a:link id="hls_bp_master_modify_link"
url="${/request/@context_path}/modules/hls/HLS215N/hls_bp_master_query.lview"/>
<a:link id="hls_bp_master_billing_link"
url="${/request/@context_path}/modules/hls/HLS214N/hls_bp_master_billing.lview"/>
<a:link id="hls_bp_ccx_info_link"
url="${/request/@context_path}/modules/hls/HLS236/hls_bp_master_query_ccx_report.lview"/>
<a:link id="hls_bp_ccx_icinfo_link"
......@@ -20,6 +22,44 @@
<script type="text/javascript"><![CDATA[
// stopDymanicAutoQuery('${/parameter/@layout_code}', 'G_BP_RESULT', 'hls_bp_master');
//信息变更
window['${/parameter/@layout_code}_user_button4_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'hls_bp_master');
var data=$(ds_id).selected[0];
var bp_class = data.get('bp_class');
if(bp_class == 'NP'){
Leaf.showMessage('${l:PROMPT}', '只有法人类型商业伙伴才有开票信息!');
return false;
}else if(bp_class == 'ORG'){
var invoice_bp_bank_account = data.get('invoice_bp_bank_account');
var invoice_title = data.get('invoice_title');
var invoice_bp_address_phone_num = data.get('invoice_bp_address_phone_num');
var phone =data.get('phone');
var taxpayer_type =data.get('taxpayer_type');
var invoice_bp_bank =data.get('invoice_bp_bank');
var bp_id=data.get('bp_id');
new Leaf.Window({
id: 'hls_bp_master_billing',
url: $('hls_bp_master_billing_link').getUrl(),
params: {
function_code:'HLS214NST',
invoice_bp_bank_account:invoice_bp_bank_account,
invoice_title:invoice_title,
function_usage : 'QUERY',
maintain_type : 'READONLY',
invoice_bp_address_phone_num:invoice_bp_address_phone_num,
phone:phone,
taxpayer_type:taxpayer_type,
invoice_bp_bank:invoice_bp_bank,
bp_id:bp_id
},
title: '开票信息查看',
fullScreen: true
});
}
}
function open_bp_modify_win(ds_id, record_id) {
var record = $(ds_id).findById(record_id);
var param = record.data;
......
......@@ -29,6 +29,7 @@ $Purpose: 商业伙伴授信维护
var credit_date_to=Leaf.formatDate(record.get('credit_date_to'));
var total_amount=record.get('credit_total_amount');
var used_credit_amount=record.get('used_amount');
if (record.dirty){
if(total_amount<used_credit_amount){
$L.showErrorMessage("错误",'修改后剩余授信额度小于0',null,null);
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
......@@ -71,7 +72,12 @@ $Purpose: 商业伙伴授信维护
},
sync: true,
scope: this
});
});}else{
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@winid}').close();
$('credit_ds').query();
}
......
......@@ -8,7 +8,7 @@ $Purpose: 商业伙伴授信维护
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true">
<a:init-procedure>
<a:model-query defaultWhereClause="t1.user_id=${/session/@user_id} and position_code in(006,007)" fetchAll="true" model="csh.CSH509.query_roles_info" rootPath="position_code"/>
<a:model-query defaultWhereClause="t1.user_id=${/session/@user_id} and position_code in(005,006)" fetchAll="true" model="csh.CSH509.query_roles_info" rootPath="position_code"/>
</a:init-procedure>
<a:view>
......@@ -20,7 +20,9 @@ $Purpose: 商业伙伴授信维护
<a:link id="hls361N_update_credit_status_link_id" model="hls.HLS361N.hls_bp_master_credit_update_status" modelaction="update"/>
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="check_roles" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="check_create_record_link_id" model="hls.HLS361N.hls_bp_master_create_record"
modelaction="update"/>
<a:link id="credit_detail_link" url="${/request/@context_path}/modules/hls/HLS361N/hls_bp_mster_credit_record.lview"/>
<script type="text/javascript"><![CDATA[
var user_code='';
Leaf.onReady(function(){
......@@ -68,7 +70,7 @@ $Purpose: 商业伙伴授信维护
//设置为可以修改
//datas[0].getField('credit_total_amount').setReadOnly(false);
}
//1. 营业内勤/营业担当勾选授信状态为“启用”或“停用
//1. 营业副部长/营业担当勾选授信状态为“启用”或“停用
window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() {
//授信额度变更
var param={};
......@@ -80,14 +82,19 @@ $Purpose: 商业伙伴授信维护
}
//启用和审批冻结判断
var credit_status=datas[0].data.credit_status;
if(credit_status!='ENABLE'&&credit_status!='DISABLE'&&credit_status!='REFUSE'){
$L.showInfoMessage("提示",'请选择状态为启用,停用和审批拒绝的数据!',null,null)
// if(credit_status!='ENABLE'&&credit_status!='DISABLE'&&credit_status!='REFUSE'){
// $L.showInfoMessage("提示",'请选择状态为启用,停用和审批拒绝的数据!',null,null)
// return;
// }
//005 营业副部长
//006 营业担当
if(user_code==''||user_code==undefined){
$L.showInfoMessage("提示",'只有营业副部长和营业担当才能操作数据!');
return;
}
//角色判断 00215 营业内勤
//00213 营业担当
if(user_code==''||user_code==undefined){
$L.showInfoMessage("提示",'只有营业内勤和营业担当才能操作数据!');
if(datas[0].get('credit_status')=='APPROVING'){
$L.showInfoMessage("提示",'该授信记录审批中,无法维护!');
return;
}
......@@ -102,6 +109,7 @@ $Purpose: 商业伙伴授信维护
param['credit_date_from']=datas[0].get('credit_date_from');
param['credit_total_amount']=datas[0].get('credit_total_amount');
param['bp_code']=datas[0].get('bp_code');
param['credit_status']=datas[0].get('credit_status');
param['winid']='hls_bp_credit_winId';
hls_doc_get_layout_code('hn1150_get_layout_code_link_id', param, 'hls361_hls_bp_master_maintain_link', credit_ds);
......@@ -194,6 +202,43 @@ $Purpose: 商业伙伴授信维护
hls_doc_get_layout_code('hn1150_get_layout_code_link_id', param, 'hls361_hls_bp_master_credit_agent_detail_link', null);
}
// //变更履历按钮
window['${/parameter/@layout_code}_user_button4_layout_dynamic_click'] = function() {
var credit_ds=get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_credit_hd');
var record = $(credit_ds).getCurrentRecord();
Leaf.Masker.mask(Ext.getBody(), '正在执行...');
Leaf.request({
url: $('check_create_record_link_id').getUrl(),
para: {
bp_credit_hd_id: record.get('bp_credit_hd_id')
},
success: function () {
Leaf.Masker.unmask(Ext.getBody());
var win = new Leaf.Window({
id: 'hls_bp_credit_record_window',
params: {
bp_credit_hd_id: record.get('bp_credit_hd_id'),
winid: 'hls_bp_credit_record_window'
},
url: $('credit_detail_link').getUrl(),
title: '授信额度变更履历',
fullScreen: true
});
win.on('close', function () {
// ds.query(ds.currentPage);
});
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
}
]]></script>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: niminmin
$Date: 2019-10-28 上午11:10:33
$Revision: 1.0
$Purpose:授信额度履历
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
<a:init-procedure>
</a:init-procedure>
<a:view>
<script type="text/javascript"><![CDATA[
]]></script>
<a:dataSets>
<a:dataSet id="hls_bp_master_credit_result_ds" autoPageSize="true" autoQuery="true" model="hls.HLS361N.hls_bp_master_create_record" queryDataSet="csh_deposit_transfer_maintain_query_ds" queryUrl="${/request/@context_path}/autocrud/hls.HLS361N.hls_bp_master_create_record/query?bp_credit_hd_id=${/parameter/@bp_credit_hd_id}">
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<!--<a:gridButton click="cus100_deposit_transfer" text="划转" id="cus100_deposit_transfer_id"/>-->
<!--<a:gridButton click="cus100_deposit_transfer_query" text="HLS.QUERY" id="cus100_deposit_transfer_query_id"/>-->
<!--<a:gridButton click="cus100_deposit_transfer_reset" text="HLS.RESET"/>-->
</a:screenTopToolbar>
<a:fieldSet labelWidth="150" style="margin-left:20px">
<a:grid id="hls_bp_master_credit_result_grid_ds" bindTarget="hls_bp_master_credit_result_ds" marginHeight="165" marginWidth="100" navBar="true" >
<a:columns>
<a:column name="bp_code" prompt="代理店编码" align="center" width="120"/>
<a:column name="bp_name" prompt="代理店名称" align="center" width="170"/>
<a:column name="credit_total_amount" prompt="授信总额度" align="center" width="200"/>
<a:column name="credit_date_from" prompt="授信日期从" align="center" width="120"/>
<a:column name="credit_date_to" prompt="授信日期到" width="110" align="center"/>
<a:column name="last_updated_by_desclast_update_date" prompt="变更日期" width="110" align="center"/>
<!--<a:column name="" prompt="变更人" width="110" align="center"/>-->
</a:columns>
</a:grid>
</a:fieldSet>
</a:screenBody>
</a:view>
</a:screen>
......@@ -17,6 +17,10 @@ $Purpose: 商业伙伴授信维护
<a:link id="hls361_hls_bp_master_credit_agent_detail_link" url="${/request/@context_path}/modules/hls/HLS362N/credit_entrance_detail_confirm.lview"/>
<a:link id="hls362N_update_credit_confirmed_link_id" model="hls.HLS361N.hls_bp_master_credit_confirmed" modelaction="update"/>
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="check_create_record_link_id" model="hls.HLS361N.hls_bp_master_create_record"
modelaction="update"/>
<a:link id="credit_detail_link" url="${/request/@context_path}/modules/hls/HLS361N/hls_bp_mster_credit_record.lview"/>
<script type="text/javascript"><![CDATA[
var user_code='';
Leaf.onReady(function(){
......@@ -52,8 +56,8 @@ $Purpose: 商业伙伴授信维护
}
//审批冻结判断
var credit_status=datas[0].data.credit_status;
if(credit_status!='FREZZING'){
$L.showInfoMessage("提示",'请选择状态为审批冻结的数据!',null,null)
if(credit_status!='APPROVING'){
$L.showInfoMessage("提示",'请选择状态为审批的数据!',null,null)
return;
}
//角色判断
......@@ -68,7 +72,7 @@ $Purpose: 商业伙伴授信维护
url: $('hls362N_update_credit_confirmed_link_id').getUrl(),
para: {
bp_credit_hd_id : datas[0].data.bp_credit_hd_id,
wanted_status : 'ENABLE',
wanted_status : 'APPROVED',
},
success: function () {
Leaf.SideBar.show({
......@@ -115,7 +119,8 @@ $Purpose: 商业伙伴授信维护
url: $('hls362N_update_credit_confirmed_link_id').getUrl(),
para: {
bp_credit_hd_id : datas[0].data.bp_credit_hd_id,
wanted_status : 'REFUSE',
wanted_status : 'REJECT'
},
success: function () {
Leaf.SideBar.show({
......@@ -159,6 +164,47 @@ $Purpose: 商业伙伴授信维护
hls_doc_get_layout_code('hn1150_get_layout_code_link_id', param, 'hls361_hls_bp_master_credit_agent_detail_link', null);
}
//变更履历按钮
window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function() {
var credit_ds=get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_credit_hd');
var record = $(credit_ds).getSelected();
if (record.length!=1){
$L.showInfoMessage("提示",'请选择一条数据!');
return;
}
Leaf.Masker.mask(Ext.getBody(), '正在执行...');
Leaf.request({
url: $('check_create_record_link_id').getUrl(),
para: {
bp_credit_hd_id: record[0].get('bp_credit_hd_id')
},
success: function () {
Leaf.Masker.unmask(Ext.getBody());
var win = new Leaf.Window({
id: 'hls_bp_credit_record_window',
params: {
bp_credit_hd_id: record.get('bp_credit_hd_id'),
winid: 'hls_bp_credit_record_window'
},
url: $('credit_detail_link').getUrl(),
title: '授信额度变更履历',
fullScreen: true
});
win.on('close', function () {
// ds.query(ds.currentPage);
});
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
}
]]></script>
......
......@@ -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 model="cont.CON620.get_sys_role" rootPath="role_info"/>
</a:init-procedure>
<a:view>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}zj_wfl_approve_history_check" url="${/request/@context_path}/modules/zjwfl/zj_wfl_approve_history_check.lview"/>
<a:link id="prj_project_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
......@@ -132,6 +135,16 @@
var grid_id = ds_id.replace('ds', 'layout_grid_id');
$(grid_id)._export();
};
Leaf.onReady(function() {
if("${/model/role_info/record/@role_code}"!="0018"&&"${/model/role_info/record/@role_code}"!="0019") {
document.getElementById("PROJECT_QUERY_ENTRANCE_F_QUERY_NULL_INVOICE_AGENT_ID_prompt").style.display = "";
document.getElementById("PROJECT_QUERY_ENTRANCE_F_QUERY_NULL_INVOICE_AGENT_ID").style.display = "";
} else {
document.getElementById("PROJECT_QUERY_ENTRANCE_F_QUERY_NULL_INVOICE_AGENT_ID_prompt").style.display = "none";
document.getElementById("PROJECT_QUERY_ENTRANCE_F_QUERY_NULL_INVOICE_AGENT_ID").style.display = "none";
}
});
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_authority_list_validate.lview?document_category=PROJECT&amp;function_code=PRJ501"/>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:s="leaf.plugin.script" xmlns:msg="leaf.application.features.msg"
xmlns:a="http://www.leaf-framework.org/application" xmlns:dr="leaf.plugin.excelreport"
xmlns:excel="leaf.application.task.excel" xmlns:t="uncertain.composite.transform"
xmlns:mail="leaf.plugin.mail" xmlns:p="uncertain.proc" trace="true">
<a:init-procedure>
<s:server-script><![CDATA[
importPackage(java.io);
importPackage(Packages.hl.mail);
try {
var mail_server_bm = $bm('sys.SYS405.sys_get_mail_server');
var mail_server_result = mail_server_bm.queryAsMap().getChildren();
var mail_list_bm = $bm('sys.SYS405.zj_sys_mailing_list');
var mail_list_result = mail_list_bm.queryAsMap().getChildren();
println('###############' + mail_list_result.length + '###############');
for (var i = 0; i < mail_list_result.length; i++) {
var mb = new HlMailBean();
mb.setHost(mail_server_result[0].mail_smtp_host); // 设置SMTP主机(163),若用126,则设为:smtp.126.com
mb.setPort(mail_server_result[0].mail_port_number); //设置端口号
mb.setUsername(mail_server_result[0].mail_username); // 设置发件人邮箱的用户名
mb.setPassword(mail_server_result[0].mail_password); // 设置发件人邮箱的密码,需将*号改成正确的密码
mb.setFrom(mail_server_result[0].mail_address); // 设置发件人的邮箱
mb.setTo(mail_list_result[i].mail_to); // 设置收件人的邮箱
println(mail_list_result[i].mail_to);
if (mail_list_result[i].mail_cc) {
mb.setCc(mail_list_result[i].mail_cc); // 设置抄送人的邮箱
} else {
mb.setCc(mail_list_result[i].mail_to);
}
mb.setSubject(mail_list_result[i].subject); // 设置邮件的主题
mb.setContent(mail_list_result[i].body); // 设置邮件的正文
//mb.setContent(mail_list_result[i].content_type); // 设置邮件的格式 text/html为html,text/plain为纯文本
//设置附件
//mb.attachFile("D:\\abc.xlsx"); // 往邮件中添加附件
var mail_file_bm = $bm('sys.SYS405.zj_sys_mailing_file');
var mail_file_result = mail_file_bm.queryAsMap({
mailing_list_id: mail_list_result[i].mailing_list_id
}).getChildren();
for (var j = 0; j < mail_file_result.length; j++) {
mb.attachFile(mail_file_result[j].file_path);
}
var sm = new HlSendMail();
if (mail_list_result[i].content_type == "text/html") {
println(mail_list_result[i].mailing_list_id);
if (sm.sendHtmlMail(mb)) {
$bm('sys.SYS405.zj_sys_mailing_list').update({
mailing_list_id: mail_list_result[i].mailing_list_id
});
} else {
$bm('sys.SYS405.zj_sys_mailing_list').execute({
mailing_list_id: mail_list_result[i].mailing_list_id
});
}
} else {
if (sm.sendMail(mb)) {
$bm('sys.SYS405.zj_sys_mailing_list').update({
mailing_list_id: mail_list_result[i].mailing_list_id
});
} else {
$bm('sys.SYS405.zj_sys_mailing_list').execute({
mailing_list_id: mail_list_result[i].mailing_list_id
});
}
}
}
} catch (e) {
raise_app_error(e);
}
]]></s:server-script>
</a:init-procedure>
<a:service-output/>
</a:service>
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:s="leaf.plugin.script" xmlns:msg="leaf.application.features.msg"
xmlns:a="http://www.leaf-framework.org/application" xmlns:dr="leaf.plugin.excelreport"
xmlns:excel="leaf.application.task.excel" xmlns:t="uncertain.composite.transform"
xmlns:mail="leaf.plugin.mail" xmlns:p="uncertain.proc" trace="true">
<a:init-procedure>
<s:server-script><![CDATA[
importPackage(java.io);
importPackage(Packages.hl.mail);
try {
var mail_server_bm = $bm('sys.SYS405.sys_get_mail_server');
var mail_server_result = mail_server_bm.queryAsMap().getChildren();
var mail_list_bm = $bm('sys.SYS405.zj_sys_mailing_list');
var mail_list_result = mail_list_bm.queryAsMap().getChildren();
println('###############' + mail_list_result.length + '###############');
for (var i = 0; i < mail_list_result.length; i++) {
var mb = new HlMailBean();
mb.setHost(mail_server_result[0].mail_smtp_host); // 设置SMTP主机(163),若用126,则设为:smtp.126.com
mb.setPort(mail_server_result[0].mail_port_number); //设置端口号
println(mail_server_result[0].mail_port_number);
mb.setUsername(mail_server_result[0].mail_username); // 设置发件人邮箱的用户名
mb.setPassword(mail_server_result[0].mail_password); // 设置发件人邮箱的密码,需将*号改成正确的密码
mb.setFrom(mail_server_result[0].mail_address); // 设置发件人的邮箱
mb.setTo(mail_list_result[i].mail_to); // 设置收件人的邮箱
println(mail_list_result[i].mail_to);
if (mail_list_result[i].mail_cc) {
mb.setCc(mail_list_result[i].mail_cc); // 设置抄送人的邮箱
} else {
mb.setCc(mail_list_result[i].mail_to);
}
mb.setSubject(mail_list_result[i].subject); // 设置邮件的主题
mb.setContent(mail_list_result[i].body); // 设置邮件的正文
//mb.setContent(mail_list_result[i].content_type); // 设置邮件的格式 text/html为html,text/plain为纯文本
//设置附件
//mb.attachFile("D:\\abc.xlsx"); // 往邮件中添加附件
var mail_file_bm = $bm('sys.SYS405.zj_sys_mailing_file');
var mail_file_result = mail_file_bm.queryAsMap({
mailing_list_id: mail_list_result[i].mailing_list_id
}).getChildren();
for (var j = 0; j < mail_file_result.length; j++) {
mb.attachFile(mail_file_result[j].file_path);
}
var sm = new HlSendMail();
if (mail_list_result[i].content_type == "text/html") {
println(mail_list_result[i].mailing_list_id);
if (sm.sendHtmlMail(mb)) {
$bm('sys.SYS405.zj_sys_mailing_list').update({
mailing_list_id: mail_list_result[i].mailing_list_id
});
} else {
$bm('sys.SYS405.zj_sys_mailing_list').execute({
mailing_list_id: mail_list_result[i].mailing_list_id
});
}
} else {
if (sm.sendMail(mb)) {
$bm('sys.SYS405.zj_sys_mailing_list').update({
mailing_list_id: mail_list_result[i].mailing_list_id
});
} else {
$bm('sys.SYS405.zj_sys_mailing_list').execute({
mailing_list_id: mail_list_result[i].mailing_list_id
});
}
}
}
} catch (e) {
raise_app_error(e);
}
]]></s:server-script>
</a:init-procedure>
<a:service-output/>
</a:service>
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