DESKTOP-5DIJMF9\admin
2 months ago
1 changed files with 0 additions and 485 deletions
@ -1,485 +0,0 @@ |
|||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<%@include file="/wdk/theme/je/module/public/common.jsp"%> |
|||
<title>转仓单列表</title> |
|||
<script type="text/javascript"> |
|||
var _gridcode = "products.st.ivt.changestor.grid"; |
|||
var _gridid = $.getUUID(); |
|||
var sessionUser = $.getSessionUser(); |
|||
//初始化页面 |
|||
$(function(){ |
|||
initDate(); |
|||
initQuery(); |
|||
}) |
|||
function initDate(){ |
|||
var d1 = new Date(); |
|||
d0=new Date(); |
|||
d0.setMonth(d1.getMonth()-1); |
|||
d0.setDate(d1.getDate()); |
|||
$.dategroup({id:"date",initvalue:$.getDate("yyyy-MM-dd",d0)+","+$.getDate("yyyy-MM-dd",d1)}); |
|||
} |
|||
//初始化控件 |
|||
function initQuery(){ |
|||
//移出仓库下拉框 |
|||
$.combobox({ |
|||
id : 'out_stor_uuid', |
|||
url : 'wdk?action=wdk.pub&method=call_service&ajaxparam=' |
|||
+ new Date().getTime(), |
|||
queryParams : { |
|||
_SRVNAME : 'service.pub.querylist', |
|||
_SRVMETHOD : 'queryStor', |
|||
_DATA : $.json2str({ |
|||
accountId : $.getSessionUser(), |
|||
form : { |
|||
stor_types : '01,02' |
|||
} |
|||
}), |
|||
_RSTYPE : 'combobox', |
|||
_RSFIELD : 'result', |
|||
_RSPARAM : $.json2str({ |
|||
idField : 'id', |
|||
textField : 'text' |
|||
}) |
|||
}, |
|||
required : false, |
|||
editable:false, |
|||
multiple:false, |
|||
panelHeight:'auto', |
|||
initvalue:'', |
|||
height:25, |
|||
idField:'id', |
|||
textField:'text', |
|||
tipPosition:'bottom', |
|||
defaultOption:'请选择', |
|||
//isinitselect: true, |
|||
onLoadSuccess:function(){ |
|||
loadgrid(); |
|||
} |
|||
}); |
|||
//移入仓库下拉框 |
|||
$.combobox({ |
|||
id : 'in_stor_uuid', |
|||
url : 'wdk?action=wdk.pub&method=call_service&ajaxparam=' |
|||
+ new Date().getTime(), |
|||
queryParams : { |
|||
_SRVNAME : 'service.pub.querylist', |
|||
_SRVMETHOD : 'queryStor', |
|||
_DATA : $.json2str({ |
|||
accountId : $.getSessionUser(), |
|||
form : { |
|||
stor_types : '01,02' |
|||
} |
|||
}), |
|||
_RSTYPE : 'combobox', |
|||
_RSFIELD : 'result', |
|||
_RSPARAM : $.json2str({ |
|||
idField : 'id', |
|||
textField : 'text' |
|||
}) |
|||
}, |
|||
required : false, |
|||
editable:false, |
|||
multiple:false, |
|||
panelHeight:'auto', |
|||
initvalue:'', |
|||
height:25, |
|||
idField:'id', |
|||
textField:'text', |
|||
tipPosition:'bottom', |
|||
defaultOption:'请选择' |
|||
}); |
|||
//状态下拉框 |
|||
var datas = [ |
|||
{id:'',text:'请选择'}, |
|||
{id:'01',text:'生成'}, |
|||
{id:'02',text:'审核'}, |
|||
{id:'03',text:'转仓中'}, |
|||
{id:'99',text:'转仓完成'}, |
|||
] |
|||
Combo_box3("status",datas,false) |
|||
|
|||
$.combobox({ |
|||
id : 'changestor_type', |
|||
url : 'wdk?action=wdk.pub&method=call_service&ajaxparam=' |
|||
+ new Date().getTime(), |
|||
queryParams : { |
|||
_SRVNAME : 'service.pub.querylist', |
|||
_SRVMETHOD : 'queryCapable', |
|||
_DATA : $.json2str({ |
|||
accountId : $.getSessionUser().personuuid, |
|||
type : 'ST_INV_TYPE_CG', |
|||
ins : '', |
|||
orderBy : '' |
|||
}), |
|||
_RSTYPE : 'combobox', |
|||
_RSFIELD : 'result', |
|||
_RSPARAM : $.json2str({ |
|||
idField : 'id', |
|||
textField : 'text' |
|||
}) |
|||
}, |
|||
required : false, |
|||
editable:false, |
|||
multiple:false, |
|||
panelHeight:'auto', |
|||
initvalue:'', |
|||
height:25, |
|||
idField:'id', |
|||
textField:'text', |
|||
tipPosition:'bottom', |
|||
isinitselect:false, |
|||
defaultOption:'全部' |
|||
}); |
|||
} |
|||
function loadgrid(){ |
|||
var dataParam = getDataParam(); |
|||
var gridid = $.grid({ |
|||
id : _gridid, |
|||
containerid : 'layout_grid', |
|||
gridcode : _gridcode, |
|||
checkbox : false, |
|||
url : 'wdk?action=wdk.pub&method=call_service&ajaxparam='+ new Date().getTime(), |
|||
queryParams : dataParam, |
|||
idField : 'changestor_uuid', |
|||
fitColumns:false, //是否自动填充满 |
|||
nowrap:true, //自动换行 |
|||
showContextMenu:false, |
|||
pagination:true, |
|||
formatter:{ |
|||
create_mode:"create_mode_fremark", |
|||
operation:'formatter_command', |
|||
status:'formatter_bill_status', |
|||
changestor_code:"formatter_changeStor_code", |
|||
}, |
|||
onSelect:function(rowIndex,rowData){ |
|||
if(rowData.status=='02'||rowData.status=='03'||rowData.status=='04'){ |
|||
$.linkbutton_enabled({id:'opt_distribute'}); |
|||
}else{ |
|||
$.linkbutton_disabled({id:'opt_distribute'}); |
|||
} |
|||
if(rowData.status=='01'){ |
|||
$.linkbutton_enabled({id:'opt_auditing'}); |
|||
}else{ |
|||
$.linkbutton_disabled({id:'opt_auditing'}); |
|||
} |
|||
} |
|||
}); |
|||
} |
|||
function getDataParam(){ |
|||
//获取form对象值 |
|||
var fieldValues = $.getFieldValue({formid:'search_form'}); |
|||
var dataParam = { |
|||
_SRVNAME : 'servcie.ivt.changerStor', |
|||
_SRVMETHOD : 'changeStorQuery', |
|||
_DATA : $.json2str({ |
|||
accountId : $.getSessionUser().personuuid, |
|||
form : fieldValues |
|||
}), |
|||
_RSTYPE : 'grid', |
|||
_RSFIELD : 'result', |
|||
_RSPARAM : $.json2str({pagequery : '1'}), |
|||
orderbyfield:'changestor_code desc', |
|||
} |
|||
return dataParam; |
|||
} |
|||
function opt_add(){ |
|||
$.openWin({ |
|||
id: $.getUUID(), |
|||
title: '转仓单管理-转仓单新增', |
|||
height:600, |
|||
width:1200, |
|||
url: './products/mes/st/ivt/ChangeStor_insert.jsp', |
|||
queryParams:{ |
|||
}, |
|||
onClose:function(){ |
|||
query(); |
|||
} |
|||
}); |
|||
} |
|||
function opt_add2(){ |
|||
$.openWin({ |
|||
id: $.getUUID(), |
|||
title: '转仓单管理-转仓单新增', |
|||
height:600, |
|||
width:1200, |
|||
url: './products/mes/st/ivt/ChangeStor_insert2.jsp', |
|||
queryParams:{ |
|||
}, |
|||
onClose:function(){ |
|||
query(); |
|||
} |
|||
}); |
|||
} |
|||
function query(){ |
|||
var dataParam = getDataParam(); |
|||
$.grid_reload({ |
|||
id:_gridid, |
|||
queryParams:dataParam |
|||
}); |
|||
} |
|||
//format 生成方式 |
|||
function create_mode_fremark(is_active_value,row,index) { |
|||
var showValue=""; |
|||
if("01"== is_active_value) |
|||
showValue ="拉式"; |
|||
else if("02"== is_active_value) |
|||
showValue ="手工"; |
|||
else |
|||
showValue ="自动生成"; |
|||
return showValue; |
|||
} |
|||
//format 编辑 |
|||
function formatter_command(value,row,index) { |
|||
var str = ""; |
|||
if(row.status=='01'){ |
|||
str = '<i title="修改" class="fa fa-pencil-square-o grid-oper-icon" aria-hidden="true" onclick="_update('+JSON.stringify(row).replace(/\"/g,"'")+')"></i>'; |
|||
str += '<i title="删除" class="fa fa-trash-o grid-oper-icon" aria-hidden="true" onclick="_delete(\''+ row.changestor_uuid +'\')" ></i>'; |
|||
}else{ |
|||
str += '<i tilte="修改" class="fa fa-pencil-square-o grid-oper-icon" aria-hidden="true" style="color: #ddd;"></i>'; |
|||
str += '<i tilte="删除" class="fa fa-trash-o grid-oper-icon" aria-hidden="true" style="color: #ddd;"></i>'; |
|||
} |
|||
return str; |
|||
} |
|||
//format 超链接 |
|||
function formatter_changeStor_code(value,row,index) { |
|||
return "<a style='margin:5px;' href='javascript:void(0)' onclick=_view('"+ row.changestor_uuid +"')>"+value+"</a>"; |
|||
} |
|||
//format 单据状态 |
|||
function formatter_bill_status(is_active_value,row,index) { |
|||
var showValue=""; |
|||
if("01"== is_active_value) |
|||
showValue ="生成"; |
|||
else if("02"== is_active_value) |
|||
showValue ="审核"; |
|||
else if("03"== is_active_value) |
|||
showValue ="转仓中"; |
|||
else |
|||
showValue ="转仓完成"; |
|||
return showValue; |
|||
} |
|||
//删除记录 |
|||
function _delete(changestor_uuid) { |
|||
confirmDialog('是否确认删除!',function(){ |
|||
//打开旋转 |
|||
$.wait_open(); |
|||
//请求参数 |
|||
var dataParam = { |
|||
_SRVNAME:'servcie.ivt.changerStor' |
|||
,_SRVMETHOD:'delete' |
|||
,_DATA:$.json2str({ |
|||
accountInfo : $.getSessionUser(), |
|||
changestor_uuid : changestor_uuid |
|||
}) |
|||
}; |
|||
|
|||
//加载数据 |
|||
$.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(); |
|||
var jres = $.str2json(result); |
|||
//操作成功 |
|||
if (jres.code == "1") { |
|||
alert(jres.desc); |
|||
//删除后重新请求 |
|||
query(); |
|||
}else{ |
|||
alert(jres.desc); |
|||
} |
|||
}, |
|||
error:function(result){ |
|||
$.wait_close(); |
|||
alert('网络错误!result='+result); |
|||
} |
|||
}); |
|||
|
|||
},function(){}); |
|||
|
|||
} |
|||
//修改 |
|||
function _update(row){ |
|||
debugger; |
|||
var url = ""; |
|||
if(row.changestor_type=="91"){ |
|||
url="./products/mes/st/ivt/ChangeStor_update.jsp" |
|||
}else{ |
|||
url="./products/mes/st/ivt/ChangeStor_update2.jsp" |
|||
} |
|||
$.openWin({ |
|||
id: $.getUUID(), |
|||
title: '转仓单管理-转仓单修改', |
|||
height:650, |
|||
width:1200, |
|||
url: url, |
|||
queryParams:{ |
|||
selectedId : row.changestor_uuid |
|||
}, |
|||
onClose:function(){ |
|||
query(); |
|||
} |
|||
}); |
|||
} |
|||
//查看详情 |
|||
function _view(id){ |
|||
$.openWin({ |
|||
id: $.getUUID(), |
|||
title: '转仓单管理-转仓单明细', |
|||
height:650, |
|||
width:1200, |
|||
url: './products/mes/st/ivt/ChangeStor_view.jsp', |
|||
queryParams:{ |
|||
selectedId : id |
|||
} |
|||
}); |
|||
}; |
|||
//审核按钮 |
|||
function opt_auditing(){ |
|||
var row = $.grid_getSelected({ |
|||
id:_gridid |
|||
}); |
|||
if(typeof(row.changestor_uuid) == "undefined"){ |
|||
alert("请先选择一条需审核的记录!"); |
|||
return; |
|||
} |
|||
|
|||
confirmDialog('是否确认审核!',function(){ |
|||
//打开旋转 |
|||
$.wait_open(); |
|||
//请求参数 |
|||
var dataParam = { |
|||
_SRVNAME:'servcie.ivt.changerStor' |
|||
,_SRVMETHOD:'auditchangeStor' |
|||
,_DATA:$.json2str({ |
|||
user : $.getSessionUser(), |
|||
row : row |
|||
}) |
|||
}; |
|||
|
|||
//加载数据 |
|||
$.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(); |
|||
var jres = $.str2json(result); |
|||
//操作成功 |
|||
if (jres.code == "1") { |
|||
alert(jres.desc); |
|||
//刷新页面 |
|||
query(); |
|||
}else{ |
|||
alert(jres.desc); |
|||
} |
|||
}, |
|||
error:function(result){ |
|||
$.wait_close(); |
|||
alert('网络错误!result='+result); |
|||
} |
|||
}); |
|||
|
|||
},function(){}); |
|||
|
|||
} |
|||
//分配按钮 |
|||
function opt_distribute(){ |
|||
var row = $.grid_getSelected({ |
|||
id:_gridid |
|||
}); |
|||
if(typeof(row.changestor_uuid) == "undefined"){ |
|||
alert("请先选择一条需分配的记录!"); |
|||
return; |
|||
} |
|||
$.openWin({ |
|||
id: $.getUUID(), |
|||
title: '转仓单管理-转仓单分配', |
|||
height:650, |
|||
width:1200, |
|||
url: './products/mes/st/ivt/ChangeStor_div.jsp', |
|||
queryParams:{ |
|||
selectedId : row.changestor_uuid |
|||
}, |
|||
onClose:function(){ |
|||
query(); |
|||
} |
|||
}); |
|||
}; |
|||
</script> |
|||
</head> |
|||
<body class="easyui-layout" data-options="fit:true"> |
|||
<div data-options="region:'north',border:false,collapsed:false" class="page-title" > |
|||
<div class="page-toolbar"> |
|||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-plus'" onclick="opt_add()">过账转仓</a> |
|||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-plus'" onclick="opt_add2()">WMS转仓</a> |
|||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-check'" onclick="opt_auditing()" id="opt_auditing">审核</a> |
|||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-share'" onclick="opt_distribute()" id="opt_distribute">分配</a> |
|||
</div> |
|||
</div> |
|||
<div data-options="region:'center',border:false,collapsed:false" > |
|||
<div class="easyui-layout" data-options="fit:true" style="overflow:auto;"> |
|||
<div data-options="region:'north',border:false,collapsed:false" class="row-4" style="padding:0 10px;" > |
|||
<form id="search_form" > |
|||
<div class="h_layout" > |
|||
<div> |
|||
<div class="inputgroup"> |
|||
<label>转出仓库:</label> |
|||
<div> |
|||
<input id="out_stor_uuid" name="out_stor_uuid" placeholder=""> |
|||
</div> |
|||
</div> |
|||
<div class="inputgroup"> |
|||
<label>转入仓库:</label> |
|||
<div> |
|||
<input id="in_stor_uuid" name="in_stor_uuid"> |
|||
</div> |
|||
</div> |
|||
<div class="inputgroup" > |
|||
<label>制单日期</label> |
|||
<div> |
|||
<input id="date" name="date" /> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="h_layout"> |
|||
<div> |
|||
<div class="inputgroup"> |
|||
<label>状 态:</label> |
|||
<div> |
|||
<input id="status" name="status"> |
|||
</div> |
|||
</div> |
|||
<div class="inputgroup"> |
|||
<label>转仓单类型:</label> |
|||
<div> |
|||
<input id="changestor_type" name="changestor_type"> |
|||
</div> |
|||
</div> |
|||
<div class="inputgroup"> |
|||
<label>转仓单:</label> |
|||
<div> |
|||
<input id="changestor_code" name="changestor_code" placeholder="请输入转仓单号"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div style="width:125px;margin-botton:10px;"> |
|||
<a class="eapbutton" style="float:right;" onclick="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> |
Loading…
Reference in new issue