Commit c3befb39 authored by TIANZHI.HU's avatar TIANZHI.HU

凭证导入工作流开发1 add by 39135 HuTianzhi

parent 0aa092a2
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
FROM hls_journal_detail_imp t FROM hls_journal_detail_imp t
WHERE t.journal_header_id = t1.journal_header_id) je_detail_count, WHERE t.journal_header_id = t1.journal_header_id) je_detail_count,
t1.wfl_status, t1.wfl_status,
(select v.code_value_name value_name from sys_code_values_v v where v.code = 'HLS536_WFL_STATUS' and v.code_value = t1.wfl_status) wfl_status_n (select v.code_value_name value_name from sys_code_values_v v where v.code = 'HLS536_WFL_STATUS' and v.code_value = t1.wfl_status) wfl_status_n,
t1.journal_type
FROM hls_journal_header_imp t1 order by t1.journal_header_id desc FROM hls_journal_header_imp t1 order by t1.journal_header_id desc
]]></bm:query-sql> ]]></bm:query-sql>
</bm:operation> </bm:operation>
......
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="execute">
<bm:update-sql>
<![CDATA[
begin
hls_journal_import_pkg.submit_hls_journal_tmp(
p_journal_header_id => ${@journal_header_id});
end;
]]>
</bm:update-sql>
<!--<bm:parameters>
<bm:parameter inputPath="/session/@session_id"/>
</bm:parameters>-->
</bm:operation>
</bm:operations>
</bm:model>
...@@ -13,6 +13,12 @@ ...@@ -13,6 +13,12 @@
<a:link id="get_new_journal_num_link_id" model="hls.HLS530.get_new_journal_number" modelaction="update"/> <a:link id="get_new_journal_num_link_id" model="hls.HLS530.get_new_journal_number" modelaction="update"/>
<a:link id="get_document_type_id" model="csh.CSH511.get_document_type" modelaction="update"/> <a:link id="get_document_type_id" model="csh.CSH511.get_document_type" modelaction="update"/>
<script><![CDATA[ <script><![CDATA[
Leaf.onReady(function() {
if ('${/parameter/@maintain_type}' == 'READONLY') {
const btn_dom = document.getElementById('${/parameter/@layout_code}' + '_save');
btn_dom.remove();
}
});
window['${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function(ds, record) { window['${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function(ds, record) {
var journal_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_journal_header'); var journal_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_journal_header');
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<a:screen-include screen="modules/hls/hls_common_javascript.lview"/> <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_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_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"/>
<script><![CDATA[ <script><![CDATA[
//查询按钮 //查询按钮
...@@ -56,6 +56,64 @@ ...@@ -56,6 +56,64 @@
}); });
} }
// 提交审批
// 可以批量提交,批量提交审批的数据在一个工作流里面,有一个批次表 存 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){
Leaf.showMessage('${l:PROMPT}', '未选择!');
return ;
}
var journal_header_id_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);
journal_type_list.push(journal_type);
}
var check_flag = journal_type_list.every(val => val === journal_type_list[0]);
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);
}
}*/
}
function hls536_link_dynamic(reocrd_id, journal_header_id) { function hls536_link_dynamic(reocrd_id, journal_header_id) {
var maintain_type = 'UPDATE'; var maintain_type = 'UPDATE';
var record = $('hls_journal_header_result_ds').findById(reocrd_id); var record = $('hls_journal_header_result_ds').findById(reocrd_id);
...@@ -159,7 +217,7 @@ ...@@ -159,7 +217,7 @@
<a:toolbarButton click="hls536_journal_reset" text="HLS.RESET"/> <a:toolbarButton click="hls536_journal_reset" text="HLS.RESET"/>
<a:toolbarButton click="hls536_journal_query" text="HLS.QUERY"/> <a:toolbarButton click="hls536_journal_query" text="HLS.QUERY"/>
<a:toolbarButton click="hls536_journal_import" text="导入凭证模板"/> <a:toolbarButton click="hls536_journal_import" text="导入凭证模板"/>
<!--<a:toolbarButton click="hls536_journal_send" text="提交审批"/>--> <a:toolbarButton click="hls536_journal_send" text="提交审批"/>
</a:screenTopToolbar> </a:screenTopToolbar>
<a:form column="5" labelSeparator=" " labelWidth="100" marginWidth="40" title="HAP_QUERY_TITLE"> <a:form column="5" labelSeparator=" " labelWidth="100" marginWidth="40" title="HAP_QUERY_TITLE">
......
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