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
c5927449
Commit
c5927449
authored
Dec 21, 2022
by
TIANZHI.HU
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
凭证导入工作流开发2 add by 39135 HuTianzhi
parent
d11eb7a7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
115 additions
and
39 deletions
+115
-39
submit_hls_journal_tmp.lwm
...app/WEB-INF/classes/hls/HLS536/submit_hls_journal_tmp.lwm
+53
-1
batch_hls_journal_tmp.lsc
src/main/webapp/modules/hls/HLS536/batch_hls_journal_tmp.lsc
+16
-0
hls_journal_import_entrance.lview
...bapp/modules/hls/HLS536/hls_journal_import_entrance.lview
+44
-36
hls_journal_import_wfl.lview
...in/webapp/modules/hls/HLS536/hls_journal_import_wfl.lview
+2
-2
No files found.
src/main/webapp/WEB-INF/classes/hls/HLS536/submit_hls_journal_tmp.lwm
View file @
c5927449
<?xml version="1.0" encoding="UTF-8"?>
<bm:model
xmlns:bm=
"http://www.leaf-framework.org/schema/bm"
>
<bm:operations>
<bm:operation
name=
"insert"
>
<bm:parameters>
<bm:parameter
name=
"journal_submit_batch_id"
output=
"true"
outputPath=
"@journal_submit_batch_id"
/>
</bm:parameters>
<bm:update-sql>
<![CDATA[
declare
v_journal_submit_batch_id hls_journal_submit_batch.journal_submit_batch_id%TYPE := hls_journal_submit_batch_s.nextval;
begin
${@journal_submit_batch_id} := v_journal_submit_batch_id;
insert into hls_journal_submit_batch
(journal_submit_batch_id,
instance_id,
wfl_status,
wfl_type,
created_by,
creation_date,
last_updated_by,
last_update_date)
values
(v_journal_submit_batch_id,
null,
null,
${@wfl_type},
${/session/@user_id},
sysdate,
${/session/@user_id},
sysdate
);
end;
]]>
</bm:update-sql>
</bm:operation>
<bm:operation
name=
"update"
>
<bm:update-sql>
<![CDATA[
update hls_journal_header_imp hjhi
set hjhi.wfl_status = 'APPROVING',
hjhi.journal_submit_batch_id = ${/parameter/@journal_submit_batch_id},
hjhi.last_updated_by = ${/session/@user_id},
hjhi.last_update_date = sysdate
where hjhi.journal_header_id = ${@journal_header_id}
]]>
</bm:update-sql>
<!--<bm:parameters>
<bm:parameter inputPath="/session/@session_id"/>
</bm:parameters>-->
</bm:operation>
<bm:operation
name=
"execute"
>
<bm:update-sql>
<![CDATA[
begin
hls_journal_import_pkg.submit_hls_journal_tmp(
p_journal_header_id =>
${@journal_header_id});
p_journal_submit_batch_id =>
${/parameter/@journal_submit_batch_id},
p_user_id => ${/session/@user_id},
p_company_id => ${/session/@company_id}
);
end;
]]>
</bm:update-sql>
...
...
src/main/webapp/modules/hls/HLS536/batch_hls_journal_tmp.lsc
0 → 100644
View file @
c5927449
<?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>
<!--lsc文件在日志中打印参数信息-->
<p:echo></p:echo>
<a:model-insert
model=
"hls.HLS536.submit_hls_journal_tmp"
trace=
"true"
/>
<a:batch-apply
sourcepath=
"/parameter/details"
>
<!--只要是 record 里面没有 被 改变 的 数字字段 ,没有 改变还是 数字类型的,但是 改变后 传到 后端是 String 类型 的 了 -->
<a:model-update
model=
"hls.HLS536.submit_hls_journal_tmp"
trace=
"true"
/>
</a:batch-apply>
<a:model-execute
model=
"hls.HLS536.submit_hls_journal_tmp"
trace=
"true"
/>
</a:init-procedure>
<a:service-output
output=
"/parameter"
/>
</a:service>
src/main/webapp/modules/hls/HLS536/hls_journal_import_entrance.lview
View file @
c5927449
...
...
@@ -16,7 +16,7 @@
<a:screen-include
screen=
"modules/hls/hls_common_javascript.lview"
/>
<!--<a:link id="hls_journal_import_link" url="${/request/@context_path}/modules/hls/HLS536/hls_journal_import_handle.lview"/>-->
<a:link
id=
"hls_journal_import_link"
url=
"${/request/@context_path}/modules/hls/HLS536/hls_journal_import_upload.lview"
/>
<a:link
id=
"hls_journal_submit_link_id"
model=
"hls.HLS536.submit_hls_journal_tmp"
modelaction=
"execute
"
/>
<a:link
id=
"hls_journal_submit_link_id"
url=
"${/request/@context_path}/modules/hls/HLS536/batch_hls_journal_tmp.lsc
"
/>
<script>
<![CDATA[
//查询按钮
...
...
@@ -59,7 +59,6 @@
// 提交审批
// 可以批量提交,批量提交审批的数据在一个工作流里面,有一个批次表 存 batch_id,这里要把批量提交的数据 update batch_id
function hls536_journal_send() {
debugger;
var ds_id = 'hls_journal_header_result_ds';
var records = $(ds_id).getSelected();
if(records.length == 0){
...
...
@@ -67,51 +66,60 @@
return ;
}
var journal_header_id_list = [];
var journal_header_imp_list = [];
var journal_type_list = [];
//同一个模板的凭证才能批量提交
for (let i = 0; i < records.length; i++) {
var record = records[i];
//凭证模板类型
var journal_type = record.get('journal_type');
//单据主键
var journal_header_id = record.get('journal_header_id');
journal_header_id_list.push(journal_header_id);
record.set('_status','update')
journal_header_imp_list.push(record.data);
journal_type_list.push(journal_type);
}
var check_flag = journal_type_list.every(val =>
val === journal_type_list[0]);
if (check_flag){
//普通工资和 BPO工资 共用一个 工资工作流,所以可以一起提交审批
var equal_flag = journal_type_list.every(val =>
val === journal_type_list[0]);
var is_salaries = journal_type_list.every(val => val === 'GENERAL_SALARIES' || val === 'BPO_SALARIES');
var check_flag = false;
if ((!equal_flag
&&
is_salaries) || equal_flag){
check_flag = true;
}
if (!check_flag){
Leaf.showMessage('${l:PROMPT}', '同一个模板的凭证才能批量提交!');
return ;
}
/*if ($(ds_id).validate()) {
if (record.dirty != true) {
Leaf.showConfirm('${HLS.PROMPT}', '是否确认提交?', function () {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('hls_journal_submit_link_id').getUrl(),
para: {
journal_header_id: journal_header_id
},
success: function (res) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
Leaf.showMessage('提示', '提交审批成功!');
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this
});
}, null);
}
else {
Leaf.showMessage('提示', '请先保存再提交审批!', null, 350);
}
}*/
var param = {};
param['details'] = journal_header_imp_list;
//判断要走哪个工作流
if (!equal_flag
&&
is_salaries){
param['wfl_type'] = 'SALARIES';
}
if (equal_flag){
var journal_type = records[0].get('journal_type');
param['wfl_type'] = journal_type;
}
if ($(ds_id).validate()) {
Leaf.showConfirm('${l:HLS.PROMPT}', '是否确认提交审批?', function () {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
//先生成批次表数据,再update这几条数据的状态,最后提交工作流
Leaf.request({
url: $('hls_journal_submit_link_id').getUrl(),
para: param,
success: function (res) {
Leaf.Masker.unmask(Ext.getBody());
Leaf.showMessage('提示', '提交审批成功!');
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
}, null);
}
}
function hls536_link_dynamic(reocrd_id, journal_header_id) {
...
...
src/main/webapp/modules/hls/HLS536/hls_journal_import_wfl.lview
View file @
c5927449
...
...
@@ -34,8 +34,8 @@
param['function_code'] = 'HLS536';
param['document_id'] = journal_header_id;
// param['document_category'] = 'JE';
var
isEditable = '${/parameter/@isEditable
}';
if(
isEditable
== 'Y' ){
var
edit_flag = '${/parameter/@edit_flag
}';
if(
edit_flag
== 'Y' ){
param['function_usage'] = 'MODIFY';
param['maintain_type'] = 'UPDATE';
}else {
...
...
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