Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
leaf-hlcm
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hlcm
leaf-hlcm
Commits
bf2c6bef
Commit
bf2c6bef
authored
Mar 26, 2020
by
stone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[feat]付款申请履历打印
parent
fd49f28f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
4 deletions
+43
-4
csh_payment_create_entrance.lview
...bapp/modules/csh/CSH501/csh_payment_create_entrance.lview
+34
-1
csh_payment_req.lview
src/main/webapp/modules/csh/CSH501/csh_payment_req.lview
+0
-1
csh_payment_req_history_print.lsc
...bapp/modules/csh/CSH501/csh_payment_req_history_print.lsc
+9
-2
No files found.
src/main/webapp/modules/csh/CSH501/csh_payment_create_entrance.lview
View file @
bf2c6bef
<?xml version="1.0" encoding="UTF-8"?>
<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=
"csh_payment_req_create_link"
url=
"${/request/@context_path}/modules/csh/CSH501/csh_payment_req_selected.lview"
/>
<a:link
id=
"csh_payment_req_history_print_link_id"
url=
"${/request/@context_path}/modules/csh/CSH501/csh_payment_req_history_print.lsc"
/>
<a:link
id=
"get_layout_code_link_id"
model=
"cont.CON500.con_contract_get_layout_code"
modelaction=
"update"
/>
<a:link
id=
"tre_loan_contact_cancel_change_link_id"
model=
"lon.LON120.tre_loan_change_cancel"
modelaction=
"update"
/>
<a:link
id=
"csh501_csh_payment_req_link1_id"
url=
"${/request/@context_path}/modules/csh/CSH501/csh_payment_req.lview"
/>
<a:link
id=
"delete_payment_req_link_id"
model=
"csh.CSH501.delete_payment_req"
modelaction=
"batch_update"
/>
<script
type=
"text/javascript"
>
<![CDATA[
Leaf.onReady(function(){
//付款打印按钮只有会计担当和会计部长可见
if("${/model/role_info/record/@role_code}"!="0013"&&"${/model/role_info/record/@role_code}"!="0014"&&"${/model/role_info/record/@role_code}"!="HAND") {
//$('${/parameter/@layout_code}_user_button5').style.display='none';
Ext.fly('${/parameter/@layout_code}_user_button5').dom.style.display="none";
}else{
//$('${/parameter/@layout_code}_user_button1').style.display='none';
Ext.fly('${/parameter/@layout_code}_user_button1').dom.style.display="none";
}
})
window['${/parameter/@layout_code}_user_button5_layout_dynamic_click'] = function() {
var ds_id = '${/parameter/@layout_code}_G_CSH_REQ_2_csh_payment_req_hd_ds';
var records = $(ds_id).getSelected();
if(records.length !=1){
$L.showInfoMessage("提示",'只有审批通过的付款申请才能打印,且一次只能打印一个付款申请!');
return;
}
//获取该付款申请的头id
var payment_req_id=records[0].get('payment_req_id');
var payment_status=records[0].get('approval_status');
if(payment_status!="APPROVED"){
$L.showInfoMessage("提示",'只有审批通过的付款申请才能打印,且一次只能打印一个付款申请!');
return;
}
var url_l = $('csh_payment_req_history_print_link_id').getUrl() + '?document_id=' + payment_req_id + '&document_table=CSH_PAYMENT_APPROVE&file_path=${/parameter/@file_path}&batch_flag=Y&source_type=COMMON';
window.open(href = url_l, target = "_self");
}
//新增
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd');
...
...
src/main/webapp/modules/csh/CSH501/csh_payment_req.lview
View file @
bf2c6bef
...
...
@@ -453,7 +453,6 @@
var templet_code = 'CSH_PAYMENT_REQ';
// 根据不同的厂商调用不用的模板
console.log(hd_record.get('vender_name').indexOf('永立'));
if(hd_record.get('vender_name').indexOf('永立')>
=0){
var url_l = $('csh_payment_req_word_print_link_id').getUrl() + '?document_id=' + hd_record.get('payment_req_id') + '
&document_table=CSH_PAYMENT_REQ_YL&file_path=${/parameter/@file_path}&batch_flag=Y&source_type=COMMON';
}else{
...
...
src/main/webapp/modules/csh/CSH501/csh_payment_req_history_print.lsc
View file @
bf2c6bef
...
...
@@ -4,6 +4,7 @@
<a:model-update
model=
"hls.HLS811.hls_doc_file_templet_get_atm"
/>
<s:server-script
import=
"con_print_path.js"
>
<![CDATA[
importPackage(Packages.hls.plugin.docx4j);
importPackage(Packages.com.hand.hls.hlcm.util);
importPackage(java.io);
function copyFile(fOld, fNew) {
...
...
@@ -76,10 +77,16 @@
});
try {
$bm('csh.CSH501.csh_transaction_return_print').update({
document_id: $ctx.parameter.document_id,
document_table: $ctx.parameter.document_table
});
var brwt = new BookmarksReplaceWithText($instance('leaf.database.service.IDatabaseServiceFactory'), $instance('uncertain.ocm.IObjectRegistry'), $ctx.getData());
brwt.replaceBookmarkFromContent(to_file_path.toString(), record_data.content_id.toString(), 'COMMON');
download_file(to_file_name, to_file_path);
var resp = $ctx['_instance.javax.servlet.http.HttpServletResponse'];
HlsFileUtil.downloadFile(encodeURI(to_file_path,'utf-8'),encodeURI(to_file_name,'utf-8'),resp);
// download_file(encodeURI(to_file_name,'utf-8'), to_file_path);
// print(to_file_name);
} catch (e) {
raise_app_error(e);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment