You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
355 lines
9.3 KiB
355 lines
9.3 KiB
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
|
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<%@include file="/wdk/theme/je/module/public/common.jsp"%>
|
|
<script type="text/javascript" src="<%=WDK_ROOT%>/theme/je/core/js/wdk.datatable.js"></script>
|
|
<title>和主数据同步记录查询</title>
|
|
|
|
<script type="text/javascript">
|
|
|
|
var _gridcode = "platform.sync.ucsyncmark_list_grid";
|
|
var _gridid = $.getUUID();
|
|
$(function(){
|
|
//查询条件初始化
|
|
initQuery();
|
|
initGrid();
|
|
});
|
|
//查询条件初始化
|
|
function initQuery(){
|
|
$.combobox({
|
|
id:'source'
|
|
,multiple:false
|
|
,initvalue:''
|
|
,required:false
|
|
,editable:false
|
|
,showClear:true
|
|
,height : 25
|
|
,idField:'id'
|
|
,textField:'text'
|
|
,defaultOption : '全部'
|
|
,data:[
|
|
{id:"MD",text:"主数据"},{id:"appinit",text:"应用集成"},{id:"EAP",text:"营销系统"}
|
|
]
|
|
});
|
|
$.combobox({
|
|
id:'marktype'
|
|
,multiple:false
|
|
,initvalue:''
|
|
,required:false
|
|
,editable:false
|
|
,showClear:true
|
|
,height : 25
|
|
,idField:'id'
|
|
,textField:'text'
|
|
,defaultOption : '全部'
|
|
,data:[
|
|
{id:"ORGN",text:"组织"},{id:"PRSN",text:"用户"},{id:"CSTR",text:"零售户"},
|
|
{id:"ACCOUNTINFO",text:"帐号"},{id:"ACCOUNTORGN",text:"组织帐号关系"}
|
|
]
|
|
});
|
|
$.combobox({
|
|
id:'operation'
|
|
,multiple:false
|
|
,initvalue:''
|
|
,required:false
|
|
,editable:false
|
|
,showClear:true
|
|
,height : 25
|
|
,idField:'id'
|
|
,textField:'text'
|
|
,defaultOption : '全部'
|
|
,data:[
|
|
{id:"INSERT",text:"新增"},{id:"UPDATE",text:"修改"},{id:"DELETE",text:"删除"}
|
|
]
|
|
});
|
|
$.combobox({
|
|
id:'issuccess'
|
|
,multiple:false
|
|
,initvalue:''
|
|
,required:false
|
|
,editable:false
|
|
,showClear:true
|
|
,height : 25
|
|
,idField:'id'
|
|
,textField:'text'
|
|
,defaultOption : '全部'
|
|
,data:[
|
|
{id:"1",text:"是"},{id:"0",text:"否"}
|
|
]
|
|
});
|
|
$.datebox({
|
|
id : 'begin_date',
|
|
required : false,
|
|
editable : true,
|
|
height:25,
|
|
tipPosition : 'bottom',
|
|
strFormatter : 'yyyy-MM-dd'
|
|
});
|
|
|
|
$.datebox({
|
|
id : 'end_date',
|
|
required : false,
|
|
editable : true,
|
|
height:25,
|
|
tipPosition : 'bottom',
|
|
strFormatter : 'yyyy-MM-dd'
|
|
});
|
|
$.addListener("ucsyncmark_list_query","opt_queryPage");
|
|
//开始日期默认为本月第一天
|
|
//$('#begin_date').datebox('setValue', $.getDate('yyyy-MM-dd').substring(0,7)+"-01");
|
|
}
|
|
|
|
function initGrid(){
|
|
//查询grid数据
|
|
//组织参数
|
|
var dataParam = getGridQueryParam();
|
|
|
|
var gridid = $.grid({
|
|
id : _gridid,
|
|
containerid : 'layout_grid',
|
|
gridcode : _gridcode,
|
|
checkbox: false,
|
|
checkOnSelect: false,
|
|
selectOnCheck: false,
|
|
url : 'wdk?action=wdk.pub&method=call_service&ajaxparam='+ new Date().getTime(),
|
|
queryParams : dataParam,
|
|
idField:'mark_uuid',
|
|
fitColumns:true, //是否自动填充满
|
|
nowrap:false, //自动换行
|
|
pagination:true,
|
|
pageSize: 20,
|
|
formatter:{
|
|
issuccess:'formatter_issuccess',
|
|
command:'formatter_command',
|
|
mark_uuid:'formatter_mark_uuid'
|
|
}
|
|
});
|
|
}
|
|
|
|
//获取grid查询参数
|
|
function getGridQueryParam(){
|
|
//获取form对象值
|
|
var searchFieldValues = $.getFieldValue({formid:'search_form'});
|
|
searchFieldValues.keywords = searchFieldValues.keywords.trim();
|
|
searchFieldValues.msgid = searchFieldValues.msgid.trim();
|
|
var createdt = "";
|
|
if(searchFieldValues.begin_date.length>0 || searchFieldValues.end_date.length>0){
|
|
createdt = searchFieldValues.begin_date;
|
|
if(createdt.length==0){
|
|
createdt = "1911-01-01";
|
|
}
|
|
createdt += " 00:00:00,";
|
|
if(searchFieldValues.end_date.length>0){
|
|
createdt += searchFieldValues.end_date;
|
|
} else {
|
|
createdt += "3000-01-01";
|
|
}
|
|
createdt += " 23:59:59";
|
|
searchFieldValues.createdt=createdt;
|
|
}
|
|
var keywords = searchFieldValues.keywords;
|
|
delete searchFieldValues["begin_date"];
|
|
delete searchFieldValues["end_date"];
|
|
delete searchFieldValues["keywords"];
|
|
//alert($.json2str(searchFieldValues));
|
|
//组织参数
|
|
var dataParam = {
|
|
_SRVNAME:'service.sync.mark'
|
|
,_SRVMETHOD:'pageQueryList'
|
|
,_DATA:$.json2str({
|
|
search_fields:searchFieldValues
|
|
,keywords:keywords
|
|
,result_fields:'mark_uuid,marktype,marktypename,operation,operationname,msgid,source,issuccess,createdt,donedt'
|
|
,order_fields:' createdt desc'
|
|
})
|
|
,_RSTYPE:'grid'
|
|
,_RSFIELD:'resultset'
|
|
,_RSPARAM:$.json2str({pagequery:'1'})
|
|
};
|
|
return dataParam;
|
|
}
|
|
|
|
function formatter_issuccess(value,row,index){
|
|
if(value=="1"){
|
|
return "是";
|
|
} else if(value=="0"){
|
|
return "<font color=red>否</font>";
|
|
} else if(value==""){
|
|
return "<font color=red>否</font>";
|
|
}
|
|
return value;
|
|
}
|
|
//format 操作,同步失败的才有
|
|
function formatter_command(value,row,index) {
|
|
if(row.issuccess=="1"){
|
|
return "";
|
|
}
|
|
var str = '<i tilte="重新同步" class="fa fa-pencil-square-o grid-oper-icon" aria-hidden="true" onclick="opt_resync(\''+ row.mark_uuid +'\')">重新同步</i>';
|
|
return str;
|
|
}
|
|
|
|
function formatter_mark_uuid(value,row,index){
|
|
value = "<a onclick='opt_detail(\""+value+"\")'>" + value+"</a>";
|
|
return value;
|
|
}
|
|
|
|
/**
|
|
重新同步
|
|
*/
|
|
function opt_resync(mark_uuid) {
|
|
confirmDialog('是否确定重新同步?',function(){
|
|
var dataParam = {
|
|
_SRVNAME:'service.sync.mark'
|
|
,_SRVMETHOD:'resync'
|
|
,_DATA:$.json2str({
|
|
user_info:{
|
|
op_account_uuid:$.getSessionUser().account_id,
|
|
op_person_uuid:$.getSessionUser().personuuid,
|
|
op_person_name:$.getSessionUser().personname,
|
|
manage_unit_uuid:$.getSessionUser().manageunituuid,
|
|
op_manage_unit_uuid:$.getSessionUser().manageunituuid
|
|
},
|
|
mark_uuid:mark_uuid
|
|
})
|
|
};
|
|
$.wait_open();
|
|
$.cuajax({
|
|
url:'wdk?action=wdk.pub&method=call_service&ajaxparam='+new Date().getTime()
|
|
,method:"post"
|
|
,timeout:WDK_Timeout
|
|
,data:dataParam
|
|
,success:function(result) {
|
|
$.wait_close();
|
|
//返回值字符串转json
|
|
var jres = $.str2json(result);
|
|
alert(jres.desc);
|
|
if(jres.code=="1"){
|
|
opt_query(true);
|
|
}
|
|
},
|
|
error:function(result){
|
|
$.wait_close();
|
|
alert('网络错误!result='+result);
|
|
}
|
|
});
|
|
});
|
|
}
|
|
//打开详情页面
|
|
var winID = $.getUUID();
|
|
function opt_detail(mark_uuid) {
|
|
$.openInTab({
|
|
id:winID,
|
|
title:'同步详情',
|
|
height:600,
|
|
width:850,
|
|
modal:true,
|
|
url:'platform/sync/ucsyncmark_detail.jsp',
|
|
queryParams:{
|
|
actionflag:'view',
|
|
mark_uuid:mark_uuid
|
|
},
|
|
maximized:false,
|
|
draggable:true,
|
|
resizable:false
|
|
});
|
|
}
|
|
|
|
//查询
|
|
function opt_query(current) {
|
|
if(!current){
|
|
current = false;
|
|
}
|
|
//组织参数
|
|
var dataParam = getGridQueryParam();
|
|
$.grid_reload({
|
|
id:_gridid,
|
|
current:current,
|
|
queryParams:dataParam
|
|
});
|
|
}
|
|
|
|
function opt_queryPage() {
|
|
opt_query(true);
|
|
}
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body class="easyui-layout" data-options="fit:true">
|
|
<div data-options="region:'center',border:false,collapsed:false" >
|
|
<div class="easyui-layout" data-options="fit:true">
|
|
<div data-options="region:'north',border:false,collapsed:false" class="row-1" style="padding:10 10px;overflow:hidden;height:120px;" >
|
|
<form id="search_form" >
|
|
<div class="h_layout fixed">
|
|
<div>
|
|
<div class="inputgroup" >
|
|
<label>数据源头</label>
|
|
<div>
|
|
<input id="source" name="source"/>
|
|
</div>
|
|
</div>
|
|
<div class="inputgroup">
|
|
<label>数据类型</label>
|
|
<div>
|
|
<input class="easyui-validatebox" id="marktype" name="marktype"/>
|
|
</div>
|
|
</div>
|
|
<div class="inputgroup" >
|
|
<label>同步时间</label>
|
|
<div>
|
|
<input id="begin_date" name="begin_date"style="width: 100px;"/>
|
|
- <input id="end_date" name="end_date" style="width: 100px;"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="h_layout fixed">
|
|
<div>
|
|
<div class="inputgroup" >
|
|
<label>同步操作</label>
|
|
<div>
|
|
<input id="operation" name="operation"/>
|
|
</div>
|
|
</div>
|
|
<div class="inputgroup">
|
|
<label>是否成功</label>
|
|
<div>
|
|
<input class="easyui-validatebox" id="issuccess" name="issuccess"/>
|
|
</div>
|
|
</div>
|
|
<div class="inputgroup" >
|
|
<label>同步标识</label>
|
|
<div>
|
|
<input id="mark_uuid" name="mark_uuid" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="h_layout fixed">
|
|
<div>
|
|
<div class="inputgroup" >
|
|
<label>关键字</label>
|
|
<div>
|
|
<input id="keywords" name="keywords"/>
|
|
</div>
|
|
</div>
|
|
<div class="inputgroup" >
|
|
<label>主数据标识</label>
|
|
<div>
|
|
<input id="msgid" name="msgid"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div style="width:125px;">
|
|
<a class="eapbutton" style="float:right;" onclick="opt_query()"><i class="fa fa-search" aria-hidden="true"></i><span><span>查询</span></span></a>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div id="layout_grid" data-options="region:'center',border:false,collapsed:false" style="padding:0px 10px;" >
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|
|
|