Commit d0c76c47 authored by 18083's avatar 18083

I-19568 【建机】佣金资产管理费进项票税率自定义-资产管理费部分优化开发

parent fbf7e9cd
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:ns2="leaf.database.local.oracle" xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
begin
hl_wfl_action_prompt_pkg.wfl_node_action_prompt(p_wfl_node_action_id =>${@node_action_id} ,
p_instance_id => ${@instance_id},
p_prompt_flag => ${@prompt_flag},
p_prompt => ${@action_prompt}) ;
end;
]]></bm:update-sql>
<bm:parameters>
<bm:parameter name="prompt_flag" dataType="java.lang.String" input="false" output="true" outputPath="@prompt_flag"/>
<bm:parameter name="action_prompt" dataType="java.lang.String" input="false" output="true" outputPath="@action_prompt"/>
</bm:parameters>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:e="leaf.service.exception" xmlns:o="leaf.database.local.oracle" xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="WLF_CODE_DESCRIPTION_RULE" needAccessControl="false">
<bm:fields>
<bm:field name="rule_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="RULE_ID"/>
<bm:field name="description_rule" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION_RULE"/>
<bm:field name="description_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION_CODE"/>
</bm:fields>
<bm:features>
<f:standard-who/>
<o:sequence-pk sequenceName="wlf_code_description_rule_s"/>
</bm:features>
<bm:primary-key>
<bm:pk-field name="rule_id"/>
</bm:primary-key>
<bm:operations>
<bm:operation name="query">
<bm:field name="description_rule" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION_RULE"/>
<bm:field name="description_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION_CODE"/>
<bm:query-sql><![CDATA[
select
t1.rule_id,
t1.description_rule,
t1.description_code
from wlf_code_description_rule t1
where t1.node_action_id=${@node_action_id}
#WHERE_CLAUSE#
order by t1.description_code
]]></bm:query-sql>
</bm:operation>
<bm:operation name="insert">
<bm:field name="description_rule" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION_RULE"/>
<bm:field name="description_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION_CODE"/>
<bm:update-sql><![CDATA[
begin
insert into wlf_code_description_rule
(rule_id,description_rule,description_code,node_action_id)
values
(wlf_code_description_rule_s.nextval,${@description_rule},${@description_code},${@node_action_id});
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -18,6 +18,9 @@
<bm:field name="node_action_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="NODE_ACTION_DESC" prompt="ZJ_WFL_WORKFLOW_NODE_ACTION.NODE_ACTION_DESC"/>
<bm:field name="node_action_prompt" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="NODE_ACTION_PROMPT" prompt="ZJ_WFL_WORKFLOW_NODE_ACTION.NODE_ACTION_PROMPT"/>
<bm:field name="default_action_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DEFAULT_ACTION_FLAG" prompt="ZJ_WFL_WORKFLOW_NODE_ACTION.DEFAULT_ACTION_FLAG"/>
<bm:field name="node_action_prompt_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="NODE_ACTION_PROMPT_FLAG" prompt="ZJ_WFL_WORKFLOW_NODE_ACTION.NODE_ACTION_PROMPT_FLAG"/>
<bm:field name="node_action_rule_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="NODE_ACTION_RULE_FLAG" prompt="ZJ_WFL_WORKFLOW_NODE_ACTION.NODE_ACTION_RULE_FLAG"/>
<bm:field name="prompt_method" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PROMPT_METHOD" prompt="ZJ_WFL_WORKFLOW_NODE_ACTION.PROMPT_METHOD"/>
</bm:fields>
<bm:operations>
<bm:operation name="query">
......@@ -38,8 +41,11 @@
t1.service_desc,
t1.node_action_desc,
nvl(t1.node_action_prompt,'您确认吗?') as node_action_prompt,
t1.default_action_flag
from zj_wfl_workflow_node_action_v t1
t1.default_action_flag,
t1.node_action_prompt_flag,
t1.node_action_rule_flag,
t1.prompt_method
from zj_wfl_workflow_node_action_v t1
#WHERE_CLAUSE#
order by t1.sequence_num
......
......@@ -26,7 +26,6 @@
//提交审批
window['${/parameter/@layout_code}_submit_approval_layout_dynamic_click'] = function() {
debugger;
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hl_asset_manage_fee');
var records = $(ds_id).getSelected();
var ParaData = [];
......@@ -45,10 +44,20 @@
return;
}
}
if(Ext.isEmpty(records[i].data.vat_rate)||Ext.isEmpty(records[i].data.vat_rate_date)){
$L.showMessage("提示",'当前代理店未填写【进项票税率】/【进项票税率到期日】,请前往“租前管理-主数据管理-代理店管理”功能填写!');
return;
}
if(Leaf.formatDate(records[i].data.vat_rate_date)<Leaf.formatDate(new Date())){
$L.showMessage("提示",'当前代理店的进项票税率到期日为'+Leaf.formatDate(records[i].data.vat_rate_date)+',请前往“租前管理-主数据管理-代理店管理”功能重新维护到期日!');
return;
}
records[i].set('_status','execute');
ParaData.push(records[i].data);
}
Leaf.showConfirm('${l:PROMPT}', '确认提交资产管理费对账工作流?', function () {
var vat_rate =records[0].get('vat_rate');
var vat_rate_date =Leaf.formatDate(records[0].get('vat_rate_date'));
Leaf.showConfirm('${l:PROMPT}', '当前代理店的进项票税率为'+vat_rate+',有效期到'+vat_rate_date+',确认提交资产管理费对账工作流?', function () {
Leaf.request({
url: $('asset_check_wfl_link_id').getUrl(),
para: ParaData,
......@@ -66,7 +75,6 @@
};
function open_contract_detail(record_id, ds_id) {
debugger;
var record = $(ds_id).findById(record_id);
var param = {};
param['contract_id'] = record.get('contract_id');
......
......@@ -281,6 +281,17 @@
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}}
//进项票税率有效期不能早于系统当前实际
var vat_rate_date=head_record.get('vat_rate_date');
if(vat_rate_date){
var start_date = Leaf.formatDate(vat_rate_date);
var end_date = Leaf.formatDate(new Date());
if (start_date<end_date) {
$L.showErrorMessage("错误",'进项票有效期不能早于系统当前日期!',null,null);
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
}
};
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
......
......@@ -82,7 +82,8 @@
<a:link id="pageLink_view_graphics" url="${/request/@context_path}/modules/zjwfl/zj_wfl_graphics.lview"/>
<a:link id="zj_wfl_approve_upload_link_id" url="${/request/@context_path}/uploadFile.lview"/>
<a:link id="zjwfl5110_notice_link" model="zjwfl.ZJWFL5110.zj_wfl_approve_agree" modelaction="execute"/>
<script><![CDATA[
<a:link id="zjwfl5110_get_zj_wfl_prj_node_action_prompt_link" model="zjwfl.ZJWFL5110.hl_wfl_action_prompt" modelaction="execute"/>
<script><![CDATA[
function wflCmp(id) {
var cmp = $L.CmpManager.get(id);
......@@ -97,7 +98,7 @@
}
function zjwfl_before_approve_procedure(out_type){
var params ={out_object:'out_object',
var params ={out_object:'out_object',
out_type:'no_win'};
return params;
}
......@@ -158,7 +159,6 @@
}
function zjwfl5110_uploadAttach() {
debugger;
var rcpt_record_id = '${/parameter/@record_id}';
var workflowCode ='${/model/node_info_record/record/@workflow_code}';
if(workflowCode == 'ACR_INVOICE_REVERSE_WFL'){
......@@ -487,9 +487,11 @@
scope: this
});
}
var wfl_approve_save_flag = 'N';
var confirm_message = null;
function zjwfl5110_onButtonGroup(record, combobox_ds_id, wfl_node_action_id, wfl_node_action_prompt, wfl_action_type) {
//在提交请求的过程中锁屏
//在提交请求的过程中锁屏
zjwfl5110_approvePage_mask();
var node_action_id = '';
var node_action_prompt = '';
......@@ -552,41 +554,110 @@
return;
}
}
function execute_finnaly() {
if (wfl_approve_save_flag != 'N' && wfl_approve_save_flag != 'Y') {
zjwfl5110_approvePage_noMask();
return;
}
var record_id = '${/parameter/@record_id}';
var comment_text = $('comment_text_id').getValue();
var confirm_execute_flag = 'N';
var out_type;
var out_object;
var params;
//add by wangwei5743
//查看页面类型,不需要弹出提示
if (action_type != 5&&action_type != 7) {
var comment_record = $('comment_text_ds').getCurrentRecord();
if (action_type == 1 && comment_record && !comment_record.get('comment_text')) {
//comment_record.set('comment_text', '同意');
}
var record_id = '${/parameter/@record_id}';
var comment_text = $('comment_text_id').getValue();
var wfl_ajax_flag = 'N';
Leaf.request({
url: $('zjwfl5110_get_zj_wfl_prj_node_action_prompt_link').getUrl(),
para: {
node_action_id: wfl_node_action_id,
instance_id:'${/parameter/@instance_id}'
},
success: function(res) {
if(res.result.prompt_flag=='Y'){
node_action_prompt = res.result.action_prompt;
}
var length=node_action_prompt.length;
var showConfirmHight=100;
if(length >30){
showConfirmHight=130;
}
var win = Leaf.showConfirm('是否确认', node_action_prompt, function() {
confirm_execute_flag = 'Y';
if (action_type == 1) {
params = zjwfl_before_approve_procedure(out_type);
out_object = params.out_object;
out_type = params.out_type;
if (out_type == 'win') {
out_object.addListener('close', function() {
zjwfl_approve_step(record_id, comment_text, node_action_id);
});
} else {
zjwfl_approve_step(record_id, comment_text, node_action_id);
}
} else {
zjwfl_approve_step(record_id, comment_text, node_action_id);
}
wfl_ajax_flag = 'Y';
//设置请求的时间
Ext.Ajax.timeout = 20 * 60 * 1000;
Leaf.request({
url: $('svcLink_agree').getUrl(),
para: {
record_id: record_id,
comment_text: comment_text,
node_action_id: node_action_id
},
success: function(response) {
//解锁
zjwfl5110_approvePage_noMask();
if (response.result.result_num == 0) {
Leaf.SideBar.show({
msg: '提交成功',
duration: 2000
});
zjwfl5110_approvePage_close();
}
},
failure: function() {
zjwfl5110_approvePage_noMask();
},
error: function() {
zjwfl5110_approvePage_noMask();
},
scope: this
});
}, function() {
zjwfl5110_approvePage_noMask();
});
},300,showConfirmHight);
win.on('close', function() {
if (confirm_execute_flag == 'N') {
if (action_type == 1 && comment_record && comment_record.get('comment_text') == '同意') {
comment_record.set('comment_text', '');
}
if (wfl_ajax_flag == 'N') {
zjwfl5110_approvePage_noMask();
}
});
},
failure: function() {
zjwfl5110_approvePage_noMask();
},
error: function() {
zjwfl5110_approvePage_noMask();
},
scope: this
});
}
if (action_type != 5&&action_type != 7) {
if (confirm_message) {
var temp_confirm_flag = 'N';
var wfl_confirm_win = Leaf.showConfirm('确认', confirm_message, function() {
temp_confirm_flag = 'Y';
execute_finnaly();
}, function() {
zjwfl5110_approvePage_noMask();
});
wfl_confirm_win.on('close', function() {
if (temp_confirm_flag == 'N') {
zjwfl5110_approvePage_noMask();
}
});
} else {
execute_finnaly();
}
}
}
......
<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:c="leaf.application.action" xmlns:a="http://www.leaf-framework.org/application" xmlns:p="uncertain.proc" trace="true">
<a:init-procedure>
</a:init-procedure>
<a:view>
<script><![CDATA[
function close_actionParaPage(){
$('zj_wfl_workflow_description_rule_window').close();
}
function save_actionParaDs(){
debugger;
var ds = $('actionParaDs');
var record = ds.getCurrentRecord();
record.set('node_action_id','${/parameter/@node_action_id}');
if(ds.validate)
{
ds.submit();
}
}
]]></script>
<a:dataSets>
<a:dataSet id="instanceParaValueDs">
<a:datas dataSource="/model/instance_para_value_list"/>
</a:dataSet>
<a:dataSet id="paraTypeDs" lookupCode="ZJ_WFL_PARAMETER_TYPE"/>
<a:dataSet id="actionParaPage_actionDs" loadData="true" model="zjwfl.zj_wfl_workflow_node_action" >
<a:fields>
<a:field name="action_type_desc" readOnly="true"/>
<a:field name="sequence_num" readOnly="true"/>
<a:field name="procedure_code" readOnly="true"/>
<a:field name="procedure_desc" readOnly="true"/>
</a:fields>
</a:dataSet>
<a:dataSet id="actionParaDs" loadData="true" model="zjwfl.zj_wfl_workflow_description_rule" queryUrl="${/request/@context_path}/autocrud/zjwfl.ZJWFL5120.zj_wfl_workflow_description_rule/query?node_action_id=${/session/@node_action_id}" fetchAll="true" selectable="true" >
<a:fields>
<a:field name="description_code" />
<a:field name="description_rule" />
<a:field name="rule_id"/>
<a:field name="node_action_id" defaultValue="${/session/@node_action_id}"/>
</a:fields>
<a:events>
<!--<a:event name="update" handler="onUpdate_actionParaDs"/>-->
</a:events>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:form column="2" labelWidth="100" title="节点动作信息">
<a:textField name="sequence_num" bindTarget="actionParaPage_actionDs" prompt="节点动作序号"/>
<a:textField name="procedure_code" bindTarget="actionParaPage_actionDs" prompt="过程代码"/>
<a:textField name="procedure_desc" bindTarget="actionParaPage_actionDs" prompt="过程描述"/>
<a:textField name="action_type_desc" bindTarget="actionParaPage_actionDs" prompt="节点动作类型"/>
</a:form>
<a:grid id="actionParaDs_grid" bindTarget="actionParaDs" height="300" navBar="true" width="970">
<a:toolBar>
<a:button type="add"/>
<a:button type="delete" icon="${/request/@context_path}/images/remove.png" text="HAP_DELETE"/>
</a:toolBar>
<a:columns>
<a:column name="description_code" align="center" editor="actionParaDs_grid_tf" prompt="规则代码" width="200"/>
<a:column name="description_rule" align="center" editor="actionParaDs_grid_tf" prompt="规则描述" width="744"/>
</a:columns>
<a:editors>
<a:textField id="actionParaDs_grid_tf"/>
</a:editors>
</a:grid>
<a:hBox style="float:right;margin-right:10px;">
<a:button click="save_actionParaDs" text="HAP_SAVE"/>
<a:button click="close_actionParaPage" text="HAP_CLOSE"/>
</a:hBox>
</a:screenBody>
</a:view>
</a:screen>
\ No newline at end of file
......@@ -108,6 +108,34 @@
return '';
}
function render_description_rule(value, record, name) {
if (name == 'description_rule_def') {
if (!record.isNew) {
var node_action_id = record.get('node_action_id');
var action_type = record.get('action_type');
var procedure_id = record.get('procedure_id');
return '<a href="javascript:winOpen_description_rule(' + node_action_id + ',' + procedure_id + ')">描述规则</a>';
}
}
}
function winOpen_description_rule(id, pid) {
new Leaf.Window({
id: 'zj_wfl_workflow_description_rule_window',
url: 'zj_wfl_workflow_description_rule.lview',
params: {
node_action_id: id,
node_id: '${/parameter/@node_id}',
procedure_id: pid,
workflow_id: '${/model/node_record/record/@workflow_id}'
},
title: '节点描述规则',
height: 500,
width: 1000
});
}
function winOpen_node_service_para(service_id, source_type) {
new Leaf.Window({
......@@ -578,7 +606,14 @@
</a:field>
<a:field name="node_action_desc" maxLength="50" required="true"/>
<a:field name="node_action_prompt" maxLength="100"/>
</a:fields>
<a:field name="node_action_prompt_flag" checkedValue="Y" defaultValue="N" uncheckedValue="N"/>
<a:field name="node_action_rule_flag" checkedValue="Y" defaultValue="N" uncheckedValue="N"/>
<a:field name="prompt_method" lovGridHeight="300" lovHeight="450" lovService="zjwfl.zj_wfl_workflow_procedure_lov?procedure_type_code=FUNCTION" lovWidth="800" title="过程选择">
<a:mapping>
<a:map from="exec_procedure" to="prompt_method"/>
</a:mapping>
</a:field>
</a:fields>
<a:events>
<a:event name="update" handler="onUpdate_nodeActionDs"/>
</a:events>
......@@ -935,8 +970,12 @@
<a:column name="service_name" autoAdjust="false" editorFunction="editorFun_nodeActionDs_grid" prompt="页面名称" showTitle="true" width="150"/>
<a:column name="service_desc" autoAdjust="false" prompt="页面描述" showTitle="true" width="100"/>
<a:column name="node_action_para" align="center" prompt="动作参数" renderer="render_nodeActionDs_grid" width="60"/>
<a:column name="default_action_flag" editor="nodeActionDs_grid_check" prompt="默认动作" width="50"/>
</a:columns>
<a:column name="default_action_flag" editor="nodeActionDs_grid_check" prompt="默认动作" width="50"/>
<a:column name="node_action_prompt_flag" editor="nodeActionDs_grid_check" prompt="节点动作提示" width="80"/>
<a:column name="prompt_method" editor="nodeActionDs_grid_lov" width="100" prompt="提示方法"/>
<a:column name="node_action_rule_flag" editor="nodeActionDs_grid_check" width="80" prompt="是否使用规则"/>
<a:column name="description_rule_def" align="center" renderer="render_description_rule" prompt="描述规则" width="80"/>
</a:columns>
<a:editors>
<a:numberField id="nodeActionDs_grid_nf_integer" allowDecimals="false" allowNegative="false"/>
<a:comboBox id="nodeActionDs_grid_comb"/>
......
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