Commit 034819e0 authored by stone's avatar stone

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

parents 1db71361 5b510f70
package com.hand.hls.hlcm.util;
import net.sf.json.JSONObject;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.mail.*;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
import java.util.Properties;
public class MailSend {
private static final Logger logger = LoggerFactory.getLogger(MailSend.class);
public static boolean isEmpty(String str) {
return str == null || "".equals(str.trim());
}
public static boolean isNotEmpty(String str) {
return !isEmpty(str);
}
public String sendMain(String jsonData) {
JSONObject jsonObject = JSONObject.fromObject(jsonData);
JSONObject js=new JSONObject();
// 发件人电子邮箱
String from = jsonObject.optString("serverAddress");
//获取系统属性,主要用于设置邮件相关的参数。
Properties properties = System.getProperties();
//smtp协议地址
properties.setProperty("mail.smtp.host", jsonObject.optString("serverHost"));
//端口号
properties.setProperty("mail.smtp.port", jsonObject.optString("serverPort"));
properties.setProperty("mail.smtp.starttls.enable", "true");
properties.setProperty("mail.smtp.socketFactory.fallback", "true");
properties.setProperty("mail.smtp.auth", "true");
//发送者账号密码
Session session = Session.getDefaultInstance(properties, new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(jsonObject.optString("serverName"), jsonObject.optString("serverPassWord"));
}
});
//创建MimeMessage消息对象,消息头配置了收发邮箱的地址,消息体包含了邮件标题和邮件内容。接收者类型:TO代表直接发送,CC代表抄送,BCC代表秘密抄送。
try {
MimeMessage message = new MimeMessage(session);
message.addHeader("X-Mailer", "Microsoft Outlook Express 6.00.2900.2869");
message.setFrom(new InternetAddress(from));
message.addRecipient(Message.RecipientType.TO, new InternetAddress(jsonObject.optString("toAddress")));
if (isNotEmpty(jsonObject.optString("toCcAddress"))){
String[] params = jsonObject.optString("toCcAddress").split(";");
if (params.length > 0) {
InternetAddress[] sendCc = new InternetAddress[params.length];
for (int i = 0; i < params.length; i++) {
sendCc[i] = new InternetAddress(params[i]);
}
message.addRecipients(MimeMessage.RecipientType.CC, sendCc);
}}
message.setSubject(jsonObject.optString("toSubject"));
message.setText(jsonObject.optString("toBody"));
Transport.send(message);
logger.info("send Success!");
js.put("status",'S');
} catch (MessagingException e) {
logger.error("send Error!", e);
js.put("status",'E');
js.put("errorMsg",e.getMessage());
}
return js.toString();
}
// 做测试用
@Test
public void test() {
MailSend mailSend=new MailSend();
//MailSend.sendMain("790553035@qq.com");
}
}
......@@ -14,6 +14,7 @@
from (select c.contract_id, c.contract_number, c.contract_name
from con_contract c
where c.data_class = 'NORMAL'
and c.contract_status IN ('REPURING','ETING','INCEPT','PENDING')
and not exists (select 1 from acp_invoice_ln an where an.contract_id=c.contract_id and an.confirmation_status='APPROVING')
) V
#WHERE_CLAUSE#
......
......@@ -5,7 +5,7 @@
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
......
......@@ -5,8 +5,13 @@
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
update hls_fin_calculator_hd hd set hd.other_payment2=${@other_payment2} where hd.calc_session_id=${@calc_session_id}
]]></bm:update-sql>
</bm:operation>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT
......
......@@ -59,7 +59,7 @@
return;
}
var tempa=records[i].get('total_amount')||0;
var tempb=records[i].get('net_amount')||0+records[i].get('tax_amount')||0;
var tempb=((records[i].get('net_amount')||0)+(records[i].get('tax_amount')||0));
if(tempa!=tempb){
Leaf.showMessage('提示', '发票明细行存在价税合计不等于不含税金额和税额之和!');
return;
......@@ -109,7 +109,7 @@
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var acp_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'acp_invoice_ln');
var record = $(ds_id).getAt(0);
if(name == 'invoice'&&value) {
if(name == 'invoice'&&value&&record.get('contract_id')) {
var contract_id = record.get('contract_id');
var strs = value.split(',');
var invoice_type = strs[1];
......
......@@ -24,20 +24,21 @@
<a:link id="con_doc_batch_create_link_id" url="${/request/@context_path}/modules/cont/CON500/con_doc_batch_create.lsc"/>
<script><![CDATA[
function con_print_detail_print(){
lock_current_window();
//lock_current_window();
Leaf.Masker.mask($('${/parameter/@winid}').wrap, '正在生成并打印合同文本,请稍等。。。');
var result_ds = $('con_contract_update_print_detail_line_ds');
var records = result_ds.getAll();
var total_count = 0;
if ($('con_contract_update_print_detail_line_ds').getAll().length <= 0) {
Leaf.showMessage('提示', '请先生成合同文本!');
unlock_current_window();
return;
}
for (var m = 0;m < records.length;m++) {
if (records[m].get('file_exists_flag') != 'Y') {
total_count = total_count + 1;
}
}
// var records = result_ds.getAll();
// var total_count = 0;
// if ($('con_contract_update_print_detail_line_ds').getAll().length <= 0) {
// Leaf.showMessage('提示', '请先生成合同文本!');
// unlock_current_window();
// return;
// }
// for (var m = 0;m < records.length;m++) {
// if (records[m].get('file_exists_flag') != 'Y') {
// total_count = total_count + 1;
// }
// }
// alert('${/parameter/@file_path}');
var file_path = $('contract_file_path_ds').getAt(0).get('contract_file_path');
Leaf.request({
......@@ -70,7 +71,7 @@
}
function con_print_detail_create() {
lock_current_window();
Leaf.Masker.mask($('${/parameter/@winid}').wrap, '${l:HLS.EXECUTING}');
Leaf.request({
url: $('con_contract_create_content_link_id').getUrl(),
para: {
......@@ -197,7 +198,7 @@
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar style="width:848px">
<a:gridButton click="con_print_detail_create" text="CON505.CON_CONTENT_CREATE"/>
<!--<a:gridButton click="con_print_detail_create" text="CON505.CON_CONTENT_CREATE"/>-->
<a:gridButton id="con500_print_btn" click="con_print_detail_print" text="生成文本"/>
<!-- <a:gridButton click="con_download_zip" text="PRJ702.THE_FILE_DOWNLOAD"/> -->
<a:gridButton click="con500_delete_print" text="HLS.REMOVE"/>
......
......@@ -76,7 +76,7 @@
});
}
win.on('close', function () {
debugger;
if(list_ds=='acp522_acp_invoice_import_detail_ds'){
location.reload();
}else{
......
......@@ -2,7 +2,7 @@
<a:service xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" trace="true">
<a:init-procedure>
<a:model-query fetchAll="true" model="cont.CON500.con_contract_get_guid_file_name" rootPath="guid_file_name_path"/>
<a:model-query fetchAll="true" model="cont.CON500.con_doc_file_templet_get_atm" rootPath="file_templet_get_atm_path"/>
<!--<a:model-query fetchAll="true" model="cont.CON500.con_doc_file_templet_get_atm" rootPath="file_templet_get_atm_path"/>-->
<s:server-script><![CDATA[
importPackage(Packages.hls.plugin.docx4j);
importPackage(java.io);
......@@ -18,7 +18,17 @@
fis.close();
fos.close();
}
var from_file_data = $ctx.get('/model/file_templet_get_atm_path').getChildren();
//第一步生成合同文本
$bm('cont.CON505.con_contract_create_content').update({
contract_id: $ctx.parameter.contract_id,
content_type:'NORMAL'
});
//var from_file_data = $ctx.get('/model/file_templet_get_atm_path').getChildren();
var from_file_data_map=$bm('cont.CON500.con_doc_file_templet_get_atm').queryAsMap({
contract_id:$ctx.parameter.contract_id,
batch_flag:$ctx.parameter.batch_flag,
});
var from_file_data = from_file_data_map.getChildren();
for (var i = 0;i < from_file_data.length;i++) {
var to_file_path = $ctx.parameter.file_path;
var record_data = from_file_data[i];
......@@ -40,9 +50,9 @@
});
try {
println(111);
// println(111);
var brwt = new BookmarksReplaceWithText($instance('leaf.database.service.IDatabaseServiceFactory'), $instance('uncertain.ocm.IObjectRegistry'), $ctx.getData());
println($ctx.getData());
// println($ctx.getData());
brwt.replaceBookmarkFromContent(to_file_path.toString(), record_data.content_id);
} catch (e) {
raise_app_error(e);
......
<?xml version="1.0" encoding="UTF-8"?><!-- $Author: zlf $Date: 2014-11-10 下午5:42:24 $Revision: 1.0 $Purpose: --><a:screen xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" customizationEnabled="true" dynamiccreateenabled="true" trace="true"> <a:init-procedure> <a:model-query fetchAll="true" model="cont.CON500.con_contract_get_guid_file_name" rootPath="file_name_path"/> <s:server-script import="contract_print_path.js"><![CDATA[ $ctx.parameter.file_path = con_print_path['con_print_path']; $ctx.parameter.tomcat_source = con_print_path['tomcat_source']; ]]> </s:server-script> <s:server-script import="con_print_path.js"><![CDATA[ set_parameter_file_path(); ]]> </s:server-script> </a:init-procedure> <a:view> <a:link id="wfl_readonly_pageLink_projectQueryScreen_update_project" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_readonly.lview"/> <a:link id="${/parameter/@layout_code}_con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/> <a:link id="${/parameter/@layout_code}_con_contract_content_confirm_link_id" url="${/request/@context_path}/modules/cont/CON501N/con_contract_content_confirm.lview"/> <a:link id="contract_lease_item_query_link" url="${/request/@context_path}/modules/cont/CON505/con_lease_item_query.lview"/> <a:link id="contract_history_window_link" url="${/request/@context_path}/modules/cont/CON501N/con_document_history_query.lview"/> <a:link id="con505_hls_bp_master_query_link" url="${/request/@context_path}/modules/cont/CON505/hls_bp_master_query.lview"/> <a:link id="${/parameter/@layout_code}_prj500_cdd_uploadFile_id" url="${/request/@context_path}/uploadFile.lview"/> <a:link id="${/parameter/@layout_code}_prj500_cdd_downloadFile_id" url="${/request/@context_path}/downloadFile.lview"/> <!--打印使用--> <a:link id="${/parameter/@layout_code}_con505_contract_content_id" model="cont.CON505.con505_contract_content" modelaction="update"/> <a:link id="${/parameter/@layout_code}_creat_con_contract_content_link_id" model="cont.CON505.con505_contract_content" modelaction="execute"/> <a:link id="${/parameter/@layout_code}_file_copy_from_template_link_id" url="${/request/@context_path}/modules/cont/CON505/file_copy_from_template.lsc"/> <a:link id="${/parameter/@layout_code}_con_batch_dl_link_id" url="${/request/@context_path}/modules/cont/CON505/con_atm_batch_dl.lsc"/> <a:link id="${/parameter/@layout_code}_con_cashflow_wirte_off_detail_link" url="${/request/@context_path}/modules/cont/CON302N/con_cashflow_wirte_off_detail.lview"/> <a:link id="con_approval_link_id" model="cont.CON505.contract_approval" modelaction="update"/> <link href="${/request/@context_path}/css/lightbox.css" rel="stylesheet" type="text/css"/> <script src="${/request/@context_path}/javascripts/lightbox.js" type="text/javascript"/> <script type="text/javascript"><![CDATA[ Ext.ux.Lightbox.register('a[ref=img]', true); function lock_current_window() { Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}'); } function unlock_current_window() { Leaf.Masker.unmask(Ext.getBody()); } window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () { var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract'); var contract_id = $(ds_id).getCurrentRecord().get('contract_id'); new Leaf.Window({ id: 'contract_history_window', url: $('contract_history_window_link').getUrl(), params: { contract_id: contract_id }, fullScreen: true }); }; // window['${/parameter/@layout_code}_dynamic_link_renderer'] = function(value, record, name, config_record) { // if (name == 'car_detail') { // return '<a href="javascript:open_contract_window(\'' + record.id + '\',\'' + record.ds.id + '\')">' + config_record.get('prompt') + '</a>'; // } // return value; // }; window['${/parameter/@layout_code}_received_amount_detail'] = function (ds_id, id, name, query_only) { var url = $('${/parameter/@layout_code}_con_cashflow_wirte_off_detail_link').getUrl(); var record = $(ds_id).findById(id); if (record) { var win = new Leaf.Window({ id: 'con_cashflow_wirte_off_detail_window', url: url, params: { cashflow_id: record.get('cashflow_id'), winid: 'con_cashflow_wirte_off_detail_window' }, draggable: true, fullScreen: true }); } }; window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record, bp_seq) { var link_function = ''; window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record; if (name == 'project_number') { return '<a href="javascript:wfl_prj501_grid_update(\'' + record.id + '\',\'' + record.ds.id + '\')">' + value + '</a>'; } else if (name == 'gps_attch') { link_function = '${/parameter/@layout_code}_ast_con_cdd4_attachtment_upload'; if (record.get('atm_num3') > 0) { return '<a style="color:red" href="javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>'; } else { return '<a style="font-weight:bolder;font-size:1.2em" href="javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>'; } } else if (name == 'description') { if (record.get('important_flag') == 'Y') { return '<font color="RED">' + value + '</font>'; } return value; } else if (name == 'bp_link' && record.get('bp_id') && record.get('record_id')) { link_function = '${/parameter/@layout_code}_open_bp_detail_window'; return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\');">' + config_record.get('prompt') + '</a>'; } else if (name == 'car_detail' && record.get('contract_lease_item_id')) { link_function = '${/parameter/@layout_code}_open_lease_item_detail_window'; return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\');">' + config_record.get('prompt') + '</a>'; } else if (name == 'attachment') { link_function = '${/parameter/@layout_code}_prj500_cdd_attachtment_upload'; return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>'; } else if (name == 'attach_file_name' || name == 'attach_file_name_print' || name=='attachment_new') { var content_type = record.get('content_type'); var content_id = record.get('content_id'); //电子合同 // if(content_type == '01'){ // var link = '${/request/@context_path}/modules/xxx/pdf_download.lsc?type=SIN&content_id=' + content_id; // var url = ''; // url = url + '<a href=' + link + '>' + '下载' + '</a>' + ','; // return url; // }else { if (value != null) { var link = '${/request/@context_path}/atm_download.lsc?attachment_id='; var str = value.split(';;'); var url = ''; for (var i = 0; i < str.length; i++) { var temp = str[i].split('--'); if (!Leaf.isEmpty(temp[0])) { var file_name = temp[0].toUpperCase(); var file_suffix = temp[0].substr(temp[0].lastIndexOf('.') + 1).toUpperCase(); if (file_name.indexOf('.PDF') >= 0) { url = url + '<a href=javascript:view_pdf(\'' + temp[1] + '\')>' + temp[0] + '</a>' + ','; } else if (file_suffix == 'BMP' || file_suffix == 'JPG' || file_suffix == 'JPEG' || file_suffix == 'PNG' || file_suffix == 'GIF') { url = url + '<a href=' + link + temp[1] + ' ref="img">' + temp[0] + '</a>' + ','; } else { url = url + '<a href=' + link + temp[1] + '>' + temp[0] + '</a>' + ','; } } } return url; } //} } else if (name == 'received_amount') { link_function = '${/parameter/@layout_code}_received_amount_detail'; if (value) { return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + Leaf.formatMoney(value) + '</a>'; } return ''; }else if(name == 'attach_file_name_new'){ link_function = '${/parameter/@layout_code}_prj500_cdd_attachtment_new_upload'; return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>'; } }; function wfl_prj501_grid_update(record_id, ds_id) { var record = $(ds_id).findById(record_id); var param = {}; param['bp_class'] = record.get('bp_class'); param['project_id'] = record.get('project_id'); param['function_code'] = 'PRJ502D'; param['function_usage'] = 'QUERY'; param['url_title'] = '租赁申请查询'; hls_doc_get_layout_code('${/parameter/@layout_code}_con_contract_get_layout_code_link_id', param, 'wfl_readonly_pageLink_projectQueryScreen_update_project', record.ds.id, '${/parameter/@layout_code}'); } window['${/parameter/@layout_code}_ast_con_cdd4_attachtment_upload'] = function (ds_id, id, name, query_only) { var record = $(ds_id).findById(id); // if (record.get('con_contract_id')) { var url; if (query_only == 'Y') { url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=CON_CONTRACT&header_id=' + record.get('contract_id'); } else { url = $('${/parameter/@layout_code}_prj500_cdd_uploadFile_id').getUrl() + '?table_name=CON_CONTRACT&header_id=' + record.get('contract_id'); } var win = new Leaf.Window({ url: url, title: 'gps附件上传', id: '${/parameter/@layout_code}${/parameter/@tree_code}_ast_con_cdd4_attachtment_upload_id', width: 850, height: 400 }); // win.on('close', function(){ // $(ds_id).query(); // }); // } else { // Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!'); // } }; window['${/parameter/@layout_code}_open_lease_item_detail_window'] = function (id, name) { var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name]; var param = record.data; var contract_lease_item_id = record.get('contract_lease_item_id'); new Leaf.Window({ id: 'contract_lease_item_maintain_window', url: $('contract_lease_item_query_link').getUrl(), params: { contract_lease_item_id: contract_lease_item_id, winid: 'contract_lease_item_maintain_window' }, draggable: true, fullScreen: true }); }; window['${/parameter/@layout_code}_open_bp_detail_window'] = function (id, name) { var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name]; var param = {};//record.data; param['bp_id'] = record.get('bp_id'); param['cdd_list_id'] = record.get('cdd_list_id'); param['company_id'] = '${/session/company_id}'; param['document_id'] = record.get('bp_id'); 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['download'] = 'Y'; 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}'); }; // function open_contract_window(record_id, ds_id) { // var record = $(ds_id).findById(record_id); // var param = record.data; // var contract_lease_item_id = record.get('contract_lease_item_id'); // new Leaf.Window({ // id: 'contract_lease_item_maintain_window', // url: $('contract_lease_item_maintain_link').getUrl(), // params: { // contract_lease_item_id: contract_lease_item_id // }, // fullScreen: true // }); // // param['function_code'] = 'CON501D'; // // param['function_usage'] = 'MODIFY'; // // param['maintain_type'] = 'UPDATE'; // // param['url_title'] = '${l:CON301.CONTRACT_DETAIL}'; // // hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_modify_link',ds_id); // } window['${/parameter/@layout_code}_prj500_cdd_attachtment_upload'] = function (ds_id, id, name, query_only) { var record = $(ds_id).findById(id); if (record.get('check_id')) { var url; //add by lijingjing 2019-11-15 if(record.get('attachment_tab_group')=='CREDIT_CHECK' && '${/parameter/@query_only}'=='Y'){ url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id'); }else if(record.get('attachment_tab_group')=='SIGN' && '${/parameter/@con_query_only}'=='N'){ url = $('${/parameter/@layout_code}_prj500_cdd_uploadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id'); }else if(record.get('attachment_tab_group')=='SIGN' && '${/parameter/@con_query_only}'=='Y'){ url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id'); } else if (query_only == 'Y'||'${/parameter/@download}'=='Y') { url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id'); } else { url = $('${/parameter/@layout_code}_prj500_cdd_uploadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id'); } var win = new Leaf.Window({ url: url, title: '${l:HLS.SUPPORTING_DOCUMENT}', id: '${/parameter/@layout_code}${/parameter/@tree_code}_prj500_cdd_uploadFile_screen_id', width: 850, height: 400 }); win.on('close', function () { record.ds.query(); }); } else { Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!'); } }; window['${/parameter/@layout_code}_prj500_cdd_attachtment_new_upload'] = function (ds_id, id, name, query_only) { var record = $(ds_id).findById(id); if (record.get('check_id')) { var url //add by lijingjing 2019-11-15 if (query_only == 'Y'||'${/parameter/@download}'=='Y') { url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=CON_CONTRACT&header_id=' + record.get('check_id'); } else { url = $('${/parameter/@layout_code}_prj500_cdd_uploadFile_id').getUrl() + '?table_name=CON_CONTRACT&header_id=' + record.get('check_id'); } var win = new Leaf.Window({ url: url, title: '${l:HLS.SUPPORTING_DOCUMENT}', id: '${/parameter/@layout_code}${/parameter/@tree_code}_prj500_cdd_uploadFile_screen_id', width: 850, height: 400 }); win.on('close', function () { record.ds.query(); }); } else { Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!'); } }; window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function () { // var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract'); var record = $(ds_id).getCurrentRecord(); var content_id; //alert($('${/parameter/@layout_code}_con505_contract_content_id').getUrl); Leaf.request({ url: $('${/parameter/@layout_code}_con505_contract_content_id').getUrl(), para: { content_id: content_id, contract_id: record.get('contract_id'), contract_bp_id: record.get('content_bp_pk'), clause_usage: 'GH_WITHHOLD_AGREE' }, success: function (rsc) { // //alert(rsc.result.content_id); Leaf.request({ url: $('${/parameter/@layout_code}_creat_con_contract_content_link_id').getUrl(), para: { content_id: rsc.result.content_id, file_path: '${/parameter/@file_path}' }, success: function () { Leaf.request({ url: $('${/parameter/@layout_code}_file_copy_from_template_link_id').getUrl(), para: { contract_id: record.get('contract_id'), content_id: rsc.result.content_id, file_path: '${/parameter/@file_path}', batch_flag: 'Y' }, success: function () { var url = $('${/parameter/@layout_code}_con_batch_dl_link_id').getUrl() + '?contract_id=' + record.get('contract_id') + '&content_id=' + rsc.result.content_id; window.open(url, '_self'); unlock_current_window(); } }); unlock_current_window(); }, error: function () { unlock_current_window(); }, failure: function () { unlock_current_window(); }, scope: this }); }, error: function () { unlock_current_window(); }, failure: function () { unlock_current_window(); }, scope: this }); }; window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function () { var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract'); var record = $(ds_id).getCurrentRecord(); var direct_debit_bank_id = record.get('direct_debit_bank_id'); var dd_bank_account_name = record.get('dd_bank_account_name'); var dd_bank_account_num = record.get('dd_bank_account_num'); if (!Ext.isEmpty(record.get('contract_number'))) { new Leaf.Window({ id: '${/parameter/@layout_code}_con_contract_content_confirm_win_id', params: { action: 'VIEW', contract_id: record.get('contract_id'), company_id: record.get('company_id'), document_category: record.get('document_category'), business_type: record.get('business_type'), winid: '${/parameter/@layout_code}_con_contract_content_confirm_win_id' }, url: $('${/parameter/@layout_code}_con_contract_content_confirm_link_id').getUrl(), title: '合同查看', width: 1300, height: 550 }); } else { Leaf.showErrorMessage('错误', '请先点击保存生成合同编号!'); } }; var change_flag = 'N'; //工作流中合同文本生成按钮 //基本信息tab页 新增必输字段的校验 add by liukang 20160328 window['${/parameter/@layout_code}_print_layout_dynamic_click'] = function () { var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract'); var con_lease_item_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_lease_item'); var record = $(ds_id).getCurrentRecord(); var con_lease_record = $(con_lease_item_id).getCurrentRecord(); var direct_debit_bank_id = record.get('direct_debit_bank_id'); var dd_bank_account_name = record.get('dd_bank_account_name'); var dd_bank_account_num = record.get('dd_bank_account_num'); var color_of_apprearance = con_lease_record.get('color_of_apprearance'); var item_frame_number = con_lease_record.get('item_frame_number'); var item_engine_number = con_lease_record.get('item_engine_number'); var license_number = con_lease_record.get('license_number'); /* if (Ext.isEmpty(direct_debit_bank_id)) { Leaf.showMessage('${l:HLS.PROMPT}', '请先填写数据并保存!'); } else */ if (!Ext.isEmpty(record.get('contract_number'))) { var win = new Leaf.Window({ id: '${/parameter/@layout_code}_con_contract_content_confirm_win_id', params: { contract_id: record.get('contract_id'), company_id: record.get('company_id'), document_category: record.get('document_category'), business_type: record.get('business_type'), winid: '${/parameter/@layout_code}_con_contract_content_confirm_win_id', change_flag: change_flag, contract_name: record.get('contract_name'), contract_number: record.get('contract_number') }, url: $('${/parameter/@layout_code}_con_contract_content_confirm_link_id').getUrl(), title: '合同文本生成', width: 1300, height: 550 }); //在关闭页面之后,刷新一下ds win.on('close', function () { if (ds_id) { $(ds_id).query(); } }); } else { Leaf.showErrorMessage('错误', '请先点击保存生成合同编号!'); } }; //add by zhuxianfei 20180207 function view_pdf(attachment_id) { Leaf.request({ url: '${/request/@context_path}/autocrud/fnd.fnd_atm_attachment/query', para: { attachment_id: attachment_id }, success: function (res) { var path = res.result.record.file_path; path = path.substr(path.indexOf('hls_attachment')); var tomcat_source = '${/parameter/@tomcat_source}'; var source_path = 'http://' + window.location.host + '/' + tomcat_source + '/' + path+'?type=pdf'; var oWin = window.open(source_path); }, scope: this }); } window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function(ds, qpara, bp_seq) { var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_bs_score'); if (ds.id == ds_id) { qpara.contract_id = '${/parameter/@contract_id}'; //$(ds_id).setQueryParameter('contract_id', '${/parameter/@contract_id}'); } }; window['${/parameter/@layout_code}_submit_approval_layout_dynamic_click'] = function () { var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract'); var record = $(ds_id).getCurrentRecord(); var contract_id=record.get('contract_id'); if (record.dirty == true) { Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}'); return; } if($(ds_id).validate()){ Leaf.showConfirm('${HLS.PROMPT}', '确认要提交工作流吗?', function() { window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); Leaf.request({ url: $('con_approval_link_id').getUrl(), para: { contract_id:contract_id }, scope: this, success: function() { window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); $('${/parameter/@winid}').close(); }, failure: function() { window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); }, error: function() { window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); } }); }); } } if ('${/parameter/@source_type}' == 'WFL'){ zjwfl5110_ApproveChecker_add('zjwfl5110_submit', function (type) { var con_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract'); if (type == 'agree') { if ($(con_ds_id).validate()) { if($(con_ds_id).isModified()){ Leaf.showMessage('${HLS.PROMPT}','请先保存'); return true; } //提交先保存 return true; } else { return false; } } else return true; }); } ]]></script> <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/> </a:view></a:screen>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?><!-- $Author: zlf $Date: 2014-11-10 下午5:42:24 $Revision: 1.0 $Purpose: --><a:screen xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" customizationEnabled="true" dynamiccreateenabled="true" trace="true"> <a:init-procedure> <a:model-query fetchAll="true" model="cont.CON500.con_contract_get_guid_file_name" rootPath="file_name_path"/> <s:server-script import="contract_print_path.js"><![CDATA[ $ctx.parameter.file_path = con_print_path['con_print_path']; $ctx.parameter.tomcat_source = con_print_path['tomcat_source']; ]]> </s:server-script> <s:server-script import="con_print_path.js"><![CDATA[ set_parameter_file_path(); ]]> </s:server-script> </a:init-procedure> <a:view> <a:link id="wfl_readonly_pageLink_projectQueryScreen_update_project" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_readonly.lview"/> <a:link id="${/parameter/@layout_code}_con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/> <a:link id="${/parameter/@layout_code}_con_contract_content_confirm_link_id" url="${/request/@context_path}/modules/cont/CON501N/con_contract_content_confirm.lview"/> <a:link id="contract_lease_item_query_link" url="${/request/@context_path}/modules/cont/CON505/con_lease_item_query.lview"/> <a:link id="contract_history_window_link" url="${/request/@context_path}/modules/cont/CON501N/con_document_history_query.lview"/> <a:link id="con505_hls_bp_master_query_link" url="${/request/@context_path}/modules/cont/CON505/hls_bp_master_query.lview"/> <a:link id="${/parameter/@layout_code}_prj500_cdd_uploadFile_id" url="${/request/@context_path}/uploadFile.lview"/> <a:link id="${/parameter/@layout_code}_prj500_cdd_downloadFile_id" url="${/request/@context_path}/downloadFile.lview"/> <!--打印使用--> <a:link id="${/parameter/@layout_code}_con505_contract_content_id" model="cont.CON505.con505_contract_content" modelaction="update"/> <a:link id="${/parameter/@layout_code}_creat_con_contract_content_link_id" model="cont.CON505.con505_contract_content" modelaction="execute"/> <a:link id="${/parameter/@layout_code}_file_copy_from_template_link_id" url="${/request/@context_path}/modules/cont/CON505/file_copy_from_template.lsc"/> <a:link id="${/parameter/@layout_code}_con_batch_dl_link_id" url="${/request/@context_path}/modules/cont/CON505/con_atm_batch_dl.lsc"/> <a:link id="${/parameter/@layout_code}_con_cashflow_wirte_off_detail_link" url="${/request/@context_path}/modules/cont/CON302N/con_cashflow_wirte_off_detail.lview"/> <a:link id="con_approval_link_id" model="cont.CON505.contract_approval" modelaction="update"/> <link href="${/request/@context_path}/css/lightbox.css" rel="stylesheet" type="text/css"/> <script src="${/request/@context_path}/javascripts/lightbox.js" type="text/javascript"/> <script type="text/javascript"><![CDATA[ Ext.ux.Lightbox.register('a[ref=img]', true); function lock_current_window() { Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}'); } function unlock_current_window() { Leaf.Masker.unmask(Ext.getBody()); } window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () { var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract'); var contract_id = $(ds_id).getCurrentRecord().get('contract_id'); new Leaf.Window({ id: 'contract_history_window', url: $('contract_history_window_link').getUrl(), params: { contract_id: contract_id }, fullScreen: true }); }; // window['${/parameter/@layout_code}_dynamic_link_renderer'] = function(value, record, name, config_record) { // if (name == 'car_detail') { // return '<a href="javascript:open_contract_window(\'' + record.id + '\',\'' + record.ds.id + '\')">' + config_record.get('prompt') + '</a>'; // } // return value; // }; window['${/parameter/@layout_code}_received_amount_detail'] = function (ds_id, id, name, query_only) { var url = $('${/parameter/@layout_code}_con_cashflow_wirte_off_detail_link').getUrl(); var record = $(ds_id).findById(id); if (record) { var win = new Leaf.Window({ id: 'con_cashflow_wirte_off_detail_window', url: url, params: { cashflow_id: record.get('cashflow_id'), winid: 'con_cashflow_wirte_off_detail_window' }, draggable: true, fullScreen: true }); } }; window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record, bp_seq) { var link_function = ''; window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record; if (name == 'project_number') { return '<a href="javascript:wfl_prj501_grid_update(\'' + record.id + '\',\'' + record.ds.id + '\')">' + value + '</a>'; } else if (name == 'gps_attch') { link_function = '${/parameter/@layout_code}_ast_con_cdd4_attachtment_upload'; if (record.get('atm_num3') > 0) { return '<a style="color:red" href="javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>'; } else { return '<a style="font-weight:bolder;font-size:1.2em" href="javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>'; } } else if (name == 'description') { if (record.get('important_flag') == 'Y') { return '<font color="RED">' + value + '</font>'; } return value; } else if (name == 'bp_link' && record.get('bp_id') && record.get('record_id')) { link_function = '${/parameter/@layout_code}_open_bp_detail_window'; return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\');">' + config_record.get('prompt') + '</a>'; } else if (name == 'car_detail' && record.get('contract_lease_item_id')) { link_function = '${/parameter/@layout_code}_open_lease_item_detail_window'; return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\');">' + config_record.get('prompt') + '</a>'; } else if (name == 'attachment') { link_function = '${/parameter/@layout_code}_prj500_cdd_attachtment_upload'; return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>'; } else if (name == 'attach_file_name' || name == 'attach_file_name_print' || name=='attachment_new') { var content_type = record.get('content_type'); var content_id = record.get('content_id'); //电子合同 // if(content_type == '01'){ // var link = '${/request/@context_path}/modules/xxx/pdf_download.lsc?type=SIN&content_id=' + content_id; // var url = ''; // url = url + '<a href=' + link + '>' + '下载' + '</a>' + ','; // return url; // }else { if (value != null) { var link = '${/request/@context_path}/atm_download.lsc?attachment_id='; var str = value.split(';;'); var url = ''; for (var i = 0; i < str.length; i++) { var temp = str[i].split('--'); if (!Leaf.isEmpty(temp[0])) { var file_name = temp[0].toUpperCase(); var file_suffix = temp[0].substr(temp[0].lastIndexOf('.') + 1).toUpperCase(); if (file_name.indexOf('.PDF') >= 0) { url = url + '<a href=javascript:view_pdf(\'' + temp[1] + '\')>' + temp[0] + '</a>' + ','; } else if (file_suffix == 'BMP' || file_suffix == 'JPG' || file_suffix == 'JPEG' || file_suffix == 'PNG' || file_suffix == 'GIF') { url = url + '<a href=' + link + temp[1] + ' ref="img">' + temp[0] + '</a>' + ','; } else { url = url + '<a href=' + link + temp[1] + '>' + temp[0] + '</a>' + ','; } } } return url; } //} } else if (name == 'received_amount') { link_function = '${/parameter/@layout_code}_received_amount_detail'; if (value) { return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + Leaf.formatMoney(value) + '</a>'; } return ''; }else if(name == 'attach_file_name_new'){ link_function = '${/parameter/@layout_code}_prj500_cdd_attachtment_new_upload'; return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>'; } }; function wfl_prj501_grid_update(record_id, ds_id) { var record = $(ds_id).findById(record_id); var param = {}; param['bp_class'] = record.get('bp_class'); param['project_id'] = record.get('project_id'); param['function_code'] = 'PRJ502D'; param['function_usage'] = 'QUERY'; param['url_title'] = '租赁申请查询'; hls_doc_get_layout_code('${/parameter/@layout_code}_con_contract_get_layout_code_link_id', param, 'wfl_readonly_pageLink_projectQueryScreen_update_project', record.ds.id, '${/parameter/@layout_code}'); } window['${/parameter/@layout_code}_ast_con_cdd4_attachtment_upload'] = function (ds_id, id, name, query_only) { var record = $(ds_id).findById(id); // if (record.get('con_contract_id')) { var url; if (query_only == 'Y') { url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=CON_CONTRACT&header_id=' + record.get('contract_id'); } else { url = $('${/parameter/@layout_code}_prj500_cdd_uploadFile_id').getUrl() + '?table_name=CON_CONTRACT&header_id=' + record.get('contract_id'); } var win = new Leaf.Window({ url: url, title: 'gps附件上传', id: '${/parameter/@layout_code}${/parameter/@tree_code}_ast_con_cdd4_attachtment_upload_id', width: 850, height: 400 }); // win.on('close', function(){ // $(ds_id).query(); // }); // } else { // Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!'); // } }; window['${/parameter/@layout_code}_open_lease_item_detail_window'] = function (id, name) { var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name]; var param = record.data; var contract_lease_item_id = record.get('contract_lease_item_id'); new Leaf.Window({ id: 'contract_lease_item_maintain_window', url: $('contract_lease_item_query_link').getUrl(), params: { contract_lease_item_id: contract_lease_item_id, winid: 'contract_lease_item_maintain_window' }, draggable: true, fullScreen: true }); }; window['${/parameter/@layout_code}_open_bp_detail_window'] = function (id, name) { var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name]; var param = {};//record.data; param['bp_id'] = record.get('bp_id'); param['cdd_list_id'] = record.get('cdd_list_id'); param['company_id'] = '${/session/company_id}'; param['document_id'] = record.get('bp_id'); 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['download'] = 'Y'; 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}'); }; // function open_contract_window(record_id, ds_id) { // var record = $(ds_id).findById(record_id); // var param = record.data; // var contract_lease_item_id = record.get('contract_lease_item_id'); // new Leaf.Window({ // id: 'contract_lease_item_maintain_window', // url: $('contract_lease_item_maintain_link').getUrl(), // params: { // contract_lease_item_id: contract_lease_item_id // }, // fullScreen: true // }); // // param['function_code'] = 'CON501D'; // // param['function_usage'] = 'MODIFY'; // // param['maintain_type'] = 'UPDATE'; // // param['url_title'] = '${l:CON301.CONTRACT_DETAIL}'; // // hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_modify_link',ds_id); // } window['${/parameter/@layout_code}_prj500_cdd_attachtment_upload'] = function (ds_id, id, name, query_only) { var record = $(ds_id).findById(id); if (record.get('check_id')) { var url; //add by lijingjing 2019-11-15 if(record.get('attachment_tab_group')=='CREDIT_CHECK' && '${/parameter/@query_only}'=='Y'){ url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id'); }else if(record.get('attachment_tab_group')=='SIGN' && '${/parameter/@con_query_only}'=='N'){ url = $('${/parameter/@layout_code}_prj500_cdd_uploadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id'); }else if(record.get('attachment_tab_group')=='SIGN' && '${/parameter/@con_query_only}'=='Y'){ url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id'); } else if (query_only == 'Y'||'${/parameter/@download}'=='Y') { url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id'); } else { url = $('${/parameter/@layout_code}_prj500_cdd_uploadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id'); } var win = new Leaf.Window({ url: url, title: '${l:HLS.SUPPORTING_DOCUMENT}', id: '${/parameter/@layout_code}${/parameter/@tree_code}_prj500_cdd_uploadFile_screen_id', width: 850, height: 400 }); win.on('close', function () { record.ds.query(); }); } else { Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!'); } }; window['${/parameter/@layout_code}_prj500_cdd_attachtment_new_upload'] = function (ds_id, id, name, query_only) { var record = $(ds_id).findById(id); if (record.get('check_id')) { var url //add by lijingjing 2019-11-15 if (query_only == 'Y'||'${/parameter/@download}'=='Y') { url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=CON_CONTRACT&header_id=' + record.get('check_id'); } else { url = $('${/parameter/@layout_code}_prj500_cdd_uploadFile_id').getUrl() + '?table_name=CON_CONTRACT&header_id=' + record.get('check_id'); } var win = new Leaf.Window({ url: url, title: '${l:HLS.SUPPORTING_DOCUMENT}', id: '${/parameter/@layout_code}${/parameter/@tree_code}_prj500_cdd_uploadFile_screen_id', width: 850, height: 400 }); win.on('close', function () { record.ds.query(); }); } else { Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!'); } }; window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function () { // var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract'); var record = $(ds_id).getCurrentRecord(); var content_id; //alert($('${/parameter/@layout_code}_con505_contract_content_id').getUrl); Leaf.request({ url: $('${/parameter/@layout_code}_con505_contract_content_id').getUrl(), para: { content_id: content_id, contract_id: record.get('contract_id'), contract_bp_id: record.get('content_bp_pk'), clause_usage: 'GH_WITHHOLD_AGREE' }, success: function (rsc) { // //alert(rsc.result.content_id); Leaf.request({ url: $('${/parameter/@layout_code}_creat_con_contract_content_link_id').getUrl(), para: { content_id: rsc.result.content_id, file_path: '${/parameter/@file_path}' }, success: function () { Leaf.request({ url: $('${/parameter/@layout_code}_file_copy_from_template_link_id').getUrl(), para: { contract_id: record.get('contract_id'), content_id: rsc.result.content_id, file_path: '${/parameter/@file_path}', batch_flag: 'Y' }, success: function () { var url = $('${/parameter/@layout_code}_con_batch_dl_link_id').getUrl() + '?contract_id=' + record.get('contract_id') + '&content_id=' + rsc.result.content_id; window.open(url, '_self'); unlock_current_window(); } }); unlock_current_window(); }, error: function () { unlock_current_window(); }, failure: function () { unlock_current_window(); }, scope: this }); }, error: function () { unlock_current_window(); }, failure: function () { unlock_current_window(); }, scope: this }); }; window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function () { var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract'); var record = $(ds_id).getCurrentRecord(); var direct_debit_bank_id = record.get('direct_debit_bank_id'); var dd_bank_account_name = record.get('dd_bank_account_name'); var dd_bank_account_num = record.get('dd_bank_account_num'); if (!Ext.isEmpty(record.get('contract_number'))) { new Leaf.Window({ id: '${/parameter/@layout_code}_con_contract_content_confirm_win_id', params: { action: 'VIEW', contract_id: record.get('contract_id'), company_id: record.get('company_id'), document_category: record.get('document_category'), business_type: record.get('business_type'), winid: '${/parameter/@layout_code}_con_contract_content_confirm_win_id' }, url: $('${/parameter/@layout_code}_con_contract_content_confirm_link_id').getUrl(), title: '合同查看', width: 1300, height: 550 }); } else { Leaf.showErrorMessage('错误', '请先点击保存生成合同编号!'); } }; var change_flag = 'N'; //工作流中合同文本生成按钮 //基本信息tab页 新增必输字段的校验 add by liukang 20160328 window['${/parameter/@layout_code}_print_layout_dynamic_click'] = function () { var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract'); var con_lease_item_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_lease_item'); var record = $(ds_id).getCurrentRecord(); var con_lease_record = $(con_lease_item_id).getCurrentRecord(); var direct_debit_bank_id = record.get('direct_debit_bank_id'); var dd_bank_account_name = record.get('dd_bank_account_name'); var dd_bank_account_num = record.get('dd_bank_account_num'); var color_of_apprearance = con_lease_record.get('color_of_apprearance'); var item_frame_number = con_lease_record.get('item_frame_number'); var item_engine_number = con_lease_record.get('item_engine_number'); var license_number = con_lease_record.get('license_number'); /* if (Ext.isEmpty(direct_debit_bank_id)) { Leaf.showMessage('${l:HLS.PROMPT}', '请先填写数据并保存!'); } else */ if (!Ext.isEmpty(record.get('contract_number'))) { var win = new Leaf.Window({ id: '${/parameter/@layout_code}_con_contract_content_confirm_win_id', params: { contract_id: record.get('contract_id'), company_id: record.get('company_id'), document_category: record.get('document_category'), business_type: record.get('business_type'), winid: '${/parameter/@layout_code}_con_contract_content_confirm_win_id', change_flag: change_flag, contract_name: record.get('contract_name'), contract_number: record.get('contract_number') }, url: $('${/parameter/@layout_code}_con_contract_content_confirm_link_id').getUrl(), title: '合同文本生成', width: 1300, height: 550 }); //在关闭页面之后,刷新一下ds win.on('close', function () { if (ds_id) { $(ds_id).query(); } }); } else { Leaf.showErrorMessage('错误', '请先点击保存生成合同编号!'); } }; //add by zhuxianfei 20180207 function view_pdf(attachment_id) { Leaf.request({ url: '${/request/@context_path}/autocrud/fnd.fnd_atm_attachment/query', para: { attachment_id: attachment_id }, success: function (res) { var path = res.result.record.file_path; path = path.substr(path.indexOf('hls_attachment')); var tomcat_source = '${/parameter/@tomcat_source}'; var source_path = 'http://' + window.location.host + '/' + tomcat_source + '/' + path+'?type=pdf'; var oWin = window.open(source_path); }, scope: this }); } window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function(ds, qpara, bp_seq) { var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_bs_score'); if (ds.id == ds_id) { qpara.contract_id = '${/parameter/@contract_id}'; //$(ds_id).setQueryParameter('contract_id', '${/parameter/@contract_id}'); } }; window['${/parameter/@layout_code}_submit_approval_layout_dynamic_click'] = function () { var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract'); var record = $(ds_id).getCurrentRecord(); var contract_id=record.get('contract_id'); if (record.dirty == true) { Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}'); return; } if($(ds_id).validate()){ Leaf.showConfirm('${HLS.PROMPT}', '确认要提交工作流吗?', function() { window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); Leaf.request({ url: $('con_approval_link_id').getUrl(), para: { contract_id:contract_id }, scope: this, success: function() { window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); $('${/parameter/@winid}').close(); }, failure: function() { window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); }, error: function() { window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); } }); }); } } if ('${/parameter/@source_type}' == 'WFL'){ zjwfl5110_ApproveChecker_add('zjwfl5110_submit', function (type) { var con_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract'); if (type == 'agree') { if ($(con_ds_id).validate()) { if($(con_ds_id).isModified()){ Leaf.showMessage('${HLS.PROMPT}','请先保存'); return false; } //提交先保存 return true; } else { return false; } } else return true; }); } ]]></script> <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/> </a:view></a:screen>
\ No newline at end of file
......
......@@ -140,7 +140,9 @@
}
}
if (name == "division_n") {
return '<div align="right">合计:</div>';
//return '<div align="right">合计:</div>';
//return '合计:<font color="red"></font>';
return '<font color="red">' + '合计:' + '</font>';
}
if (name == "account_due_amount") {
return '<font color="red">' + Leaf.formatNumber(sum, 2) + '</font>';
......@@ -159,13 +161,35 @@
// }
function ds_query(ds) {
var grid_id = $('CON601_con_contract_grid_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');
//
//
// }
}
Leaf.onReady(function() {
if("${/model/role_info/record/@role_code}"=="0018"||"${/model/role_info/record/@role_code}"=="0019"){
document.getElementById('account_due_times_from_id').style.display = "none";
document.getElementById('account_due_times_from_id_prompt').style.display = "none";
document.getElementById('account_due_times_to_id').style.display = "none";
document.getElementById('account_due_times_to_id_prompt').style.display = "none";
document.getElementById('account_due_days_from_id').style.display = "none";
document.getElementById('account_due_days_from_id_prompt').style.display = "none";
document.getElementById('account_due_days_to_id').style.display = "none";
document.getElementById('account_due_days_to_id_prompt').style.display = "none";
document.getElementById('account_due_amount_from_id').style.display = "none";
document.getElementById('account_due_amount_from_id_prompt').style.display = "none";
document.getElementById('account_due_amount_to_id').style.display = "none";
document.getElementById('account_due_amount_to_id_prompt').style.display = "none";
var grid_id = $('CON601_con_contract_grid_ds');
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"/>
......@@ -235,18 +259,18 @@
<a:textField name="bp_id_agent_desc" bindTarget="CON620_contract_query_ds" prompt="代理店"/>
<a:comboBox name="business_type_n" bindTarget="CON620_contract_query_ds" prompt="业务类型"/>
<a:comboBox name="division_n" bindTarget="CON620_contract_query_ds" prompt="租赁物"/>
<a:numberField name="account_due_times_from" bindTarget="CON620_contract_query_ds" prompt="会计逾期总期数从" allowDecimals="false"/>
<a:numberField name="account_due_times_to" bindTarget="CON620_contract_query_ds" prompt="会计逾期总期数到" allowDecimals="false"/>
<a:numberField name="account_due_days_from" bindTarget="CON620_contract_query_ds" prompt="会计逾期总天数从" allowDecimals="false"/>
<a:numberField name="account_due_days_to" bindTarget="CON620_contract_query_ds" prompt="会计逾期总天数到" allowDecimals="false"/>
<a:numberField name="account_due_amount_from" bindTarget="CON620_contract_query_ds" prompt="会计逾期总金额从"/>
<a:numberField name="account_due_amount_to" bindTarget="CON620_contract_query_ds" prompt="会计逾期总金额到"/>
<a:numberField name="business_due_times_from" bindTarget="CON620_contract_query_ds" prompt="营业逾期总期数从" allowDecimals="false"/>
<a:numberField name="business_due_times_to" bindTarget="CON620_contract_query_ds" prompt="营业逾期总期数到" allowDecimals="false"/>
<a:numberField name="business_due_days_from" bindTarget="CON620_contract_query_ds" prompt="营业逾期总天数从" allowDecimals="false"/>
<a:numberField name="business_due_days_to" bindTarget="CON620_contract_query_ds" prompt="营业逾期总天数到" allowDecimals="false"/>
<a:numberField name="business_due_amount_from" bindTarget="CON620_contract_query_ds" prompt="营业逾期总金额从"/>
<a:numberField name="business_due_amount_to" bindTarget="CON620_contract_query_ds" prompt="营业逾期总金额到"/>
<a:numberField id="account_due_times_from_id" name="account_due_times_from" bindTarget="CON620_contract_query_ds" prompt="会计逾期总期数从" allowDecimals="false"/>
<a:numberField id="account_due_times_to_id" name="account_due_times_to" bindTarget="CON620_contract_query_ds" prompt="会计逾期总期数到" allowDecimals="false"/>
<a:numberField id="account_due_days_from_id" name="account_due_days_from" bindTarget="CON620_contract_query_ds" prompt="会计逾期总天数从" allowDecimals="false"/>
<a:numberField id="account_due_days_to_id" name="account_due_days_to" bindTarget="CON620_contract_query_ds" prompt="会计逾期总天数到" allowDecimals="false"/>
<a:numberField id="account_due_amount_from_id" name="account_due_amount_from" bindTarget="CON620_contract_query_ds" prompt="会计逾期总金额从"/>
<a:numberField id="account_due_amount_to_id" name="account_due_amount_to" bindTarget="CON620_contract_query_ds" prompt="会计逾期总金额到"/>
</a:form>
<a:grid id="CON601_con_contract_grid_ds" bindTarget="CON620_contract_result_ds" marginHeight="240"
marginWidth="30" navBar="true">
......@@ -259,7 +283,7 @@
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" renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"/>
<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="会计逾期总天数"
......
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:a="http://www.leaf-framework.org/application" xmlns:p="uncertain.proc" trace="true">
<a:init-procedure>
<batch-apply sourcePath="/parameter/details">
<a:model-update model="hls.HLS361N.hls_bp_master_credit_confirmed" trace="true"/>
</batch-apply>
</a:init-procedure>
<a:service-output output="/parameter"/>
</a:service>
......@@ -15,7 +15,7 @@ $Purpose: 商业伙伴授信维护
<a:link id="hn1150_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="hls361_hls_bp_master_credit_tenant_detail_link" url="${/request/@context_path}/modules/hls/HLS361N/credit_entrance_detail.lview"/>
<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="hls362N_update_credit_confirmed_link_id" url="${/request/@context_path}/modules/hls/HLS362N/hls_bp_master_batch_update.lsc"/>
<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"/>
......@@ -50,30 +50,39 @@ $Purpose: 商业伙伴授信维护
//授信额度变更
var credit_ds=get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_credit_hd');
var datas=$(credit_ds).selected;
if(datas.length!=1){
$L.showInfoMessage("提示",'请选择一条数据',null,null)
var param = {};
var saveData = [];
//角色判断
//002 营业本部长
if(user_code==''||user_code==undefined){
$L.showInfoMessage("提示",'只有营业本部长才能操作数据!');
return;
}
if(datas.length<1){
$L.showInfoMessage("提示",'请选择数据',null,null)
return;
}
for (var i = 0; i < datas.length; i++) {
//审批冻结判断
var credit_status=datas[0].data.credit_status;
var credit_status=datas[i].data.credit_status;
if(credit_status!='APPROVING'){
$L.showInfoMessage("提示",'请选择状态为审批中的数据!',null,null)
return;
}
//角色判断
//002 营业本部长
if(user_code==''||user_code==undefined){
$L.showInfoMessage("提示",'只有营业本部长才能操作数据!');
return;
var data_record;
data_record = datas[i];
data_record.set('_status', 'update');
data_record.set('bp_credit_hd_id', datas[i].data.bp_credit_hd_id);
data_record.set('wanted_status', 'APPROVED');
saveData.push(data_record.data);
}
$L.showConfirm("提示",'确认该条记录的相关信息?',function(){
param['details'] = saveData;
$L.showConfirm("提示",'确认进行授信确认?',function(){
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('hls362N_update_credit_confirmed_link_id').getUrl(),
para: {
bp_credit_hd_id : datas[0].data.bp_credit_hd_id,
wanted_status : 'APPROVED',
},
para: param,
success: function () {
Leaf.SideBar.show({
msg: '操作成功',
......@@ -96,32 +105,40 @@ $Purpose: 商业伙伴授信维护
window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() {
var credit_ds=get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_credit_hd');
var datas=$(credit_ds).selected;
if(datas.length!=1){
var param = {};
var saveData = [];
//角色判断
// 002 营业本部长
if(user_code==''||user_code==undefined){
$L.showInfoMessage("提示",'只有营业本部长才能操作数据!');
return;
}
if(datas.length<1){
$L.showInfoMessage("提示",'请选择一条数据',null,null)
return;
}
for (var i = 0; i < datas.length; i++) {
//审批冻结判断
var credit_status=datas[0].data.credit_status;
var credit_status=datas[i].data.credit_status;
if(credit_status!='APPROVING'){
$L.showInfoMessage("提示",'请选择状态为审批中的数据!',null,null)
return;
}
//角色判断
// 002 营业本部长
if(user_code==''||user_code==undefined){
$L.showInfoMessage("提示",'只有营业本部长才能操作数据!');
return;
var data_record;
data_record = datas[i];
data_record.set('_status', 'update');
data_record.set('bp_credit_hd_id', datas[i].data.bp_credit_hd_id);
data_record.set('wanted_status', 'REJECT');
saveData.push(data_record.data);
}
param['details'] = saveData;
$L.showConfirm("提示",'确认该条记录的相关信息?',function(){
$L.showConfirm("提示",'确认进行授信退回?',function(){
// window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('hls362N_update_credit_confirmed_link_id').getUrl(),
para: {
bp_credit_hd_id : datas[0].data.bp_credit_hd_id,
wanted_status : 'REJECT'
},
para: param,
success: function () {
Leaf.SideBar.show({
msg: '操作成功',
......
......@@ -8,13 +8,19 @@
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
<a:init-procedure>
<a:model-query fetchAll="true" model="gld.gld_currency_vl" rootPath="currency"/>
<a:model-query defaultWhereClause="t1.price_list=${/session/@price_list}" fetchAll="true" model="hls.HLS050.hls_price_list_for_lov" rootPath="default_price_list_path"/>
<a:model-query defaultWhereClause="t1.currency_code=&apos;CNY&apos;" fetchAll="true" model="gld.gld_currency_vl" rootPath="default_currency"/>
<a:model-query defaultWhereClause="t1.price_list=${/session/@price_list}" fetchAll="true"
model="hls.HLS050.hls_price_list_for_lov" rootPath="default_price_list_path"/>
<a:model-query defaultWhereClause="t1.currency_code=&apos;CNY&apos;" fetchAll="true" model="gld.gld_currency_vl"
rootPath="default_currency"/>
</a:init-procedure>
<a:view>
<a:link id="hls_fin_calculator_id" url="${/request/@context_path}/modules/hls/HLS500N/hls_fin_calculator_n.lview"/>
<a:link id="hls_fin_calculator_id"
url="${/request/@context_path}/modules/hls/HLS500N/hls_fin_calculator_n.lview"/>
<a:link id="hls_fin_calculator_id_new"
url="${/request/@context_path}/modules/hls/HLS500N/hls_fin_calculator_update_n.lview"/>
<script type="text/javascript"><![CDATA[
function hls_hls500_confirm() {
debugger;
$('hls_hls500_confirm_id').disable();
if (!$('hls_fin_calc_list_head_ds').validate()) {
$('hls_hls500_confirm_id').enable();
......@@ -24,8 +30,183 @@
var url = $('hls_fin_calculator_id').getUrl() + '?price_list=' + record.get('price_list') + '&currency=' + record.get('currency_code') + '&precision=' + record.get('precision') + '&calc_method=' + record.get('calc_method');
window.location.href = url;
}
Leaf.onReady(function() {
document.onkeydown = function(event) {
// function hls_hls500_confirm() {
//
// var url;
// var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
// var quotation_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation');
// var history_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_CASHFLOW_NS', 'prj_quotation');
//
// var record = $(quotation_ds_id).getCurrentRecord();
// var head_record = $(ds_id).getAt(0);
//
// url = $('hls_fin_calculator_id_new').getUrl();
//
// if (record.dirty == true) {
// Leaf.showMessage('${l:PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
// return;
// }
// if ($(quotation_ds_id).validate()) {
// /*if (!record.get('price_list') || !record.get('currency') || !record.get('lease_times')) {
// Leaf.showMessage('${l:PROMPT}', '${l:HLS.QUOTATION_EXECUTE_AFTER_SAVE}');
// return;
// }*/
//
// var parent_pk_value = head_record.get('project_id');
// record.set('function_code', 'PRJ505_QUOTATION');
// record.set('function_usage', 'UPDATE');
// record.set('project_id', parent_pk_value);
// //拆分合同可维护
// window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
// //首次插入
// if (!record.get('calc_session_id')) {
// record.set('to_doc_table', 'HLS_FIN_CALCULATOR_HD');
// var calc_recreate_L_formula;
// calc_recreate_L_formula = 'Y';
//
// record.set('_status', 'update');
// record.set('from_doc_table', 'PRJ_QUOTATION');
// record.set('from_doc_pk', record.get('quotation_id'));
// record.set('calculate_flag', 'N');
// if (!'${/parameter/@document_id}') {
// record.set('document_id', parent_pk_value);
// }
// var saveData = [];
// saveData.push(record.data);
// Leaf.request({
// url: $('${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_doc_quotation_link_id').getUrl(),
// para: saveData,
// success: function (res) {
//
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// $(quotation_ds_id).query();
// $(history_ds_id).query();
// var quotation_id = record.get('quotation_id') || res.result.record.quotation_id;
// var win = new Leaf.Window({
// id: 'hls_fin_calc_quotation_link_winid',
// params: {
// document_id: parent_pk_value,
// document_category: 'PROJECT',
// maintain_type: 'MODIFY',
// calc_session_id: res.result.record.calc_session_id,
// quotation_id: quotation_id,
// dsId: quotation_ds_id,
// winId: 'hls_fin_calc_quotation_link_winid',
// global_flag: 'Y',
// id_num: 0,
// calc_type: '${/parameter/@calc_type}' || 'CLASSIC_CALCULATOR',
// recreate_L_formula: calc_recreate_L_formula
// },
// url: url,
// fullScreen: true,
// draggable: true
// });
// win.on('close', function () {
// $(quotation_ds_id).query();
// $(history_ds_id).query();
//
// });
// },
// failure: function () {
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// },
// error: function () {
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// },
// scope: this
// });
// } else {
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// var cal_hd_price_list = record.get('cal_hd_price_list');
// var price_list = record.get('price_list');
// if (cal_hd_price_list == price_list) {
//
// //直接进入报价页面
// var win = new Leaf.Window({
// id: 'hls_fin_calc_quotation_update_link_winid',
// params: {
// document_id: parent_pk_value,
// document_category: 'PROJECT',
// maintain_type: 'MODIFY',
// calc_session_id: record.get('calc_session_id'),
// quotation_id: record.get('quotation_id'),
// dsId: quotation_ds_id,
// winId: 'hls_fin_calc_quotation_update_link_winid',
// global_flag: 'Y',
// id_num: 0,
// calc_type: '${/parameter/@calc_type}',
// recreate_L_formula: 'N'
// },
// url: url,
// fullScreen: true,
// draggable: true
// });
// win.on('close', function () {
// $(quotation_ds_id).query();
// $(history_ds_id).query();
// });
// } else {
// record.set('to_doc_table', 'HLS_FIN_CALCULATOR_HD');
// var calc_recreate_L_formula;
// calc_recreate_L_formula = 'Y';
//
// record.set('_status', 'update');
// record.set('from_doc_table', 'PRJ_QUOTATION');
// record.set('from_doc_pk', record.get('quotation_id'));
// record.set('calculate_flag', 'N');
// if (!'${/parameter/@document_id}') {
// record.set('document_id', parent_pk_value);
// }
// var saveData = [];
// saveData.push(record.data);
// Leaf.request({
// url: $('${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_doc_quotation_link_id').getUrl(),
// para: saveData,
// success: function (res) {
//
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// $(quotation_ds_id).query();
// var quotation_id = record.get('quotation_id') || res.result.record.quotation_id;
// var win = new Leaf.Window({
// id: 'hls_fin_calc_quotation_link_winid',
// params: {
// document_id: parent_pk_value,
// document_category: 'PROJECT',
// maintain_type: 'MODIFY',
// calc_session_id: res.result.record.calc_session_id,
// quotation_id: quotation_id,
// dsId: quotation_ds_id,
// winId: 'hls_fin_calc_quotation_link_winid',
// global_flag: 'Y',
// id_num: 0,
// calc_type: '${/parameter/@calc_type}' || 'CLASSIC_CALCULATOR',
// recreate_L_formula: calc_recreate_L_formula
// },
// url: url,
// fullScreen: true,
// draggable: true
// });
// win.on('close', function () {
// $(quotation_ds_id).query();
// $(history_ds_id).query();
//
// });
// },
// failure: function () {
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// },
// error: function () {
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// },
// scope: this
// });
// }
// }
// }
// }
Leaf.onReady(function () {
document.onkeydown = function (event) {
var e = event || window.event || arguments.callee.caller.arguments[0];
if (e && e.keyCode == 13) { // enter 键
hls_hls500_confirm();
......@@ -40,13 +221,18 @@
<a:dataSet id="hls_fin_calc_list_head_ds" autoCreate="true">
<a:fields>
<a:field name="currency_code" defaultValue="${/model/default_currency/record/@currency_code}"/>
<a:field name="currency_name" defaultValue="${/model/default_currency/record/@currency_name}" displayField="currency_name" options="currency_ds" required="true" returnField="currency_code" valueField="currency_code">
<a:field name="currency_name" defaultValue="${/model/default_currency/record/@currency_name}"
displayField="currency_name" options="currency_ds" required="true"
returnField="currency_code" valueField="currency_code">
<a:mapping>
<a:map from="precision" to="precision"/>
</a:mapping>
</a:field>
<a:field name="precision" defaultValue="${/model/default_currency/record/@precision}"/>
<a:field name="price_list_name" autoComplete="true" defaultValue="${/model/default_price_list_path/record/@description}" fetchSingle="true" lovGridHeight="350" lovHeight="500" lovService="hls.HLS050.hls_price_list_for_lov" lovWidth="500" required="true" title="HLS.PRICE_LIST">
<a:field name="price_list_name" autoComplete="true"
defaultValue="${/model/default_price_list_path/record/@description}" fetchSingle="true"
lovGridHeight="350" lovHeight="500" lovService="hls.HLS050.hls_price_list_for_lov"
lovWidth="500" required="true" title="HLS.PRICE_LIST">
<a:mapping>
<a:map from="price_list" to="price_list"/>
<a:map from="description" to="price_list_name"/>
......@@ -54,7 +240,10 @@
</a:mapping>
</a:field>
<a:field name="calc_method" defaultValue="${/model/default_price_list_path/record/@calc_method}"/>
<a:field name="price_list" defaultValue="${/model/default_price_list_path/record/@price_list}" fetchSingle="true" lovGridHeight="350" lovHeight="500" lovService="hls.HLS500N.hls_price_list_lov" lovWidth="500" required="true" title="HLS.PRICE_LIST">
<a:field name="price_list" defaultValue="${/model/default_price_list_path/record/@price_list}"
fetchSingle="true" lovGridHeight="350" lovHeight="500"
lovService="hls.HLS500N.hls_price_list_lov" lovWidth="500" required="true"
title="HLS.PRICE_LIST">
<a:mapping>
<a:map from="price_list" to="price_list"/>
<a:map from="description" to="price_list_name"/>
......@@ -70,9 +259,12 @@
<a:gridButton id="hls_hls500_confirm_id" click="hls_hls500_confirm" text="HLS.CONFIRM"/>
</a:screenTopToolbar>
<a:form title="HLS.FIN_CALCULATOR" width="350">
<a:lov name="price_list" bindTarget="hls_fin_calc_list_head_ds" prompt="HLS.PRICE_LIST_CODE" width="220"/>
<a:lov name="price_list_name" bindTarget="hls_fin_calc_list_head_ds" prompt="HLS.PRICE_LIST_NAME" width="220"/>
<a:comboBox name="currency_name" bindTarget="hls_fin_calc_list_head_ds" prompt="HLS.CURRENCY" width="220"/>
<a:lov name="price_list" bindTarget="hls_fin_calc_list_head_ds" prompt="HLS.PRICE_LIST_CODE"
width="220"/>
<a:lov name="price_list_name" bindTarget="hls_fin_calc_list_head_ds" prompt="HLS.PRICE_LIST_NAME"
width="220"/>
<a:comboBox name="currency_name" bindTarget="hls_fin_calc_list_head_ds" prompt="HLS.CURRENCY"
width="220"/>
</a:form>
</a:screenBody>
</a:view>
......
......@@ -40,6 +40,8 @@
<a:link id="hls_fin_calc_single_variable_calc_link_id" model="hls.HLS500.hls_fin_calc_single_variable_calc" modelaction="update"/>
<a:link id="hls_fin_calc_single_variable_manual_link_id" model="hls.HLS500.hls_fin_calc_single_variable_calc" modelaction="execute"/>
<a:link id="test_link_id" url="${/request/@context_path}/modules/hls/HLS500N/hls_fin_calc_save_n.lsc"/>
<style><![CDATA[
.finGrid td[dataindex=percent]{
border-right-color:#FFF;
......@@ -136,24 +138,6 @@
headRecord.dirty = true;
create_record_column(all_records, headRecord);
function hls_fin_cal_save_hd_submitsuccess(ds, res) {
if (typeof(nextStep) == 'function') {
nextStep(source_procedure);
} else {
function on_ln_formula_load(ds) {
Leaf.SideBar.enable = true;
success_sidebar_show();
unlock_calc_current_window();
$('ln_formula_ds').un('load', on_ln_formula_load);
}
$('ln_formula_ds').on('load', on_ln_formula_load);
$('ln_formula_ds').query();
}
}
$('hls_fin_cal_save_hd_ds').on('submitsuccess', hls_fin_cal_save_hd_submitsuccess);
Leaf.SideBar.enable = false;
$('hls_fin_cal_save_hd_ds').submit();
}
if(price_list=='HL_PRICR_E' ||price_list=='HL_PRICR_TEST'||price_list=='HL_PRICR_NTEST'||price_list=='HL_PRICR_EN'){
if(payment_deduction!='TRADE_IN' && payment_deduction!='TRI_AGREEMENT' ){
var record = $('hls_fin_calculator_hd_ds').getAll();
......@@ -161,7 +145,7 @@
if(record[i].get('column_code')=='H109') {
record[i].set('column_value',0);
record[i].set('column_value_c',0);
var a= document.getElementById('hls_fin_calculator_hd_grid_id_column_value_'+record[i].id);console.log(a);
var a= document.getElementById('hls_fin_calculator_hd_grid_id_column_value_'+record[i].id);
document.getElementById('hls_fin_calculator_hd_grid_id_column_value_'+record[i].id).innerHTML=0;
document.getElementById('hls_fin_calculator_hd_grid_id_column_value_'+record[i].id).title=0;
}
......@@ -180,6 +164,25 @@
}
}
}
function hls_fin_cal_save_hd_submitsuccess(ds, res) {
if (typeof(nextStep) == 'function') {
nextStep(source_procedure);
} else {
function on_ln_formula_load(ds) {
Leaf.SideBar.enable = true;
success_sidebar_show();
unlock_calc_current_window();
$('ln_formula_ds').un('load', on_ln_formula_load);
}
$('ln_formula_ds').on('load', on_ln_formula_load);
$('ln_formula_ds').query();
}
}
$('hls_fin_cal_save_hd_ds').on('submitsuccess', hls_fin_cal_save_hd_submitsuccess);
Leaf.SideBar.enable = false;
$('hls_fin_cal_save_hd_ds').submit();
}
},
failure: function() {
unlock_calc_current_window('${l:HLS.SAVING}');
......@@ -192,6 +195,36 @@
scope: this
});
}else{
var temp_head_records = $('hls_fin_calculator_hd_ds').getAll();
for (var i = 0;i < temp_head_records.length;i++) {
if (!$('temp_hd_attribute_ds').find('column_code', temp_head_records[i].get('column_code'))) {
$('temp_hd_attribute_ds').create(temp_head_records[i].data);
}
}
var all_records = $('temp_hd_attribute_ds').getAll();
var headRecord = $('hls_fin_cal_save_hd_ds').getAt(0);
headRecord.isNew = false;
headRecord.dirty = true;
create_record_column(all_records, headRecord);
function hls_fin_cal_save_hd_submitsuccess(ds, res) {
if (typeof(nextStep) == 'function') {
nextStep(source_procedure);
} else {
function on_ln_formula_load(ds) {
Leaf.SideBar.enable = true;
success_sidebar_show();
unlock_calc_current_window();
$('ln_formula_ds').un('load', on_ln_formula_load);
}
$('ln_formula_ds').on('load', on_ln_formula_load);
$('ln_formula_ds').query();
}
}
$('hls_fin_cal_save_hd_ds').on('submitsuccess', hls_fin_cal_save_hd_submitsuccess);
Leaf.SideBar.enable = false;
$('hls_fin_cal_save_hd_ds').submit();
}
......@@ -633,6 +666,12 @@
if (Ext.isEmpty(ln_calc_orign_value[name])) {
ln_calc_orign_value[name] = old_value;
}
if(name=='principal_eq_pymt_adj'&&value){
if(value*1<0){
Leaf.showMessage('${l:PROMPT}', '调整租金不能小于零!');
return false;
}
}
var formula_record = $('ln_formula_ds').find('calc_line_id', record.get('calc_line_id'));
if (formula_record) {
if (Ext.isEmpty(ln_calc_formula_orign_value[name])) {
......@@ -795,81 +834,82 @@
}
function onEditorHdload(ds) {
debugger;
var headRecords = ds.getAll();
if('${/parameter/@document_category}'=='CONTRACT'){
Leaf.request({
url: $('con_check_con_record_link_id').getUrl(),
para: {
'contract_id': '${/parameter/@document_id}'
},
success: function(res) {
var contract_status = res.result.contract_status;
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"){
headRecords[i].set('input_mode','READONLY');
headRecords[i].set('readonly_input_mode','TRUE');
headRecords[i].getField('column_value').setReadOnly(true);
headRecords[i].getField('column_value_c').setReadOnly(true);
}
}
}else{
for (var i = 0;i < headRecords.length;i++) {
headRecords[i].set('input_mode','READONLY');
headRecords[i].set('readonly_input_mode','TRUE');
headRecords[i].getField('column_value').setReadOnly(true);
headRecords[i].getField('column_value_c').setReadOnly(true);
}
}
},
failure: function() {
unlock_calc_current_window('${l:HLS.SAVING}');
},
error: function() {
unlock_calc_current_window('${l:HLS.SAVING}');
},
scope: this
});
}
if('${/parameter/@document_category}'=='PROJECT'){
Leaf.request({
url: $('prj_check_prj_record_link_id').getUrl(),
para: {
'project_id': '${/parameter/@document_id}'
},
success: function(res) {
var detention = res.result.detention;
for (var i = 0;i < headRecords.length;i++) {
var column_name = headRecords[i].get('column_name')
if(column_name =="residual_value"){
headRecords[i].set('column_value',detention);
headRecords[i].set('column_value_c',detention);
}
}
},
failure: function() {
unlock_calc_current_window('${l:HLS.SAVING}');
},
error: function() {
unlock_calc_current_window('${l:HLS.SAVING}');
},
scope: this
});
}
if (headRecords[0].get('show_column_code') == 'N') {
// if('${/parameter/@document_category}'=='CONTRACT'){
// Leaf.request({
// url: $('con_check_con_record_link_id').getUrl(),
// para: {
// 'contract_id': '${/parameter/@document_id}'
// },
// success: function(res) {
// var contract_status = res.result.contract_status;
// 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"){
// headRecords[i].set('input_mode','READONLY');
// headRecords[i].set('readonly_input_mode','TRUE');
// headRecords[i].getField('column_value').setReadOnly(true);
// headRecords[i].getField('column_value_c').setReadOnly(true);
// }
// }
// }else{
// for (var i = 0;i < headRecords.length;i++) {
// headRecords[i].set('input_mode','READONLY');
// headRecords[i].set('readonly_input_mode','TRUE');
// headRecords[i].getField('column_value').setReadOnly(true);
// headRecords[i].getField('column_value_c').setReadOnly(true);
//
// }
// }
// },
// failure: function() {
// unlock_calc_current_window('${l:HLS.SAVING}');
//
// },
// error: function() {
// unlock_calc_current_window('${l:HLS.SAVING}');
//
// },
// scope: this
// });
//
//
// }
// if('${/parameter/@document_category}'=='PROJECT'){
// Leaf.request({
// url: $('prj_check_prj_record_link_id').getUrl(),
// para: {
// 'project_id': '${/parameter/@document_id}'
// },
// success: function(res) {
// var detention = res.result.detention;
// for (var i = 0;i < headRecords.length;i++) {
// var column_name = headRecords[i].get('column_name')
// if(column_name =="residual_value"){
// headRecords[i].set('column_value',detention);
// headRecords[i].set('column_value_c',detention);
// }
// }
//
//
// },
// failure: function() {
// unlock_calc_current_window('${l:HLS.SAVING}');
//
// },
// error: function() {
// unlock_calc_current_window('${l:HLS.SAVING}');
//
// },
// scope: this
// });
//
//
// }
if (headRecords.length>0&&headRecords[0].get('show_column_code') == 'N') {
$('hls_fin_calculator_hd_grid_id').hideColumn('column_code');
$('hls_fin_calculator_export_grid_id').hideColumn('column_code');
} else {
......@@ -1270,6 +1310,7 @@
},
success: function() {
if('${/parameter/@document_category}'=='PROJECT'){
$('PROJECT_CREATE_NP_F_QUOTATION_N_prj_quotation_ds').query();
$('PROJECT_CREATE_NP_G_CASHFLOW_NS_prj_quotation_ds').query();
}else if('${/parameter/@document_category}'=='CONTRACT'){
$('CONTRACT_CREATE_INC_G_CASHFLOW_1_con_contract_cashflow_ds').query();
......@@ -1286,6 +1327,8 @@
scope: this
});
}
function hls_hls500_user_button2() {
flag = 'Y';
......@@ -1535,6 +1578,7 @@
<p:case value="USER_BUTTON1">
<c:process-config>
<a:gridButton id="hls_hls500_user_button1_col_id" click="hls_hls500_user_button1" style="margin-top:10px;margin-left:5px" text="${@prompt}"/>
<!--<div style="margin-top:10px;margin-left:10px;color: red">请先点计算按钮,再执行均等计算(若改变参数值,请先点击公式重算!) </div>-->
</c:process-config>
</p:case>
<p:case value="USER_BUTTON2">
......
......@@ -49,6 +49,8 @@
<!-- <a:link id="prj_project_create_con_id" model="prj.PRJ513N.prj_peoject_create_con" modelaction="update"/> -->
<a:link id="${/parameter/@layout_code}_prj_project_create_contract_link_id"
model="prj.PRJ505.prj_project_create_contract" modelaction="update"/>
<a:link id="${/parameter/@layout_code}_prj_project_update_status_link_id"
model="prj.PRJ505.prj_project_create_contract" modelaction="execute"/>
<a:link id="prj_approval_link_id" model="prj.PRJ501N.project_approval" modelaction="update"/>
<a:link id="check_prj_lease_item_link_id" model="prj.PRJ501N.project_approval" modelaction="execute"/>
......@@ -498,6 +500,39 @@ function prj501n_contract_number_renderer(id, name, query_only){
record.getField('bank_account_id_n').setRequired(true);
}
}
if(name=='payment_deduction') {
var quoation_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_QUOTATION_N', 'prj_quotation');
var quoation_record = $(quoation_ds_id).getCurrentRecord();
var down_payment = quoation_record.get('down_payment') || 0;
var calc_session_id= quoation_record.get('calc_session_id');
var other_payment2;
if (old_value && value &&calc_session_id&& value == 'NO_DEDUCTION') {
other_payment2 = 0;
} else if (old_value && value &&calc_session_id&& value != 'NO_DEDUCTION'){
other_payment2=down_payment;
}
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('${/parameter/@layout_code}_prj_project_update_status_link_id').getUrl(),
para: {
other_payment2: other_payment2,
calc_session_id: calc_session_id
},
success: function (arg) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this
});
}
};
......
......@@ -49,6 +49,8 @@
<!-- <a:link id="prj_project_create_con_id" model="prj.PRJ513N.prj_peoject_create_con" modelaction="update"/> -->
<a:link id="${/parameter/@layout_code}_prj_project_create_contract_link_id"
model="prj.PRJ505.prj_project_create_contract" modelaction="update"/>
<a:link id="${/parameter/@layout_code}_prj_project_update_status_link_id"
model="prj.PRJ505.prj_project_create_contract" modelaction="execute"/>
<a:link id="prj_approval_link_id" model="prj.PRJ501N.project_approval" modelaction="update"/>
<!--<link href="${/request/@context_path}/css/lightbox.css" rel="stylesheet" type="text/css"/>
......@@ -462,10 +464,6 @@ function prj501n_contract_number_renderer(id, name, query_only){
}
}
};
//更新时调用
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_load'] = function(ds, record, config_records, bp_seq) {
......@@ -611,6 +609,39 @@ function prj501n_contract_number_renderer(id, name, query_only){
record.getField('bank_account_id_n').setRequired(true);
}
}
if(name=='payment_deduction') {
var quoation_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_QUOTATION_N', 'prj_quotation');
var quoation_record = $(quoation_ds_id).getCurrentRecord();
var down_payment = quoation_record.get('down_payment') || 0;
var calc_session_id= quoation_record.get('calc_session_id');
var other_payment2;
if (old_value && value &&calc_session_id&& value == 'NO_DEDUCTION') {
other_payment2 = 0;
} else if (old_value && value &&calc_session_id&& value != 'NO_DEDUCTION'){
other_payment2=down_payment;
}
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('${/parameter/@layout_code}_prj_project_update_status_link_id').getUrl(),
para: {
other_payment2: other_payment2,
calc_session_id: calc_session_id
},
success: function (arg) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this
});
}
};
......
......@@ -6,55 +6,29 @@
<a:init-procedure>
<s:server-script><![CDATA[
importPackage(java.io);
importPackage(Packages.hl.mail);
importPackage(Packages.com.hand.hls.hlcm.util);
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)) {
var jsonString ={
serverHost:mail_server_result[0].mail_smtp_host, // 设置SMTP主机(163),若用126,则设为:smtp.126.com
serverPort:mail_server_result[0].mail_port_number, //设置端口号
serverName:mail_server_result[0].mail_username, // 设置发件人邮箱的用户名
serverPassWord:mail_server_result[0].mail_password,// 设置发件人邮箱的密码
serverAddress:mail_server_result[0].mail_address,// 设置发件人的邮箱
toAddress:mail_list_result[i].mail_to,// 设置收件人的邮箱
toCcAddress:mail_list_result[i].mail_cc,//设置抄送人的邮箱
toSubject:mail_list_result[i].subject,// 设置邮件的主题
toBody:mail_list_result[i].body // 设置邮件的正文
};
var sm = new MailSend();
var stringResult = sm.sendMain(JSON.stringify(jsonString));//调用接口
var ob = JSON.parse(stringResult);//将接口返回的string字符串解析成对象
if (ob.status=='S') {
$bm('sys.SYS405.zj_sys_mailing_list').update({
mailing_list_id: mail_list_result[i].mailing_list_id
});
......@@ -64,7 +38,6 @@
});
}
}
}
} catch (e) {
raise_app_error(e);
}
......
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