<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<meta http-equiv="pragma" content="no-cache" />
<script>
var locale='en_US';
var include='jqms,prompt,mask';
var tabInit='true';
var debug='false';
var addrPortPath = '172.16.69.137:17200';
var SYSTEM_CONFIG_URL = '';
var LOGOUT_URL = '';
</script>
<script type="text/javascript" src="/aaa/style/libs/jquery/jquery-1.6.3.min.js"></script>
<script type="text/javascript" src="/aaa/style/simple/js/first.js"></script>
<link rel="stylesheet" type="text/css" href="/aaa/style/simple/css/tab.css" />
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="/aaa/style/simple/css/ie6.css" />
<![endif]-->
<script type="text/javascript">
var userIsRunning=0;
Nf.loadResource("i18n/UploadAction");
var errorMsg = "null";
var userCountFlag="true";
var isImpForStart ="";
var woNumber="0";
if (errorMsg != null && errorMsg != "" && errorMsg != "null")
{
Nf.promptAlert({message:Nf.res(errorMsg)});
errorMsg = "";
}
function doExportTemplate()
{
window.location = "DownloadExcelTemplate.action?fileName="+$("#filePath").val();
}
function validateFile()
{
$.ajax({
url: "/aaa/UploadAction!getImportStateSize.action",
cache:false,
async : true,
success: function(result){
userIsRunning=result;
if(result>0){
Nf.promptAlert({message:Nf.res("order.import.importing")});
return;
}else
{
if(validateFileName())
{
document.importform.submit();
}
}
}
});
}
function validateFileName()
{
fileName = E("file").value;
if (fileName == null || fileName == "")
{
Nf.promptAlert({message:Nf.res("order.import.errormsg.filenameblank")});
return false;
}
pathArray = fileName.split("\\");
len = pathArray.length;
path = pathArray[len - 1].split(".")[0];
if (path.length > 100)
{
Nf.promptAlert({message:Nf.res("order.import.errormsg.filenameoverlong")});
return false;
}
farray = fileName.split(".");
len = farray.length;
if(farray[len-1].toLowerCase()!= 'xls'&&farray[len-1].toLowerCase()!='xlsx')
{
Nf.promptAlert({message:Nf.res("order.import.errormsg.filenotexcel")});
return false;
}
return true;
}
Nf.ready(function(){
if(userIsRunning<=0 && isImpForStart=="true" && userCountFlag=="true")
{
var myMask = new Nf.LoadMask('importContent',{msg:Nf.res("order.import.importing.other")});
myMask.show();
var maskId=setInterval(function(){
$.ajax({
url:"/aaa/UploadAction!getImportStateByUserId.action",
cache:false,
async:true,
success:function(result){
if(result==1){
myMask.hide();
clearInterval(maskId);
Nf.promptAlert({
message : Nf.res("order.import.complete"),
height : 150,
width : 360});
}
}
})
},200)
}else if(userCountFlag=="false"){
Nf.promptAlert({message:Nf.res("order.import.delay")});
$.ajax({
url:"/aaa/UploadAction!updateUserImportState.action",
cache:false,
async:true
})
}
})
</script>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Import WOs</title>
<script>
//Nf.promptAlert({message:"The system starts to import data on the background. View the importing result later."});
</script>
<style>
.fileHide
{
opacity:0;
filter:Alpha(Opacity=0);
z-index:9999;
position:absolute;
height:20px;
margin-top:1px;
width:252px;
}
</style>
</head>
<body>
<div id="middleCon" class="center">
<div id="importContent">
<form id="importform" name="importform" action="UploadAction.action" enctype="MULTIPART/FORM-DATA" method="post">
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0" class="list_table">
<tr id="importlogfile">
<td align="right" class="td_table_1"><label>WO Template</label>
<span class="tip" title="The maximum count of data rows is 1000.">: </span>
</td>
<td colspan="4" class="td_table_2">
<div style="padding-left:5px;">
<!-- modify ckf55699 for DTS2012030203684 start -->
<table width="540" align="left" cellpadding="0" cellspacing="0" style="border-width:0">
<tr>
<td>CM WO (Excel 2003)</td>
<td><a href="DownloadExcelTemplate.action?fileName=/task/template/excelTemplate/zh_CN_Template(CM).xls"><img src="/aaa/ui/images/chinese_1.jpg"/></a>
<a href="DownloadExcelTemplate.action?fileName=/task/template/excelTemplate/Templet(CM).xls"><img src="/aaa/ui/images/english_1.jpg"/></a>
</td>
<td>CM WO (Excel 2007)</td>
<td><a href="DownloadExcelTemplate.action?fileName=/task/template/excelTemplate/zh_CN_Template(CM).xlsx"><img src="/aaa/ui/images/chinese_1.jpg"/></a>
<a href="DownloadExcelTemplate.action?fileName=/task/template/excelTemplate/Templet(CM).xlsx"><img src="/aaa/ui/images/english_1.jpg"/></a>
</td>
</tr>
<tr>
<td>CR WO (Excel 2003)</td>
<td><a href="DownloadExcelTemplate.action?fileName=/task/template/excelTemplate/zh_CN_Template(CR).xls"><img src="/aaa/ui/images/chinese_1.jpg"/></a>
<a href="DownloadExcelTemplate.action?fileName=/task/template/excelTemplate/Templet(CR).xls"><img src="/aaa/ui/images/english_1.jpg"/></a>
</td>
<td>CR WO (Excel 2007)</td>
<td><a href="DownloadExcelTemplate.action?fileName=/task/template/excelTemplate/zh_CN_Template(CR).xlsx"><img src="/aaa/ui/images/chinese_1.jpg"/></a>
<a href="DownloadExcelTemplate.action?fileName=/task/template/excelTemplate/Templet(CR).xlsx"><img src="/aaa/ui/images/english_1.jpg"/></a>
</td>
</tr>
<tr>
<td>PM WO (Excel 2003)</td>
<td><a href="DownloadExcelTemplate.action?fileName=/task/template/excelTemplate/zh_CN_Template(PM).xls"><img src="/aaa/ui/images/chinese_1.jpg"/></a>
<a href="DownloadExcelTemplate.action?fileName=/task/template/excelTemplate/Templet(PM).xls"><img src="/aaa/ui/images/english_1.jpg"/></a>
</td>
<td>PM WO (Excel 2007)</td>
<td><a href="DownloadExcelTemplate.action?fileName=/task/template/excelTemplate/zh_CN_Template(PM).xlsx"><img src="/aaa/ui/images/chinese_1.jpg"/></a>
<a href="DownloadExcelTemplate.action?fileName=/task/template/excelTemplate/Templet(PM).xlsx"><img src="/aaa/ui/images/english_1.jpg"/></a>
</td>
</tr>
<tr>
<td>SA WO (Excel 2003)</td>
<td><a href="DownloadExcelTemplate.action?fileName=/task/template/excelTemplate/zh_CN_Template(SA).xls"><img src="/aaa/ui/images/chinese_1.jpg"/></a>
<a href="DownloadExcelTemplate.action?fileName=/task/template/excelTemplate/Templet(SA).xls"><img src="/aaa/ui/images/english_1.jpg"/></a>
</td>
<td>SA WO (Excel 2007)</td>
<td><a href="DownloadExcelTemplate.action?fileName=/task/template/excelTemplate/zh_CN_Template(SA).xlsx"><img src="/aaa/ui/images/chinese_1.jpg"/></a>
<a href="DownloadExcelTemplate.action?fileName=/task/template/excelTemplate/Templet(SA).xlsx"><img src="/aaa/ui/images/english_1.jpg"/></a>
</td>
</tr>
</table>
<!-- modify ckf55699 for DTS2012030203684 end -->
</div>
</td>
</tr>
<tr id="importlogfile1">
<td class="td_table_1">Import File: </td>
<td colspan="4" class="td_table_2">
<input type="file" size="28" name="file" id="file" contentEditable="false"
onchange="document.getElementById('file_0').value=this.value" class="fileHide" style="cursor:pointer">
<input name="file_0" id="file_0" value="" style="width:185px">
<!-- modify by ckf55699 2012.2.29 for DTS2012022800353 start -->
<input type="button" value="Browse" class="button20" style="width:60px;">
<!-- modify by ckf55699 2012.2.29 for DTS2012022800353 end -->
<input type="hidden" name="fileName">
<input type="button" class="button20" id="save" name="save" onclick="validateFile();" value="Import" /> <label class="required">*</label>
<span id="importing" style="display:none;margin-left:5px">
</span>
</td>
</tr>
<tr id="importlogfile" >
<td align="right" class="td_table_1">
<label>Notes: </label></td>
<td colspan="4" class="td_table_2">
1.Please don't modify any column name or sheet name of the template file.
2.Order information fields which start with "*" can't be left blank.
</td>
</tr>
<tr id="exportLink" >
<td align="right" class="td_table_1">
<label>Imported Result </label></td>
<td colspan="4" class="td_table_2" id="result">
<a href="/aaa/task/template/uploadAndImportResult.jsp" >View Importing Result</a>
</td>
</tr>
</table>
</form>
</div>
</div>
</body>
</html>
</head>
</html>