This commit is contained in:
2025-02-20 14:58:55 +08:00
parent 687bda5ead
commit d7be84fac6
1158 ha cambiato i file con 127232 aggiunte e 0 eliminazioni
@@ -0,0 +1,427 @@
${zhiqim_manager_content()}
${Scripts.src(zhiqim.js)}
${Scripts.src(zhiqim_uploadlarge.js)}
<script>
Z.onload(function(){
//考试状态
var status = ${initialStatus};
if(status == 10 ){
doChangeStep(2)
}else if(status == 20){
doChangeStep(3)
}else if(status == 30){
doChangeStep(4)
}else if(status == 40){
doChangeStep(4)
}else {
doChangeStep(1)
}
//初始化上传组件
initUploader("FUpload_Desgin","DesginFile","${desginPath}");
initUploader("FUpload_End","EndFile","${endPath}");
});
//上传设计文件
function initUploader(elem,fileType,path)
{
var questionsId = document.getElementById("questionsId").value;
var upload = new Z.UploadLarge();
upload.elem = elem;
upload.showResult = false;
upload.setFileDir(path);
upload.fileCopy = true;
upload.onSelected = function(fileName,FileType){
var ajax = new Z.Ajax();
ajax.setClassName("QuestionsFilePresenter");
ajax.setMethodName("doCheckFileName");
ajax.addParam(fileName);
ajax.addParam(fileType);
ajax.execute();
this.setFileName(questionsId + "-" + fileName);
};
upload.onCompleted = function(fileId, fileName){
var ajax = new Z.Ajax();
ajax.setClassName("QuestionsFilePresenter");
ajax.setMethodName("uploadQuestionsFile");
ajax.addParam(questionsId);
ajax.addParam(fileId);
ajax.addParam(fileType);
ajax.setFailure(function(){Z.alert(this.responseText);});
ajax.setSuccess(function(){
var obj = Z.J.toObject(this.responseText);
var items = obj.attaList;
var html = "";
Z("#"+fileType).html("");//清除历史数据
for (var i=0;i<items.length;i++)
{
var obj = items[i];
html += obj.fileName + "&nbsp;&nbsp;&nbsp;" +'<a id="attaId" onclick="doDelete('+ obj.attaId +');"><span style="color:#008bd2">删除</span></a>'+"<br/><br/>";
}
Z("#"+fileType).htmlc(html);
});
ajax.setLoading(document);
ajax.execute();
};
upload.execute();
};
function doChangeStep(step)
{//1 表示问卷考核,2表示虚拟订单,3表示等待审核,4表示审核通过
if (!step)
return;
if (!Z.V.isInteger(step))
return;
if (step == 1)
{//切换步骤内容
doUpdatePageCode(step);
}
else if (step == 2)
{//切换步骤内容
doUpdatePageCode(step);
}
else if (step == 3)
{//切换步骤内容
doUpdatePageCode(step);
}
else if (step == 4){
doUpdatePageCode(step);
}
return;
}
//切换步骤内容
function doUpdatePageCode(step)
{
//切换显示内容
Z("div[id^='stepContent_']").hide();
Z("div[id^='stepContent_"+step+"']").show();
//显示步骤条
step = step*1-1;
var $step = Z("div.z-stepbar").children("nav");
$step.removeClass("z-active");
Z($step[step]).addClass("z-active");
}
//移除截图
function doRemoveImg()
{
Z("#saveImgPath").remove();
}
//初始化监听考试截图
(function(){
var imgReader = function( item ){
var blob = item.getAsFile(),
reader = new FileReader();
Z("#saveImgPath").remove();//删除历史图片
// 读取文件后将其显示在网页中
reader.onload = function(e){
var img = new Image();
var result = e.target.result;
Z("#imgData").text(result);
img.src = result;
img.id = "saveImgPath";
Z("#imgSrc").append(img);
};
// 读取文件
reader.readAsDataURL(blob);
};
window.addEventListener( 'paste', function(e){
// 添加到事件对象中的访问系统剪贴板的接口
var clipboardData = e.clipboardData,
i = 0,
items, item, types;
if(clipboardData){
items = clipboardData.items;
if( !items ){
return;
}
item = items[0];
// 保存在剪贴板中的数据类型
types = clipboardData.types || [];
for( ; i < types.length; i++ ){
if( types[i] === 'Files' ){
item = items[i];
break;
}
}
// 判断是否为图片数据
if( item && item.kind === 'file' && item.type.match(/^image\//i) ){
imgReader( item );
}
}
});
})();
//提交成绩图
function doDraftSubmit()
{
var questionsId = document.getElementById("questionsId").value;
var data = Z("#imgData").text()
if (Z.Validates.isEmpty(data))
{
Z.alert("考试成绩截图为空")
return;
}
var ajax = new Z.Ajax();
ajax.setClassName("DesignerTestPresenter");
ajax.setMethodName("saveGrade");
ajax.addParam(data);
ajax.addParam(questionsId);
ajax.setFailureAlert();
ajax.setSuccess(function(){
Z.success("操作成功",function(){parent.location.reload();});
});
ajax.setLoading("doDraftSubmit", '正在提交', {disabled:true});
ajax.execute();
}
//考试地址
function doAssessSite(){
Z.alert("暂时不需要去考试,请直接随意截图提交。");
}
//提交审核
function doSubmitAudit()
{
var questionsId = document.getElementById("questionsId").value;
var ajax = new Z.Ajax();
ajax.setClassName("DesignerTestPresenter");
ajax.setMethodName("submitAudit");
ajax.addParam(questionsId);
ajax.setFailureAlert();
ajax.setSuccess(function(){
Z.success(("操作成功"),function(){
parent.location.reload();
});
});
ajax.execute();
}
//联系审核人
function contectQQ(userQq)
{
if (!Z.V.isInteger(userQq))
{
Z.alert("QQ号不合法");
return;
}
Z("#openFrm").attr("src","tencent://message/?uin="+userQq);
}
//重新考试
function doRefreshAssess()
{
var questionsId = document.getElementById("questionsId").value;
var ajax = new Z.Ajax();
ajax.setClassName("DesignerTestPresenter");
ajax.setMethodName("refreshAssess");
ajax.addParam(questionsId);
ajax.setFailureAlert();
ajax.setSuccess(function(){
Z.success("申请重新考核成功", function(){
parent.location.reload();
});
});
ajax.execute();
}
function downMaterialFile(attaId){
if (Z.V.isEmpty(attaId))
{
Z.alert("请选择需要下载的素材");
return ;
}
var mainFrame = parent.parent.document.URL;
var mainSrc = mainFrame.src;
var prefix = Z.l.protocol + "//" + Z.l.host ;
var element1 = document.createElement("a");
element1.href = prefix+"/downQuestionsFile.htm?attaId=" + attaId;
Z.L.href(prefix+"/downQuestionsFile.htm?attaId=" + attaId, zCallFrame);
}
//删除文件
function doDelete(attaId)
{
Z.confirm("您确定删除该文件吗?", function()
{
var ajax = new Z.Ajax();
ajax.setClassName("DesignerTestPresenter");
ajax.setMethodName("deleteFile");
ajax.addParam(attaId);
ajax.setFailureAlert();
ajax.setSuccess(function(){
Z.success("删除成功!", function(){
parent.location.reload();
});
});
ajax.execute()});
}
function showLargeImg()
{
var url="https://oss-89-taobao.oss-cn-shenzhen.aliyuncs.com/yangcai365_design/performance/questions_standard-1.png";
var hostUrl = Z.l.protocol+'//'+Z.l.host;
var dialog = new parent.Z.Dialog();
dialog.shadow = true;
dialog.title = "考试审核标准";
dialog.fixed = true;
dialog.url = hostUrl+"/showLargeImg.htm?imgpath="+url;
dialog.width = parent.Z.D.clientWidth()-800;
dialog.height = parent.Z.D.clientHeight()-200;
dialog.execute();
dialog.$background.remove();
}
</script>
<div class="z-pd10 z-px16 z-bg-white" style="padding-top:20px">
<input id="questionsId" type="hidden" value="${orderQuestions.getQuestionsId()}">
<!-- 默认步骤条效果 -->
<div class="z-stepbar z-blue">
<nav class="z-active">
<span class="z-round z-white z-mg-r5">1</span><span>问卷考核</span>
</nav>
<nav onclick="">
<span class="z-round z-white z-mg-r5">2</span><span>虚拟订单</span>
</nav>
<nav onclick="">
<span class="z-round z-white z-mg-r5">3</span><span>等待审核</span>
</nav>
<nav onclick="">
<span class="z-round z-white z-mg-r5">4</span><span>审核结果</span>
</nav>
</div>
<div id="stepContent_1">
<br/>
<table class="z-table z-bordered z-h50-tr z-pd10 z-bg-white" style="width:1100px;">
<tr>
<td width="10%">开始理论考试</td>
<td width="*"><button class="z-button z-large z-w120 ${zmr_color_class}" onclick="doAssessSite();">前往考试</button>
<font style="color:red">说明:为了提高审核通过率,请提交80分以上的截图,否则审核将不通过</font>
</td>
</tr>
<tr>
<td width="10%">考试成绩截图</td>
<td width="*" height="550">完成考试成绩截图后,直接<font style="color:red"> CTRL+V </font>粘贴即可
<div style="display:none" id="imgData"></div>
<div id="imgSrc"></div>
</td>
</tr>
<tr>
<td colspan="2">
<div class="z-text-center">
<button class="z-button z-large z-red" onclick="doRemoveImg();"><i class="z-font z-delete"></i>删除截图</button>
<button id="doDraftSubmit" class="z-button z-large z-blue" onclick="doDraftSubmit();"><i class="z-font z-save"></i>完成考试</button>
<div>
</td>
</tr>
</table>
</div>
<div id="stepContent_2">
<br/>
<form name="step2Form" action="javascript:void(0);" method="post" data-role="z-call-frame">
<table class="z-table z-bordered z-h50-tr z-pd10 z-bg-white" style="width:1100px;">
<tr>
<td width="10%">设计要求</td>
<td width="80%">${orderQuestions.getDesignRequirements()}</td>
<td width="10%"><button type="button" class="z-button z-large z-blue z-w110 z-mg-t20 zi-mg-b20" onclick="showLargeImg()"><i class="z-font z-query"></i>审核标准</button></td>
</tr>
<tr>
<td width="10%">设计素材</td>
<td colspan="2">
<#for item : materialFilerAttaList>
${item.getFileName()}&nbsp;&nbsp;&nbsp;<a href="javascript:downMaterialFile('${item.getAttaId()}')"><span style="color:#2483EB">下载</span></a><br/><br/>
</#for>
</td>
</tr>
<tr>
<td width="10%">设计文件</td>
<td width="80%" id="DesginFile">
<#for item : desginFileAttaList>
${item.getFileName()}&nbsp;&nbsp;&nbsp;<a id="attaId" onclick="doDelete(${item.getAttaId()});"><span style="color:#2483EB">删除</sapn></a><br/><br/>
</#for>
</td>
<td width="10%"><button id="FUpload_Desgin" type="button" class="z-button z-large z-blue z-w110 z-mg-t20 zi-mg-b20"><i class="z-font z-upload"></i>上传文件</button></td>
</tr>
<tr>
<td width="10%">印刷文件<br/><font color="red"> pdf格式</font></td>
<td width="80%" id="EndFile">
<#for item : endFileAttaList>
${item.getFileName()}&nbsp;&nbsp;&nbsp;<a id="attaId" onclick="doDelete(${item.getAttaId()});"><span style="color:#2483EB">删除</sapn></a><br/><br/>
</#for>
</td>
<td width="10%"><button id="FUpload_End" type="button" class="z-button z-large z-blue z-w110 z-mg-t20 zi-mg-b20"><i class="z-font z-upload"></i>上传文件</button></td>
</tr>
<tr>
<td colspan="3">
<div class="z-text-center">
<button class="z-button z-large z-blue" onclick="doSubmitAudit();"><i class="z-font z-save"></i>提交审核</button>
<div>
</td>
</tr>
</table>
</form>
</div>
<div id="stepContent_3">
<div style="margin-top:10px">
</div>
<div>
<br/><br/>
<p style="margin-top:10px">
<div>
<h3>审核中,请通过微信扫码联系审核人员确认相关入驻事宜</h3>
</div>
</p>
<br/><br/>
</div>
<img style="width:15%;" src="/zinc/images/VXQRcode.png">
</div>
<div id="stepContent_4">
<#if initialStatus = 40>
<div style="margin-top:10px">
</div>
<div>
<br/><br/>
<p style="margin-top:10px">
<div>
<h3><p style="color:#FF0000;font-weight:500">抱歉,审核未通过。未通过原因:${orderQuestions.getRemarks()}</p></h3>
</div>
</p>
<h3>详情请通过微信扫码联系审核人员</h3>
</div>
<img style="width:15%;" src="/zinc/images/VXQRcode.png"> </br></br>
<button id="doRefreshAssess" type="button" style="padding:7px;width:8%" class="z-button z-blue" onclick="doRefreshAssess();"><i class="z-font z-refresh"></i><font style="font-size:small">重新考核</font></button>
<button id="showLargeImg" type="button" style="padding:7px;width:8%" class="z-button z-blue" onclick="showLargeImg();"><i class="z-font z-query"></i><font style="font-size:small">审核标准</font></button>
</div>
<#else>
<div style="margin-top:10px">
</div>
<div>
<br/><br/>
<p style="margin-top:10px">
<div>
<h3 >恭喜你通过审核,请退出<span style="color:#FF0000">重新登录</span>设计平台,马上开始你的接单之旅吧!</h3>
</div>
</p>
<br/><br/>
</div>
</div>
</#if>
</div>
${zhiqim_manager_content_end()}
<#-- 联系QQ弹窗框 -->
<iframe id="openFrm" class="z-hide" src="about:blank"></iframe>