Commit 5b5cf8aa authored by niminmin's avatar niminmin

Merge branch 'feature/发票功能修改' into develop

# Conflicts:
#	src/main/webapp/modules/acr/ACR514/acr_invoice_reverse.lview
parents 68f85b63 4bf9e19a
Pipeline #4033 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=
......
......@@ -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"?>
<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
......@@ -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="应收项目"/>
......
......@@ -129,12 +129,12 @@
return;
}
}
for (var i = 0;i < records.length;i++) {
if (records[i].get('vat_interface_status')=='BACK') {
Leaf.showMessage('${l:HLS.PROMPT}', '单据号:' + records[i].get('document_number') + '金税状态已回写,不可反冲');
return;
}
}
// for (var i = 0;i < records.length;i++) {
// if (records[i].get('vat_interface_status')=='BACK') {
// Leaf.showMessage('${l:HLS.PROMPT}', '单据号:' + records[i].get('document_number') + '金税状态已回写,不可反冲');
// return;
// }
// }
for (var i = 0;i < records.length;i++) {
records[i].getField('vat_red_notice_num').setRequired(false);
......@@ -231,14 +231,20 @@
<a:map from="description" to="confirmed_by_name"/>
</a:mapping>
</a:field>
<a:field name="invoice_bp_code_f" lovGridHeight="320" lovHeight="480" lovService="acr.ACR512.acr_invoice_bp_master_list" lovWidth="500" title="客户选择">
<!--<a:field name="invoice_bp_code_f" lovGridHeight="320" lovHeight="480" lovService="acr.ACR512.acr_invoice_bp_master_list" lovWidth="500" title="客户选择">-->
<!--<a:mapping>-->
<!--<a:map from="bp_code" to="invoice_bp_code_f"/>-->
<!--</a:mapping>-->
<!--</a:field>-->
<!--<a:field name="invoice_bp_code_t" lovGridHeight="320" lovHeight="480" lovService="acr.ACR512.acr_invoice_bp_master_list" lovWidth="500" title="客户选择">-->
<!--<a:mapping>-->
<!--<a:map from="bp_code" to="invoice_bp_code_t"/>-->
<!--</a:mapping>-->
<!--</a:field>-->
<a:field name="invoice_bp_name" lovGridHeight="320" lovHeight="480" lovService="acr.ACR512.acr_invoice_bp_master_list" lovWidth="500" title="客户选择">
<a:mapping>
<a:map from="bp_code" to="invoice_bp_code_f"/>
</a:mapping>
</a:field>
<a:field name="invoice_bp_code_t" lovGridHeight="320" lovHeight="480" lovService="acr.ACR512.acr_invoice_bp_master_list" lovWidth="500" title="客户选择">
<a:mapping>
<a:map from="bp_code" to="invoice_bp_code_t"/>
<a:map from="bp_code" to="invoice_bp_code"/>
<a:map from="bp_name" to="invoice_bp_name"/>
</a:mapping>
</a:field>
<a:field name="project_number_f" lovGridHeight="320" lovHeight="480" lovService="acr.ACR512.acr_invoice_project_list" lovWidth="500" title="项目选择">
......@@ -291,15 +297,21 @@
<a:hBox labelSeparator="" labelWidth="120">
<a:textField name="document_number_f" bindTarget="acr514_invoice_query_ds" prompt="HLS.DOCUMENT_NUMBER_FROM" width="135"/>
<!--<div><![CDATA[${l:HLS.DOCUMENT_NUMBER_TO}]]></div>-->
<a:textField name="document_number_t" bindTarget="acr514_invoice_query_ds" prompt="单据编号到" width="135"/>
<a:lov name="project_number_f" bindTarget="acr514_invoice_query_ds" prompt="HLS.PROJECT_NUMBER_FROM" width="135"/>
<a:textField name="document_number_t" bindTarget="acr514_invoice_query_ds" prompt="单据号到" width="135"/>
<!-- <a:lov name="project_number_f" bindTarget="acr514_invoice_query_ds" prompt="HLS.PROJECT_NUMBER_FROM" width="135"/>-->
<!--<div><![CDATA[${l:HLS.DOCUMENT_NUMBER_TO}]]></div>-->
<a:lov name="project_number_t" bindTarget="acr514_invoice_query_ds" prompt="申请编号到" width="135"/>
<a:comboBox name="business_type_desc" bindTarget="acr514_invoice_query_ds" prompt="HLS.BUSINESS_TYPE_DESC" width="135"/>
<!-- <a:lov name="project_number_t" bindTarget="acr514_invoice_query_ds" prompt="申请编号到" width="135"/>-->
<!-- <a:comboBox name="business_type_desc" bindTarget="acr514_invoice_query_ds" prompt="HLS.BUSINESS_TYPE_DESC" width="135"/>-->
<a:comboBox name="currency_name" bindTarget="acr514_invoice_query_ds" prompt="HLS.CURRENCY" width="135"/>-->
<a:textField name="invoice_number_f" bindTarget="acr514_invoice_query_ds" prompt="ACR.INVOICE_NUMBER_FROM" width="135"/>
<a:textField name="invoice_number_t" bindTarget="acr514_invoice_query_ds" prompt="发票编号到" width="135"/>
</a:hBox>
<a:hBox labelWidth="100">
<a:textField name="invoice_number_f" bindTarget="acr514_invoice_query_ds" prompt="ACR.INVOICE_NUMBER_FROM" width="135"/>
<a:hBox labelSeparator="" labelWidth="120">
<!--<div><![CDATA[${l:ACR.INVOICE_NUMBER_TO}]]></div>-->
<a:lov name="contract_number_f" bindTarget="acr514_invoice_query_ds" prompt="合同编号" width="135"/>
......@@ -308,16 +320,28 @@
<a:lov name="contract_number_t" bindTarget="acr514_invoice_query_ds" prompt="合同编号到" width="135"/>
-->
<a:comboBox name="invoice_kind_desc" bindTarget="acr514_invoice_query_ds" prompt="ACR.INVOICE_KIND" width="135"/>
<a:lov name="created_by_name" bindTarget="acr514_invoice_query_ds" prompt="ACR.CREATED_BY_NAME" width="135"/>
<a:datePicker name="invoice_date_f" bindTarget="acr514_invoice_query_ds" prompt="ACR.INVOICE_DATE_FROM" width="135"/>
<a:datePicker name="invoice_date_t" bindTarget="acr514_invoice_query_ds" prompt="发票日期到" width="135"/>
</a:hBox>
<a:hBox labelWidth="100">
<a:datePicker name="invoice_date_f" bindTarget="acr514_invoice_query_ds" prompt="ACR.INVOICE_DATE_FROM" width="135"/>
<a:hBox labelSeparator="" labelWidth="120">
<!--<div><![CDATA[${l:ACR.INVOICE_DATE_TO}]]></div>-->
<a:datePicker name="invoice_date_t" bindTarget="acr514_invoice_query_ds" prompt="发票日期到" width="135"/>
<!--<a:lov name="invoice_bp_code_f" bindTarget="acr514_invoice_query_ds" prompt="HLS.CUSTOMER_NUMBER_FROM" width="135"/>-->
<!--&lt;!&ndash;<div><![CDATA[${l:HLS.CUSTOMER_NUMBER_TO}]]></div>&ndash;&gt;-->
<!--<a:lov name="invoice_bp_code_t" bindTarget="acr514_invoice_query_ds" prompt="客户编号到" width="135"/>-->
<a:lov name="invoice_bp_name" bindTarget="acr514_invoice_query_ds" prompt="客户编号" width="135"/>
<a:lov name="invoice_bp_code_f" bindTarget="acr514_invoice_query_ds" prompt="客户编号" width="135"/>
<!--<div><![CDATA[${l:HLS.CUSTOMER_NUMBER_TO}]]></div>-->
<!-- <a:lov name="invoice_bp_code_t" bindTarget="acr514_invoice_query_ds" prompt="客户编号到" width="135"/>-->
<a:textField name="invoice_title" bindTarget="acr514_invoice_query_ds" prompt="ACR.INVOICE_TITLE" width="135"/>
<a:comboBox name="currency_name" bindTarget="acr514_invoice_query_ds" prompt="HLS.CURRENCY" width="135"/>
</a:hBox>
<a:hBox labelWidth="100">
<a:lov name="confirmed_by_name" bindTarget="acr514_invoice_query_ds" prompt="ACR.CHECKER" width="135"/>
<a:datePicker name="accounting_date_f" bindTarget="acr514_invoice_query_ds" prompt="HLS.ACCOUNT_DATE_FROM" width="135"/>
<a:datePicker name="accounting_date_t" bindTarget="acr514_invoice_query_ds" prompt="记账日期到" width="135"/>
......@@ -327,6 +351,14 @@
<a:numberField name="total_amount_f" allowFormat="true" bindTarget="acr514_invoice_query_ds" prompt="ACR.TOTAL_AMOUNT_FROM" width="135"/>
<!--<div><![CDATA[${l:ACR.TOTAL_AMOUNT_TO}]]></div>-->
<a:numberField name="total_amount_t" allowFormat="true" bindTarget="acr514_invoice_query_ds" prompt="发票金额到" width="135"/>
<a:comboBox name="vat_interface_status_desc" bindTarget="acr514_invoice_query_ds" prompt="ACR310.VAT_INTERFACE_STATUS_NAME" width="135"/>
</a:hBox>
<a:hBox labelWidth="100">
<a:lov name="created_by_name" bindTarget="acr514_invoice_query_ds" prompt="ACR.CREATED_BY_NAME" width="135"/>
<a:lov name="confirmed_by_name" bindTarget="acr514_invoice_query_ds" prompt="ACR.CHECKER" width="135"/>
<!--<a:comboBox name="invoice_status_desc" bindTarget="acr514_invoice_query_ds" prompt="发票状态" width="135"/>-->
<a:comboBox name="invoice_status_desc" bindTarget="acr514_invoice_query_ds" prompt="ACR.INVOICE_STATUS" width="135"/>
<a:comboBox name="vat_interface_status_desc" bindTarget="acr514_invoice_query_ds" prompt="金税状态" width="135"/>
</a:hBox>
......
......@@ -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"/>
......
......@@ -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>
......
......@@ -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"/>
......
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