Commit e8789058 authored by Darming's avatar Darming

[refactor]相关bug

parent 9e452e58
......@@ -20,6 +20,7 @@
and t.session_id = ${/session/@session_id}
]]></bm:query-sql>
</bm:operation> -->
/*aut_owner_user_default*/
<bm:operation name="query">
<bm:query-sql><![CDATA[
select t1.* from
......@@ -35,7 +36,7 @@
v.unit_name,
v.position_desc,
v.bp_code
from sys_user_v v, aut_owner_user_default t
from sys_user_v v, aut_owner_user_batch_tmp t
where v.user_id(+)=t.user_id ) t1
#WHERE_CLAUSE#
]]></bm:query-sql>
......@@ -68,7 +69,7 @@
)
VALUES
(
${@session_id},
${/session/@session_id},
${@user_id},
${/session/@user_id},
sysdate,
......
......@@ -115,7 +115,7 @@
<bm:query-field field="write_off_flag" queryExpression="t1.write_off_flag =${@write_off_flag}"/>
<bm:query-field field="bp_bank_account_name" queryOperator="like"/>
<bm:query-field field="receipt_type" queryOperator="="/>
<bm:query-field name="confirmed" queryExpression="(${@confirmed} = 'Y' and t1.confirmed_flag in ('ACCAUDITED','ACCAUDITING'))"/>
<bm:query-field name="confirmed" queryExpression="((${@confirmed} = 'Y' and t1.confirmed_flag in ('ACCAUDITED','ACCAUDITING')) or (${@confirmed} = 'N' and t1.confirmed_flag in ('NEW','CT_REJECTED','ACCAUDITING','ACCAUDITED')))"/>
<bm:query-field field="opposite_band_na" queryOperator="="/>
<bm:query-field name="transaction_num_from" queryExpression="t1.transaction_num &gt;= ${@transaction_num_from}"/>
<bm:query-field name="transaction_num_to" queryExpression="t1.transaction_num &lt;= ${@transaction_num_to}"/>
......
......@@ -16,7 +16,12 @@
<bm:field name="write_off_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="WRITE_OFF_AMOUNT" prompt="核销金额"/>
<bm:field name="write_off_date" databaseType="DATE" datatype="java.util.Date" physicalName="WRITE_OFF_DATE" prompt="CSH_TRANSACTION_PLAN.WRITE_OFF_DATE"/>
<bm:field name="company_id" databaseType="NUMBER" databasetype="java.lang.Long" physicalName="COMPANY_ID" prompt="CSH_TRANSACTION_PLAN.COMPANY_ID"/>
<bm:field name="create_wf_flag_desc" expression="(decode(t1.create_wf_flag,'Y','是','否'))"/>
<bm:field name="create_wf_flag"/>
</bm:fields>
<bm:query-fields>
<bm:query-field field="create_wf_flag" queryOperator="="/>
</bm:query-fields>
<bm:primary-key>
<bm:pk-field name="plan_id"/>
</bm:primary-key>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: ZLF
$Date: 2014-11-21 上午11:18:06
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
hls_bp_master_pkg.check_division
(
p_bp_id=>${@bp_id},
p_user_id=>${/session/@user_id}
);
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
\ No newline at end of file
......@@ -88,7 +88,8 @@
<select id="roleSelect" name="roleIdStr" class="bs-select form-control">
<#list roles as role>
<option value="${role.userRoleGroupId!}-${role.roleId!}-${role.companyId}">
${role.roleName!''}-${role.companyDescription!''}
<!-- ${role.roleName!''}-${role.companyDescription!''}-->
${role.roleName!''}
</option>
</#list>
</select>
......
......@@ -278,9 +278,9 @@
<a:textField name="employee_name" bindTarget="aut_authorize_user_batch_fix_query_ds" prompt="员工"/>
<a:textField name="name" bindTarget="aut_authorize_user_batch_fix_query_ds" prompt="用户"/>
<a:comboBox name="bp_category_n" bindTarget="aut_authorize_user_batch_fix_query_ds" prompt="账号类型"/>
<a:textField name="bp_name" bindTarget="aut_authorize_user_batch_fix_query_ds" prompt="商业伙伴名称"/>
<a:textField name="extra_nam" bindTarget="aut_authorize_user_batch_fix_query_ds" prompt="商业伙伴简称"/>
<a:textField name="bp_code" bindTarget="aut_authorize_user_batch_fix_query_ds" prompt="商业伙伴编号"/>
<!-- <a:textField name="bp_name" bindTarget="aut_authorize_user_batch_fix_query_ds" prompt="商业伙伴名称"/>-->
<!-- <a:textField name="extra_nam" bindTarget="aut_authorize_user_batch_fix_query_ds" prompt="商业伙伴简称"/>-->
<!-- <a:textField name="bp_code" bindTarget="aut_authorize_user_batch_fix_query_ds" prompt="商业伙伴编号"/>-->
</a:form>
<a:hBox>
<a:fieldSet marginHeight="180" style="padding:15px;" title="单据所有者">
......@@ -295,9 +295,9 @@
<!-- <a:column name="position_code" prompt="岗位代码" width="100"/> -->
<a:column name="position_desc" prompt="主岗位" width="180"/>
<a:column name="bp_category_n" prompt="账号类型" width="180"/>
<a:column name="bp_name" prompt="商业伙伴名称" width="180"/>
<a:column name="extra_nam" prompt="商业伙伴简称" width="180"/>
<a:column name="bp_code" prompt="商业伙伴编号" width="180"/>
<!-- <a:column name="bp_name" prompt="商业伙伴名称" width="180"/>-->
<!-- <a:column name="extra_nam" prompt="商业伙伴简称" width="180"/>-->
<!-- <a:column name="bp_code" prompt="商业伙伴编号" width="180"/>-->
</a:columns>
</a:grid>
<!-- </a:treeGrid> -->
......@@ -362,25 +362,25 @@
</a:fieldSet>
</a:hBox>
</a:screenBody>
<!-- <script type="text/javascript"><![CDATA[
//初始化临时表中数据
Leaf.onReady(function(){
Leaf.Masker.mask(Ext.getBody(),'${l:HLS.EXECUTING}');
Leaf.request({
url:$('aut_owner_user_tmp_init_link').getUrl(),
success:function(){
Leaf.Masker.unmask(Ext.getBody());
},
failure:function(){
Leaf.Masker.unmask(Ext.getBody());
},
error:function(){
Leaf.Masker.unmask(Ext.getBody());
},
scope:this
}
);
});
]]></script> -->
<script type="text/javascript"><![CDATA[
// //初始化临时表中数据
// Leaf.onReady(function(){
// Leaf.Masker.mask(Ext.getBody(),'${l:HLS.EXECUTING}');
// Leaf.request({
// url:$('aut_owner_user_tmp_init_link').getUrl(),
// success:function(){
// Leaf.Masker.unmask(Ext.getBody());
// },
// failure:function(){
// Leaf.Masker.unmask(Ext.getBody());
// },
// error:function(){
// Leaf.Masker.unmask(Ext.getBody());
// },
// scope:this
// }
// );
// });
]]></script>
</a:view>
</a:screen>
......@@ -97,41 +97,35 @@
<a:screenBody>
<a:screenTopToolbar>
<a:gridButton click="fix_close" text="HLS.CLOSE"/>
<a:gridButton click="fix_save" text="HLS.SAVE"/>
<!-- <a:gridButton click="fix_save" text="HLS.SAVE"/>-->
<a:gridButton click="fix_query" text="查询"/>
</a:screenTopToolbar>
<a:form column="3" labelWidth="200" title="查询条件" width="900">
<a:textField name="bp_category" bindTarget="aut_woner_user_batch_fix_form_ds" prompt="账号类型" width="150"/>
<a:textField name="employee_name" bindTarget="aut_woner_user_batch_fix_form_ds" prompt="员工姓名" width="150"/>
<a:textField name="extra_nam" bindTarget="aut_woner_user_batch_fix_form_ds" prompt="商业伙伴简称" width="150"/>
<a:textField name="bp_code" bindTarget="aut_woner_user_batch_fix_form_ds" prompt="商业伙伴编码" width="150"/>
<a:textField name="bp_name" bindTarget="aut_woner_user_batch_fix_form_ds" prompt="商业伙伴名称" width="150"/>
<!-- <a:textField name="extra_nam" bindTarget="aut_woner_user_batch_fix_form_ds" prompt="商业伙伴简称" width="150"/>-->
<!-- <a:textField name="bp_code" bindTarget="aut_woner_user_batch_fix_form_ds" prompt="商业伙伴编码" width="150"/>-->
<!-- <a:textField name="bp_name" bindTarget="aut_woner_user_batch_fix_form_ds" prompt="商业伙伴名称" width="150"/>-->
<a:textField name="unit_name" bindTarget="aut_woner_user_batch_fix_form_ds" prompt="部门" width="150"/>
<a:textField name="position_desc" bindTarget="aut_woner_user_batch_fix_form_ds" prompt="主岗位" width="150"/>
</a:form>
<a:grid bindTarget="aut_woner_user_batch_fix_ds" height="400" navBar="true" width="1100">
<a:toolBar>
<!-- <a:button type="add"/>-->
<!-- <a:button type="delete"/> -->
<!-- <a:button type="save"/> --><![CDATA[
]]></a:toolBar>
<a:button type="add"/>
<a:button type="delete"/>
<a:button type="save"/>
</a:toolBar>
<a:columns>
<a:column name="user_name" editorFunction="aut_woner_user_batch_fix_ef"/>
<a:column name="authorized_user_desc"/>
<a:column name="employee_code"/>
<a:column name="employee_name"/>
<a:column name="bp_category" prompt="账号类型"/>
<a:column name="extra_nam" prompt="商业伙伴简称"/>
<a:column name="bp_code" prompt="商业伙伴编码"/>
<a:column name="bp_name" prompt="商业伙伴名称"/>
<a:column name="unit_name" prompt="部门"/>
<a:column name="position_desc" prompt="主岗位"/>
<!-- <a:column name="bp_category" prompt="账号类型"/>-->
<!-- <a:column name="extra_nam" prompt="商业伙伴简称"/>-->
<!-- <a:column name="bp_code" prompt="商业伙伴编码"/>-->
<!-- <a:column name="bp_name" prompt="商业伙伴名称"/>-->
<!-- <a:column name="unit_name" prompt="部门"/>-->
<!-- <a:column name="position_desc" prompt="主岗位"/>-->
</a:columns>
<a:editors>
<a:lov id="aut_woner_user_batch_fix_lov"/>
......
......@@ -637,6 +637,7 @@
<a:field name="currency_code_from"/>
<a:field name="currency_name_to_display" displayField="currency_name" options="currency_ds" returnField="currency_code_to" valueField="currency_code"/>
<a:field name="currency_code_to"/>
<a:field name="confirmed" defaultValue="N"/>
<!-- <a:field name="transaction_type" defaultValue="RECEIPT"/>-->
<a:field name="transaction_category" defaultValue="BUSINESS"/>
<!-- <a:field name="write_off_flag_desc" displayField="code_value_name" options="write_off_flag_ds" returnField="write_off_flag" valueField="code_value"/>-->
......
......@@ -528,7 +528,8 @@
<a:dataSet id="csh_transaction_receipt_write_off_query_ds" autoCreate="true">
<a:fields>
<a:field name="write_off_flag"/>
<a:field name="cw_flag" defaultValue="Y"/>
<a:field name="reversed_flag" defaultValue="N"/>
<a:field name="cw_flag" defaultValue="N"/>
<a:field name="confirmed" defaultValue="Y"/>
<a:field name="confirmed_flag_desc" options="confirmed_flag_ds" valueField="code_value"
displayField="code_value_name" returnField="confirmed_flag" defaultValue="核销确认中"/>
......@@ -670,7 +671,7 @@
<!-- renderer="Leaf.formatMoney" prompt="未分配金额"/>-->
<!-- <a:column name="status_desc" prompt="单据状态" width="120" align="center"/>-->
<a:column name="write_off_flag_desc" prompt="核销状态" width="120" align="center"/>
<a:column name="confirmed_flag_desc" prompt="单据状态" width="120" align="center"/>
<a:column name="confirmed_flag_desc" prompt="单据审批状态" width="120" align="center"/>
<!-- <a:column name="review_status_desc" prompt="分配状态" width="80"/>-->
<!-- <a:column name="ref_v05" prompt="备注" width="100"/>-->
<a:column name="created_user_name" prompt="制单人" width="120" align="center"/>
......
......@@ -519,6 +519,7 @@
<a:record code_value="ACCAUDITED" code_value_name="收款已确认"/>
<a:record code_value="WF_APPROVING" code_value_name="核销确认中"/>
<a:record code_value="APPROVED" code_value_name="核销已确认"/>
<a:record code_value="WF_REJECTED" code_value_name="核销退回"/>
</a:datas>
</a:dataSet>
<a:dataSet id="csh531n_ds_collection_classes_ds" lookupCode="DS_COLLECTION_CLASSES"/>
......@@ -535,6 +536,7 @@
<a:dataSet id="csh_transaction_receipt_write_off_query_ds" autoCreate="true">
<a:fields>
<a:field name="write_off_flag"/>
<a:field name="reversed_flag" defaultValue="N"/>
<a:field name="cw_flag" defaultValue="Y"/>
<a:field name="confirmed_flag_desc" options="confirmed_flag_ds" valueField="code_value"
displayField="code_value_name" returnField="confirmed_flag" defaultValue="收款已确认"/>
......@@ -678,7 +680,7 @@
<!-- renderer="Leaf.formatMoney" prompt="未分配金额"/>-->
<!-- <a:column name="status_desc" prompt="单据状态" width="120" align="center"/>-->
<a:column name="write_off_flag_desc" prompt="核销状态" width="120" align="center"/>
<a:column name="confirmed_flag_desc" prompt="单据状态" width="120" align="center"/>
<a:column name="confirmed_flag_desc" prompt="单据审批状态" width="120" align="center"/>
<!-- <a:column name="review_status_desc" prompt="分配状态" width="80"/>-->
<!-- <a:column name="ref_v05" prompt="备注" width="100"/>-->
<a:column name="created_user_name" prompt="制单人" width="120" align="center"/>
......
......@@ -94,6 +94,9 @@
return 'csh_write_off_grid_dp';
}
if (write_off_type == 'RECEIPT_ADVANCE_RECEIPT') {
if(record.get('create_wf_flag') == 'Y'){
return;
}
return 'csh_transaction_advanced_grid_dp';
}
if (write_off_type == 'RECEIPT_DEPOSIT_POOL') {
......@@ -519,26 +522,27 @@
if (sum > header_rec.get('unwrite_off_amount')) {
Leaf.showInfoMessage('提示', '核销总金额不能大于剩余可核销金额');
$('csh531n_write_off_submit_btn_id').enable();
$('csh531n_write_off_btn_id').enable();
return false;
}
var receipt_type = header_rec.get('receipt_type');
var bp_category = header_rec.get('bp_category');
var paid_byother_flag = header_rec.get('paid_byother_flag');
if (type == 'WRITE_OFF') {
var check_flag = 'N';
if (receipt_type == 'WITHHOLD') { //划扣
check_flag = 'Y';
} else {
if (paid_byother_flag == 'F' && bp_category == 'TENANT') {
check_flag = 'Y';
}
}
if (check_flag == 'Y' && sum != header_rec.get('unwrite_off_amount')) {
Leaf.showInfoMessage('提示', '核销总金额不等于可核销金额,该现金事务不支持部分核销!');
$('csh531n_write_off_submit_btn_id').enable();
return false;
}
}
// var receipt_type = header_rec.get('receipt_type');
// var bp_category = header_rec.get('bp_category');
// var paid_byother_flag = header_rec.get('paid_byother_flag');
// if (type == 'WRITE_OFF') {
// var check_flag = 'N';
// if (receipt_type == 'WITHHOLD') { //划扣
// check_flag = 'Y';
// } else {
// if (paid_byother_flag == 'F' && bp_category == 'TENANT') {
// check_flag = 'Y';
// }
// }
// if (check_flag == 'Y' && sum != header_rec.get('unwrite_off_amount')) {
// Leaf.showInfoMessage('提示', '核销总金额不等于可核销金额,该现金事务不支持部分核销!');
// $('csh531n_write_off_submit_btn_id').enable();
// return false;
// }
// }
return true;
}
......@@ -567,7 +571,10 @@
if (r.get('exists_deposit_flag') == 'Y' && current_deposit_r) {
return;
}
if (r.get('exists_advance_flag') == 'Y' && current_advance_r) {
// if (r.get('exists_advance_flag') == 'Y' && current_advance_r) {
// return;
// }
if (record.get('create_wf_flag') == 'Y'){
return;
}
return 'csh_transaction_advanced_grid_nf';
......@@ -762,6 +769,7 @@
<a:field name="write_off_type" defaultValue="RECEIPT_ADVANCE_RECEIPT"/>
<a:field name="company_id" defaultValue="${/session/@company_id}"/>
<a:field name="write_off_amount"/>
<a:field name="create_wf_flag" defaultValue="N" />
<a:field name="write_off_date" validator="write_off_date_validator" required="true"
defaultValue="${/parameter/@transaction_date}"/>
</a:fields>
......@@ -988,6 +996,7 @@
footerRenderer="summaryRenderer"/>
<a:column name="write_off_date" prompt="核销日期" width="180" align="center"
renderer="Leaf.formatDate" editorFunction="csh_edit_function"/>
<!-- <a:column name="create_wf_flag_desc" prompt="已核销标志"/>-->
</a:columns>
<a:editors>
<a:lov id="csh_transaction_advanced_grid_lv"/>
......
......@@ -207,11 +207,6 @@
<a:lov name="bp_code" bindTarget="bp_agent_query_ds" prompt="代理店编码"/>
<a:textField name="bp_name" bindTarget="bp_agent_query_ds" prompt="代理店名称"/>
<a:textField name="extra_nam" bindTarget="bp_agent_query_ds" prompt="代理店简称"/>
<!-- <a:textField name="re_kunnr" bindTarget="bp_agent_query_ds" prompt="SAP客户编码"/>-->
<!-- <a:textField name="re_lifnr" bindTarget="bp_agent_query_ds" prompt="SAP供应商编码"/>-->
<!-- <a:comboBox name="bp_category_n" bindTarget="bp_agent_query_ds" prompt="商业伙伴类型"/>
<a:comboBox name="agent_type_n" bindTarget="bp_agent_query_ds" prompt="代理店类型"/>
<a:comboBox name="agent_instance_status_n" bindTarget="bp_agent_query_ds" prompt="工作流状态"/>-->
</a:form>
<a:grid id="bp_agent_grid" bindTarget="bp_agent_grid_result_ds" marginHeight="190" marginWidth="40"
navBar="true">
......@@ -219,31 +214,9 @@
<a:column name="bp_code" align="center" prompt="代理店编码" renderer="bp_agent_render" width="120"/>
<a:column name="bp_name" align="center" prompt="代理店名称" width="280"/>
<a:column name="extra_nam" align="center" prompt="代理店简称" width="130"/>
<!--<a:column name="large_area" align="center" prompt="大区" width="90"/>
<a:column name="liv_province_n" align="center" prompt="所在省份" width="90"/>
<a:column name="liv_city_n" align="center" prompt="所在城市" width="90"/>-->
<a:column name="enabled_flag" align="center" prompt="代理店状态" width="100"/>
<!--<a:column name="large_area" align="center" prompt="额度管理" width="120"/>-->
<!-- <a:column name="agent_info" align="center" prompt="代理店信息补充" renderer="bp_agent_render" width="100"/>
<a:column name="agent_renew" align="center" prompt="代理店续约" renderer="bp_agent_render" width="90"/>
<a:column name="financial_statements_import" align="center" prompt="财务报表导入"
renderer="bp_agent_render" width="90"/>
<a:column name="financial_statements" align="center" prompt="财务报表" renderer="bp_agent_render"
width="80"/>
<!-- <a:column name="enterprise_certification" align="center" prompt="企业认证"-->
<!-- renderer="enterprise_certification_render" width="80"/>-->
<!-- <a:column name="certification_status" align="center" prompt="认证状态" width="80"/>-->
<!-- <a:column name="re_kunnr" align="center" prompt="SAP客户编码" width="100"/>-->
<!-- <a:column name="re_lifnr" align="center" prompt="SAP供应商编码" width="100"/>-->
<!-- <a:column name="certification_status" align="center" prompt="认证状态" width="80"/>&ndash;&gt;-->
<!-- <a:column name="re_kunnr" align="center" prompt="SAP客户编码" width="100"/>-->
<!-- <a:column name="re_lifnr" align="center" prompt="SAP供应商编码" width="100"/>&ndash;&gt;&ndash;&gt;-->
<!--<a:column name="bp_class_n" align="center" prompt="商业伙伴类型" width="120"/>
<a:column name="bp_category_n" align="center" prompt="商业伙伴类别" width="150"/>
<a:column name="agent_type_n" align="center" prompt="代理店类型" width="150"/>
<a:column name="extra_nam" align="center" prompt="代理店简称" width="150"/>
param['url_title'] = '代理店管理';
<a:column name="agent_instance_status_n" align="center" prompt="工作流状态" width="150"/>-->
<!-- <a:column name="agent_instance_status_n" align="center" prompt="工作流状态" width="150"/>-->
</a:columns>
</a:grid>
</a:screenBody>
......
......@@ -153,42 +153,42 @@
var bp_id = bp_record.get('bp_id');
Leaf.request({
url: $('hls303_sap_eai_create_customer_link').getUrl(),
para: {
bp_id: bp_id
},
scope: this,
success: function () {
Leaf.request({
url: $('hls303_sap_eai_create_vender_link').getUrl(),
para: {
bp_id: bp_id
},
scope: this,
success: function () {
$(ds_id).query();
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']();
},
sync: true
});
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
sync: true
});
// Leaf.request({
// url: $('hls303_sap_eai_create_customer_link').getUrl(),
// para: {
// bp_id: bp_id
// },
// scope: this,
// success: function () {
// Leaf.request({
// url: $('hls303_sap_eai_create_vender_link').getUrl(),
// para: {
// bp_id: bp_id
// },
// scope: this,
// success: function () {
//
// $(ds_id).query();
//
// 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']();
// },
// sync: true
// });
// },
// failure: function () {
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// },
// error: function () {
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// },
// sync: true
// });
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
......
......@@ -13,7 +13,7 @@
<a:link id="pageLink_create_user" url="${/request/@context_path}/modules/sys/SYS8210/sys_user_create.lview"/>
<a:link id="pageLink_role_assign" url="${/request/@context_path}/modules/sys/SYS8210/sys_user_role_assign.lview"/>
<a:link id="pageLink_welcome" url="${/request/@context_path}/welcome.lview"/>
<script type="text/javascript"><![CDATA[
<script><![CDATA[
function userScreen_forward() {
history.go(1);
}
......@@ -73,12 +73,9 @@
new Leaf.Window({
id:'sys_user_create',
url:$('pageLink_create_user').getUrl(),
params: {
winid: 'sys_user_create'
},
title:'${l:SYS_USER.ADD_NEW_USER}',
height:600,
width:700
height:380,
width:530
});
}
function winOpen_set_password(id){
......@@ -98,12 +95,11 @@
new Leaf.Window({id:'sys_user_edit',
url:$('pageLink_edit_user').getUrl(),
params:{
user_id:id,
winid: 'sys_user_edit'
user_id:id
},
title:'${l:SYS_USER.EDIT_USER}',
height:600,
width:700
height:380,
width:530
});
}
......@@ -145,10 +141,8 @@
<a:comboBox name="bp_category_name" bindTarget="para_userDs" prompt="SYS_USER.USER_TYPE"/>
<a:textField name="employee_code" bindTarget="para_userDs" prompt="FND_PRV_LOGIN_ACC.EMPLOYEE_CODE"/>
<a:textField name="employee_name" bindTarget="para_userDs" prompt="EXP_EMPLOYEES.NAME"/>
<a:textField name="bp_code" bindTarget="para_userDs" prompt="HLS_BP_MASTER.BP_CODE"/>
<a:textField name="bp_name" bindTarget="para_userDs" prompt="HLS_BP_MASTER.BP_NAME"/>
</a:form>
<a:grid id="userDs_grid" bindTarget="userDs" marginHeight="170" marginWidth="30" navBar="true">
<a:grid id="userDs_grid" bindTarget="userDs" marginHeight="180" marginWidth="30" navBar="true">
<a:columns>
<a:column name="user_name" prompt="SYS_USER.USER_NAME"/>
<a:column name="description" prompt="FND_COMPANY_PROMPTS.DESCRIPTION" width="100"/>
......@@ -159,12 +153,9 @@
<a:column name="bp_category_name" prompt="SYS_USER.USER_TYPE" width="60"/>
<a:column name="employee_code" prompt="FND_PRV_LOGIN_ACC.EMPLOYEE_CODE" width="60"/>
<a:column name="employee_name" prompt="EXP_EMPLOYEES.NAME"/>
<a:column name="bp_code" prompt="HLS_BP_MASTER.BP_CODE"/>
<a:column name="bp_name" prompt="HLS_BP_MASTER.BP_NAME" width="160"/>
<a:column name="phone" prompt="SYS_USER.PHONE"/>
<a:column name="assign_role" align="center" prompt="SYS_USER.ROLE_ASSIGN" renderer="render_userDs_grid" width="70"/>
<a:column name="set_password" align="center" prompt="MODIFY_PASSWORD" renderer="render_userDs_grid" width="70"/>
<a:column name="edit_user" align="center" prompt="HAP_EDIT" renderer="render_userDs_grid" width="50"/>
<a:column name="edit_user" align="center" prompt="HAP_EDIT" renderer="render_userDs_grid" width="70"/>
</a:columns>
</a:grid>
</a:screenBody>
......
......@@ -6,87 +6,58 @@
$Purpose: UPDATE BY DJ 重构大部分代码
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
<a:init-procedure>
<a:model-query model="rpt.rpt_now_date" rootPath="sysdate_path"/>
</a:init-procedure>
<a:init-procedure/>
<a:view>
<script type="text/javascript"><![CDATA[
<script><![CDATA[
function createScreen_close() {
function createScreen_close(){
$('sys_user_create').close();
}
function createDs_save() {
function createDs_save(){
var ds = $('createDs');
if (ds.validate()) {
var record = ds.getCurrentRecord();
//ds.submit();
Leaf.request({
url: '${/request/@context_path}/autocrud/sys.SYS8210.ad_master_user_v/update',
para: {
user_id: record.get("user_id"),
start_date: record.get('start_date'),
end_date: record.get('end_date'),
password_lifespan_days: record.get('password_lifespan_days'),
password_lifespan_access: record.get('password_lifespan_access'),
frozen_flag: record.get('frozen_flag'),
frozen_date: record.get('frozen_date'),
bp_category: record.get('bp_category'),
ad_user_id: record.get('ad_user_id'),
bp_id:record.get('bp_id')
},
success: function (res) {
Leaf.SideBar.show({
msg: '${l:HLS.SUBMIT_SUCCESS}',
duration: 2000
});
$('userDs').query();
$('${/parameter/@winid}').close();
},
failure: function () {
},
error: function () {
},
sync: true,
scope: this
});
ds.submit();
}
}
function onSubmitSuccess_createDs(dataSet, datas, res) {
function onSubmitSuccess_createDs(dataSet, datas, res){
userScreen_userDs_query();
createScreen_close();
}
function field_handle(type, record, name) {
var field = record.getField(name);
if (type == 'readonly') {
function field_handle(type,record,name)
{
var field=record.getField(name);
if(type=='readonly')
{
field.setReadOnly(true);
field.setRequired(false);
record.set(name, '');
record.set(name,'');
}
else if (type == 'require') {
else if(type=='require')
{
field.setReadOnly(false);
field.setRequired(true);
}
}
function onUpdate_createDs(ds, record, name, value, oldvalue) {
/*if (name == 'bp_category') {
var user_type = record.get("bp_category");
var bp_code = record.getMeta().getField('bp_code');
var employee_code = record.getMeta().getField('employee_code');
if (user_type == 'EMPLOYEE') {
function onUpdate_createDs(ds,record,name,value,oldvalue){
if(name == 'bp_category'){
var user_type=record.get("bp_category");
var bp_code=record.getMeta().getField('bp_code');
var employee_code=record.getMeta().getField('employee_code');
if(user_type == 'EMPLOYEE'){
bp_code.setReadOnly(true);
employee_code.setReadOnly(false);
record.set('bp_id', '');
record.set('bp_code', '');
record.set('bp_name', '');
} else {
record.set('bp_id','');
record.set('bp_code','');
record.set('bp_name','');
}else {
bp_code.setReadOnly(false);
employee_code.setReadOnly(true);
url = 'sys.SYS8210.sys_user_bp_master_lov?bp_category=' + user_type;
url = 'sys.SYS8210.sys_user_bp_master_lov?bp_category='+user_type;
bp_code.setLovService(url);
var mapping = [{
from: "bp_id",
......@@ -94,172 +65,106 @@
}, {
from: "bp_code",
to: "bp_code"
}, {
from: "bp_name",
to: "bp_name"
}];
},{
from:"bp_name",
to:"bp_name"}];
bp_code.setMapping(mapping);
record.set('employee_id', '');
record.set('employee_code', '');
record.set('emp_name', '');
record.set('employee_id','');
record.set('employee_code','');
record.set('emp_name','');
}
}
}*/
if (name == 'state') {
if (value == '1') {
field_handle('readonly', record, 'password_lifespan_access');
field_handle('require', record, 'password_lifespan_days');
} else if (value == '2') {
field_handle('require', record, 'password_lifespan_access');
field_handle('readonly', record, 'password_lifespan_days');
} else {
field_handle('readonly', record, 'password_lifespan_access');
field_handle('readonly', record, 'password_lifespan_days');
if(name=='state')
{
if(value=='1'){
field_handle('readonly',record,'password_lifespan_access');
field_handle('require',record,'password_lifespan_days');
}else if(value=='2'){
field_handle('require',record,'password_lifespan_access');
field_handle('readonly',record,'password_lifespan_days');
}else{
field_handle('readonly',record,'password_lifespan_access');
field_handle('readonly',record,'password_lifespan_days');
}
}
else if (name == 'frozen_flag') {
if (value == 'Y') {
record.set('frozen_date', new Date().format('yyyy-mm-dd'));
} else {
record.set('frozen_date', '');
else if(name=='frozen_flag')
{
if(value == 'Y'){
record.set('frozen_date',new Date().format('yyyy-mm-dd'));
}else{
record.set('frozen_date','');
}
}
else if (name == 'password' || name == 'confirm_password') {
else if(name == 'password' || name == 'confirm_password'){
record.validate((name == 'password') ? 'confirm_password' : 'password');
}
else if (name == 'start_date' || name == 'end_date') {
else if(name == 'start_date' || name == 'end_date'){
record.validate((name == 'start_date') ? 'end_date' : 'start_date');
}
}
//验证两次输入的密码是否一致
function validate_password(record, name, value) {
if (name == 'password' || name == 'confirm_password') {
function validate_password(record, name, value){
if(name == 'password' || name == 'confirm_password'){
var password = record.get('password');
var passwordRe = record.get('confirm_password');
if (password != passwordRe) {
if(password != passwordRe){
return '${l:FND_PRV_SET_PASS.PWD_NO_EQU}';
}
return true;
}
}
function compareDate(start, end) {
if (start > end) {
function compareDate(start, end){
if(start > end){
return false;
}
return true;
}
function validate_date(record, name, value) {
if (name == 'start_date' || name == 'end_date') {
function validate_date(record, name, value){
if(name == 'start_date' || name == 'end_date'){
var start_date = record.get('start_date');
var end_date = record.get('end_date');
if (typeof(end_date) != 'undefined' && !Ext.isEmpty(end_date)) {
if (!compareDate(start_date, end_date)) {
if(typeof(end_date) != 'undefined' && !Ext.isEmpty(end_date)){
if(!compareDate(start_date, end_date)){
return '${l:START_GREATER_THAN_END}';
}
}
return true;
}
}
function changeFun(combo, value, oldValue) {
var record = $('createDs').getCurrentRecord();
if (value == '代理商') {
$('createDs').getCurrentRecord().getField('ad_user_id').setReadOnly(false);
record.getField('ad_user_id').setLovService('sys.SYS8210.ds_user_info_dcs_v');
record.getField('ad_user_id').setLovPara('source_type', 'DCS');
record.set('ad_user_id', '');
record.set('ad_user_name', '');
record.set('phone', '');
record.set('email', '');
record.set('ad_org_unit_id', '');
$('createDs').getCurrentRecord().getField('bp_name').setReadOnly(false);
$('createDs').getCurrentRecord().getField('bp_name').setRequired(true);
record.set('bp_name', '');
record.set('bp_id', '');
} else if (value == '员工') {
$('createDs').getCurrentRecord().getField('ad_user_id').setReadOnly(false);
record.getField('ad_user_id').setLovService('sys.SYS8210.ds_user_info_ad_v');
record.getField('ad_user_id').setLovPara('source_type', 'ADMASTER');
record.set('ad_user_id', '');
record.set('ad_user_name', '');
record.set('phone', '');
record.set('email', '');
record.set('ad_org_unit_id', '');
$('createDs').getCurrentRecord().getField('bp_name').setReadOnly(true);
$('createDs').getCurrentRecord().getField('bp_name').setRequired(false);
record.set('bp_name', '');
record.set('bp_id', '');
} else {
$('createDs').getCurrentRecord().getField('ad_user_id').setReadOnly(true);
record.set('ad_user_id', '');
record.set('ad_user_name', '');
record.set('phone', '');
record.set('email', '');
record.set('ad_org_unit_id', '');
}
}
]]></script>
<a:dataSets>
<a:dataSet id="createDs" autoCreate="true" model="sys.sys_user">
<a:fields>
<!--<a:field name="user_name" required="true"/>-->
<a:field name="start_date" required="true" validator="validate_date"
defaultValue="${/model/sysdate_path/record/@now_date}"/>
<!--<a:field name="description" required="true"/>-->
<!--<a:field name="password" required="true"/>-->
<!--<a:field name="confirm_password" required="true" validator="validate_password"/>-->
<a:field name="user_name" required="true"/>
<a:field name="start_date" required="true" validator="validate_date"/>
<a:field name="description" required="true"/>
<a:field name="password" required="true"/>
<a:field name="confirm_password" required="true" validator="validate_password"/>
<a:field name="end_date" validator="validate_date"/>
<a:field name="state" defaultValue="3"/>
<a:field name="frozen_flag" checkedValue="Y" defaultValue="N" uncheckedValue="N"/>
<a:field name="frozen_date" readOnly="true"/>
<a:field name="emp_name" readOnly="true"/>
<a:field name="ad_user_id" lovGridHeight="400" lovHeight="600" lovWidth="700"
title="EXP_EMPLOYEES.QUERY" readOnly="true" required="true">
<a:field name="emp_name" readOnly="false"/>
<a:field name="employee_code" autoComplete="true" autoCompleteField="employee_code" lovGridHeight="300" lovHeight="430" lovService="sys.SYS8210.sys_user_employee_lov?ORDER_FIELD=employee_code" lovWidth="500" title="EXP_EMPLOYEES.QUERY" readOnly="false">
<a:mapping>
<a:map from="userid" to="ad_user_id"/>
<a:map from="name_zh" to="ad_user_name"/>
<a:map from="mail" to="email"/>
<a:map from="orgunitid" to="ad_org_unit_id"/>
<a:map from="employeeid" to="ad_employee_id"/>
<a:map from="firstemployeeid" to="ad_first_employee_id"/>
<a:map from="workpersonnelareacode" to="work_personnel_area_code"/>
<a:map from="originpersonnelareacode" to="origin_personnel_area_code"/>
<a:map from="mobilenumber" to="phone"/>
<a:map from="employeestatus" to="employee_status"/>
<a:map from="name" to="emp_name"/>
<a:map from="employee_code" to="employee_code"/>
<a:map from="employee_id" to="employee_id"/>
</a:mapping>
</a:field>
<a:field name="phone" readOnly="true"/>
<a:field name="email" readOnly="true"/>
<a:field name="ad_org_unit_id" readOnly="true"/>
<a:field name="ad_user_name" readOnly="true"/>
<a:field name="bp_category_name" displayField="code_value_name" options="user_type_lov_ds"
returnField="bp_category" valueField="code_value" required="true"/>
<a:field name="bp_name" lovGridHeight="300" lovHeight="460" lovLabelWidth="100" lovWidth="530"
lovService="sys.SYS8210.sys_user_bp_master_lov?bp_category=AGENT"
readOnly="true">
<a:field name="bp_category" defaultValue="EMPLOYEE"/>
<a:field name="bp_category_name" readOnly="true" displayField="code_value_name" options="user_type_lov_ds" defaultValue="员工" returnField="bp_category" valueField="code_value"/>
<a:field name="bp_code" lovGridHeight="300" lovLabelWidth="100" lovHeight="460" lovWidth="530" readOnly="true">
<a:mapping>
<a:map from="bp_name" to="bp_name"/>
<a:map from="bp_id" to="bp_id"/>
<a:map from="bp_code" to="bp_code"/>
<a:map from="" to=""/>
<a:map from="" to=""/>
<a:map from="" to=""/>
</a:mapping>
</a:field>
<a:field name="bp_category" readOnly="true"/>
<!--<a:field name="bp_name" readOnly="true"/>-->
<a:field name="bp_name" readOnly="true"/>
</a:fields>
<a:events>
<a:event name="submitsuccess" handler="onSubmitSuccess_createDs"/>
......@@ -272,37 +177,23 @@
<a:gridButton click="createScreen_close" text="HLS.CLOSE"/>
<a:gridButton click="createDs_save" text="HLS.SAVE"/>
</a:screenTopToolbar>
<a:fieldSet column="2" labelWidth="100" title="SYS_USER.USER_INFO" width="500">
<!--ad master 字段-->
<a:comboBox name="bp_category_name" bindTarget="createDs" prompt="SYS_USER.USER_TYPE">
<a:events>
<a:event name="change" handler="changeFun"/>
</a:events>
</a:comboBox>
<a:lov name="ad_user_id" bindTarget="createDs" prompt="账号"/>
<a:textField name="ad_user_name" bindTarget="createDs" prompt="姓名"/>
<a:textField name="phone" bindTarget="createDs" prompt="手机号"/>
<a:textField name="email" bindTarget="createDs" prompt="Email"/>
<a:textField name="ad_org_unit_id" bindTarget="createDs" prompt="组织ID"/>
<!--ad master 字段-->
<!--<a:textField name="user_name" bindTarget="createDs" typeCase="upper"/>
<a:fieldSet column="2" title="SYS_USER.USER_INFO" width="500" labelWidth="100">
<a:textField name="user_name" bindTarget="createDs" typeCase="upper"/>
<a:textField name="description" bindTarget="createDs"/>
<a:passWord name="password" bindTarget="createDs" prompt="SYS_USER.NEW_PASSWORD"/>
<a:passWord name="confirm_password" bindTarget="createDs" prompt="SYS_USER.CONFIRM"/>-->
<a:passWord name="confirm_password" bindTarget="createDs" prompt="SYS_USER.CONFIRM"/>
<a:datePicker name="start_date" bindTarget="createDs"/>
<a:datePicker name="end_date" bindTarget="createDs"/>
<!--<a:lov name="bp_code" bindTarget="createDs" prompt="HLS_BP_MASTER.BP_CODE"/>
<a:textField name="bp_name" bindTarget="createDs" prompt="HLS_BP_MASTER.BP_NAME"/>-->
<a:comboBox name="bp_category_name" bindTarget="createDs" prompt="SYS_USER.USER_TYPE"/>
<a:hBox/>
<a:lov name="employee_code" bindTarget="createDs"/>
<a:textField name="emp_name" bindTarget="createDs"/>
<!-- <a:lov name="bp_code" bindTarget="createDs" prompt="HLS_BP_MASTER.BP_CODE"/>-->
<!-- <a:textField name="bp_name" bindTarget="createDs" prompt="HLS_BP_MASTER.BP_NAME"/>-->
<a:checkBox name="frozen_flag" bindTarget="createDs"/>
<a:datePicker name="frozen_date" bindTarget="createDs"/>
<a:lov name="bp_name" bindTarget="createDs" prompt="代理商"/>
<a:hBox padding="0" prompt="SYS_USER.PASSWD_EXPIRED_TYPE">
<a:radio name="state" bindTarget="createDs" layout="vertical"
style="padding-top:5px;padding-bottom:5px;" width="80">
<a:radio name="state" bindTarget="createDs" layout="vertical" style="padding-top:5px;padding-bottom:5px;" width="80">
<a:items>
<a:item label="SYS_USER.PASSWD_EXPIRED_DAYS" value="1"/>
<a:item label="SYS_USER.PASSWD_EXPIRED_TIMES" value="2"/>
......@@ -310,10 +201,8 @@
</a:items>
</a:radio>
<a:vBox>
<a:numberField name="password_lifespan_days" allowDecimals="false" allowNegative="false"
bindTarget="createDs" readOnly="true" width="67"/>
<a:numberField name="password_lifespan_access" allowDecimals="false" allowNegative="false"
bindTarget="createDs" readOnly="true" width="67"/>
<a:numberField name="password_lifespan_days" allowDecimals="false" allowNegative="false" bindTarget="createDs" readOnly="true" width="67"/>
<a:numberField name="password_lifespan_access" allowDecimals="false" allowNegative="false" bindTarget="createDs" readOnly="true" width="67"/>
</a:vBox>
</a:hBox>
</a:fieldSet>
......
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