first commit

This commit is contained in:
2025-02-20 14:59:35 +08:00
parent d7be84fac6
commit d4a3bb8ffc
2541 changed files with 336536 additions and 0 deletions
@@ -0,0 +1,89 @@
<script>
Z.onload(function(){
});
var catList = Z.J.toObject('${Global.get(MaterialCatCache.class).list()}');
function doSelType(value)
{//素材类型
var catCode = Z("#catCode");
catCode[0].options.length = 0;
var defaultCode = null;
for(var i=0;i<catList.length;i++)
{
var obj = catList[i];
if(obj.typeCode == value)
{
catCode[0].options.add(new Option(obj.catName, obj.catCode));
if(defaultCode == null)
defaultCode = obj.catCode;
}
}
Z.Select.load();
}
function doSubmit()
{//提交
var ajax = new Z.Ajax();
ajax.setClassName("UserMaterialPresenter");
ajax.setMethodName("doApplySysMaterial");
ajax.addParam("svgId", "${material.getSvgId()}");
ajax.addParam("typeCode", Z("#typeCode").val());
ajax.addParam("catCode", Z("#catCode").val());
ajax.addParam("keywords", Z("#keywords").val());
ajax.addParam("svgSeq", Z("#svgSeq").val());
ajax.setFailureAlert();
ajax.setSuccess(function(){
Z.alert("添加成功", function(){parent.Z.Dialog.close();});
});
ajax.execute();
}
</script>
<div class="content">
<form id="theForm" name="theForm">
<input type="hidden" name="mediaId" id="mediaId" value="">
<table class="z-table z-bordered z-pd10 z-bg-white z-text-left">
<tr>
<td align="right" width="200">选择类型:</td>
<td width="*">
<select class="z-float-left z-select z-w200" data-role="z-select" data-class="${zmr_color_class}" name="typeCode" id="typeCode" onchange="doSelType(this.value)">
<#for item : MaterialConstants.getMaterialTypeList()>
<option value="${item.value()}" <#if item.value() == material.getTypeCode()>selected</#if>>${item.desc()}</option>
</#for>
</select>
</td>
</tr>
<td align="right">选择分类:</td>
<td>
<select id="catCode" name="catCode" class="z-float-left z-select z-w200" data-role="z-select" data-class="${zmr_color_class}" >
<#for cat : Global.get(MaterialCatCache.class).list()>
<#if cat.getTypeCode()== material.getTypeCode()>
<option value="${cat.getCatCode()}" <#if cat.getCatCode() == material.getCatCode()>selected</#if>>${cat.getCatName()}</option>
</#if>
</#for>
</select>
</td>
</tr>
<tr class="z-h40" >
<td align="right">关键字:(多个逗号分隔)</td>
<td>
<input id="keywords" name="keywords" input class="z-input z-w200 ${zmr_color_class}" value="${material.getKeywords()}" maxlength="20">
<font color=red>*</font></td>
</tr>
<tr class="z-h40" >
<td align="right">序号:</td>
<td>
<input id="svgSeq" name="svgSeq" input class="z-input z-w200 ${zmr_color_class}" value="${material.getSvgSeq()}" maxlength="5">
<font color=red>*</font></td>
</tr>
</table>
</form>
<div class="z-bg-gray z-absolute z-w100p z-h80 z-text-center z-pd20" style="bottom:0;">
<button type="button" class="z-button z-large z-w100 z-blue" onclick="doSubmit();">确定</button>
<button type="button" class="z-button z-large z-w100 z-mg-l10" onclick="parent.Z.Dialog.close();">关闭</button>
</div>
</div>
@@ -0,0 +1,166 @@
${Styles.src("/zinc/css/design_2018102301.css")}
${Scripts.src("/zinc/js/design_2018102301.js")}
${Scripts.src("/zinc/js/zhiqim_search_auto_list.js")}
<script>
<!--
Z.onload(function()
{//定义搜索框
doSearchAjax("1");
})
document.onkeydown = function(e)
{
var keyword = Z("#searchinput").val();
if(Z.V.isEmpty(keyword)){
return;
}
if (e.keyCode == 13)
{
doSearchAjax("1");
}
};
function doSearchAjax(page)
{//查询模板
var designType = Z("#designType").val();
var tr = document.getElementById("allTemplateTrId");
if (designType == 3) {
tr.style.display = "table-row";
}else {
tr.style.display = "none";
}
var oddEven = Z("#oddEven").val();
var keyword = Z("#searchinput").val() || "";
var ajax = new Z.Ajax();
ajax.setClassName("KeywordPresenter");
ajax.setMethodName("doKeywordSearch");
ajax.addParam("page", page);
ajax.addParam("designType", designType);
ajax.addParam("industryId", Z("#industryId").val());
ajax.addParam("fileType", Z("#fileType").val());
ajax.addParam("oddEven", oddEven);
ajax.addParam("keyword", keyword);
ajax.addParam("sort", Z("#sort").val());
ajax.setCallback("resultWrap");
ajax.setLoading("resultWrap");
ajax.execute();
}
//名片手机库访问连接
function doCopyURLInfoPC()
{
var designType = Z("#designType").val();
var industryId = Z("#industryId").val();
var keyword = Z("#searchinput").val()
var param = "prdTypeId="+designType+"&industryId="+industryId+"&keyword="+keyword
Z.copy("http://design.yangcai365.com/pcWorks.htm?"+param);
top.Z.tips("复制成功");
}
function doOddEven(ele,oddEvenId) {
Z("#oddEven").val(oddEvenId);
Z(ele).addClass('z-active').siblings("button").removeClass("z-active");
doSearchAjax("1");
}
</script>
${zhiqim_manager_breadcrumb_parent("/templateMy.htm", "我的模板", "所有模板")}
${zhiqim_manager_content()}
<#-- 导航栏 -->
<div class="z-tabnav-main z-blue z-mg-b20">
<nav>
<ul>
<li onclick="Z.Location.href('templateDraftMy.htm');">我的草稿模板</li>
<li onclick="Z.Location.href('templateOrderMy.htm');">我的订单模板</li>
<li onclick="Z.Location.href('templateMy.htm');">我的模板</li>
<li onclick="Z.Location.href('templateCollect.htm');">我收藏的</li>
<li onclick="Z.Location.href('templateShare.htm');">分享给我的</li>
<li class="z-active">所有模板</li>
<!-- <li onclick="Z.Location.href('bestTemplate.htm');">精品模板</li> -->
<#if ZmrPathRule.check(request, "/templateAudit.htm")><li onclick="Z.Location.href('templateAudit.htm');">模板审核</li></#if>
<!-- <#if ZmrPathRule.check(request, "/templateBestAudit.htm")><li onclick="Z.Location.href('templateBestAudit.htm');">精品审核</li></#if> -->
<#if ZmrPathRule.check(request, "/desTemplateLogList.htm")><li onclick="Z.Location.href('desTemplateLogList.htm');">模版日志</li></#if>
</ul>
</nav>
</div>
<#-- 关键词搜索 -->
<input type="hidden" id="designType" name="designType" value="">
<input type="hidden" id="industryId" name="industryId" value="">
<input type="hidden" id="fileType" name="fileType" value="">
<input type="hidden" id="sort" name="sort" value="0">
<input type="hidden" id="oddEven" name="oddEven" value="-1">
<table id="allTempalteTb" class="z-table z-bordered z-pd6" bgcolor="#FFFFFF">
<tr class="z-h40" bgcolor="${oddColor}">
<td colspan="2">
<div class="z-h1 z-text-center" id="searchDiv">
<span>
<input id="searchinput" class="z-input z-w600 zi-h40" placeholder="输入关键词" value="" maxlength="60">
<button type="button" class="z-button z-w80 z-h40 zi-bd-rd0 z-orange" onclick="doSearchAjax('1');"><i class="z-font z-query"></i>搜索</button>
</span>
<span style="float:right;">
<button class="z-button z-blue z-small" onclick="doCopyURLInfoPC();"><i class="z-font z-text"></i>复制模板库链接</button>
</span>
</div>
</td>
</tr>
<tr class="z-h40" bgcolor="${oddColor}">
<td width="5%">类型:</td>
<td width="*">
<button id="nav_10086" type="button" data-options="group:prdType" class="z-button z-large z-bordered z-blue-bd z-hover" onclick="Z.EL.toggleClass(this,'z-active');Z('#designType').val('');doSearchAjax('1');">全部</button>
<#for item : DesignTypeDao.listTemmplate()>
<button id="nav_${item.getTypeId()}" type="button" data-options="group:prdType" class="z-button z-large z-bordered z-blue-bd z-hover" onclick="Z.EL.toggleClass(this,'z-active');Z('#designType').val('${item.getTypeId()}');doSearchAjax('1');">${item.getTypeName()}</button>
</#for>
</td>
</tr>
<tr class="z-h40">
<td>行业:</td>
<td>
<button id="ind_10087" type="button" data-options="group:industry" class="z-button z-large z-bordered z-blue-bd z-hover" onclick="Z.EL.toggleClass(this,'z-active');Z('#industryId').val('');doSearchAjax('1');">全部</button>
<#for item : Global.get(DesignIndustryCache.class).getIndustryList()>
<button id="ind_${item.getIndustryId()}" type="button" data-options="group:industry" class="z-button z-large z-bordered z-blue-bd z-mg-t3 z-hover" onclick="Z.EL.toggleClass(this,'z-active');Z('#industryId').val('${item.getIndustryId()}');doSearchAjax('1');">${item.getIndustryName()}</button>
</#for>
</td>
</tr>
<tr class="z-h40" bgcolor="${oddColor}">
<td width="5%">文件格式:</td>
<td width="*">
<button type="button" data-options="group:fileType" class="z-button z-large z-bordered z-blue-bd z-hover" onclick="Z.EL.toggleClass(this,'z-active');Z('#fileType').val('');doSearchAjax('1');">全部</button>
<button type="button" data-options="group:fileType" class="z-button z-large z-bordered z-blue-bd z-hover" onclick="Z.EL.toggleClass(this,'z-active');Z('#fileType').val('CDR');doSearchAjax('1');">CDR</button>
<button type="button" data-options="group:fileType" class="z-button z-large z-bordered z-blue-bd z-hover" onclick="Z.EL.toggleClass(this,'z-active');Z('#fileType').val('PSD');doSearchAjax('1');">PSD</button>
<button type="button" data-options="group:fileType" class="z-button z-large z-bordered z-blue-bd z-hover" onclick="Z.EL.toggleClass(this,'z-active');Z('#fileType').val('AI');doSearchAjax('1');">AI</button>
<button type="button" data-options="group:fileType" class="z-button z-large z-bordered z-blue-bd z-hover" onclick="Z.EL.toggleClass(this,'z-active');Z('#fileType').val('RAR');doSearchAjax('1');">RAR</button>
<button type="button" data-options="group:fileType" class="z-button z-large z-bordered z-blue-bd z-hover" onclick="Z.EL.toggleClass(this,'z-active');Z('#fileType').val('PDF');doSearchAjax('1');">PDF</button>
</td>
</tr>
<tr class="z-h40" bgcolor="${oddColor}">
<td width="5%">排序:</td>
<td width="*">
<!-- <button type="button" data-options="group:sort" class="z-button z-large z-bordered z-blue-bd z-hover" onclick="Z.EL.toggleClass(this,'z-active');Z('#sort').val('0');doSearchAjax('1');">默认</button> -->
<button type="button" style="width:100px;" data-options="group:sort" class="z-button z-large z-bordered z-blue-bd z-hover" onclick="Z.EL.toggleClass(this,'z-active');Z('#sort').val('3');doSearchAjax('1');">最热</button>
<button type="button" style="width:100px;" data-options="group:sort" class="z-button z-large z-bordered z-blue-bd z-hover" onclick="Z.EL.toggleClass(this,'z-active');Z('#sort').val('1');doSearchAjax('1');">最新</button>
<button type="button" style="width:100px;" data-options="group:sort" class="z-button z-large z-bordered z-blue-bd z-hover" onclick="Z.EL.toggleClass(this,'z-active');Z('#sort').val('4');doSearchAjax('1');">精品</button>
<!-- <button type="button" data-options="group:sort" class="z-button z-large z-bordered z-blue-bd z-hover" onclick="Z.EL.toggleClass(this,'z-active');Z('#sort').val('2');doSearchAjax('1');">ID升序</button> -->
</td>
</tr>
<tr id="allTemplateTrId" class="z-h40" bgcolor="${oddColor}" style="display:none">
<td>模板版式:</td>
<td width="*">
<button type="button" data-options="group:oddEven" class="z-button z-large z-bordered z-blue-bd z-mg-t3 z-hover z-active" onclick="Z.EL.toggleClass(this,'z-active');Z('#oddEven').val('-1');doSearchAjax('1');">全部</button>
<button type="button" data-options="group:oddEven" class="z-button z-large z-bordered z-blue-bd z-mg-t3 z-hover" onclick="Z.EL.toggleClass(this,'z-active');Z('#oddEven').val('0');doSearchAjax('1');">横版</button>
<button type="button" data-options="group:oddEven" class="z-button z-large z-bordered z-blue-bd z-mg-t3 z-hover" onclick="Z.EL.toggleClass(this,'z-active');Z('#oddEven').val('1');doSearchAjax('1');">竖版</button>
</td>
</tr>
</table>
<div id="resultWrap" style="z-index:9999999px;"></div>
${zhiqim_manager_content_end()}
@@ -0,0 +1,95 @@
<#def designatedPath="/allTemplate.htm"/>
<script>
<!--
Z.onload(function()
{
doTemplateSearch("1");
})
function doTemplateSearch(page)
{
// 关键词搜索
var keyword = Z("#searchinput").val() || "";
var ajax = new Z.Ajax();
ajax.setClassName("TemplatePresenter");
ajax.setMethodName("doTemplateSearch");
ajax.addParam("page", page);
ajax.addParam("urlParam", "BEST");
ajax.addParam("typeId", Z("#typeId").val());
ajax.addParam("industryId", Z("#industryId").val());
ajax.addParam("fileType", Z("#fileType").val());
ajax.addParam("keyword", keyword);
ajax.setCallback("resultWrap");
ajax.setLoading("resultWrap");
ajax.execute();
}
-->
</script>
${Styles.src("/zinc/css/design_2018102301.css")}
${Scripts.src("/zinc/js/design_2018102301.js")}
${zhiqim_manager_breadcrumb_parent("/templateMy.htm", "我的模板", "精品模板")}
${zhiqim_manager_content()}
<#-- 导航栏 -->
<div class="z-tabnav-main z-blue z-mg-b20">
<nav>
<ul>
<li onclick="Z.Location.href('templateMy.htm');">我的草稿模板</li>
<li onclick="Z.Location.href('templateMy.htm');">我的订单模板</li>
<li onclick="Z.Location.href('templateMy.htm');">我的模板</li>
<li onclick="Z.Location.href('templateCollect.htm');">我收藏的</li>
<li onclick="Z.Location.href('templateShare.htm');">分享给我的</li>
<li onclick="Z.Location.href('allTemplate.htm');">所有模板</li>
<li class="z-active">精品模板</li>
<#if ZmrPathRule.check(request, "/templateAudit.htm")><li onclick="Z.Location.href('templateAudit.htm');">模板审核</li></#if>
<#if ZmrPathRule.check(request, "/templateBestAudit.htm")><li onclick="Z.Location.href('templateBestAudit.htm');">精品审核</li></#if>
<#if ZmrPathRule.check(request, "/desTemplateLogList.htm")><li onclick="Z.Location.href('desTemplateLogList.htm');">模版日志</li></#if>
</ul>
</nav>
</div>
<div class="z-mg-t20 z-h1 z-text-center" id="searchDiv">
<span style="float:center;">
<input id="searchinput" class="z-input z-w600 zi-h40 zi-bd-r-none" placeholder="输入关键词" value="" maxlength="60"><button type="button" class="z-button z-w80 z-h40 zi-bd-rd0 z-orange" onclick="doTemplateSearch('1');"><i class="z-font z-query"></i>搜索</button>
</span>
</div>
<table class="z-table z-bordered z-pd6">
<input type="hidden" id="typeId" name="typeId" value="">
<input type="hidden" id="industryId" name="industryId" value="">
<input type="hidden" id="fileType" name="fileType" value="">
<tr class="z-h40" bgcolor="${oddColor}">
<td width="5%">类型:</td>
<td width="*">
<button type="button" data-options="group:typeId" class="z-button z-large z-bordered z-blue-bd z-hover <#if typeId == -1 || Validates.isEmpty(typeId)>z-active</#if>" onclick="{Z(this).toggleClass('z-active');Z('#typeId').val('');};doTemplateSearch('1');">全部</button>
<#for item : DesignTypeDao.list()>
<button type="button" data-options="group:typeId" class="z-button z-large z-bordered z-blue-bd z-hover z-mg-t3 <#if item.getTypeId() == typeId>z-active</#if>" onclick="{Z(this).toggleClass('z-active');Z('#typeId').val(${item.getTypeId()});};doTemplateSearch('1');">${item.getTypeName()}</button>
</#for>
</td>
</tr>
<tr class="z-h40" bgcolor="#FFFFFF">
<td>行业:</td>
<td>
<button type="button" data-options="group:industryId" class="z-button z-large z-bordered z-blue-bd z-hover <#if industryId == -1 || Validates.isEmpty(industryId)>z-active</#if>" onclick="{Z(this).toggleClass('z-active');Z('#industryId').val('');};doTemplateSearch('1');">全部</button>
<#for item : Global.get(DesignIndustryCache.class).getIndustryList()>
<button type="button" data-options="group:industryId" class="z-button z-large z-bordered z-blue-bd z-hover z-mg-t3 <#if item.getIndustryId() == industryId>z-active</#if>" onclick="{Z(this).toggleClass('z-active');Z('#industryId').val(${item.getIndustryId()});};doTemplateSearch('1');">${item.getIndustryName()}</button>
</#for>
</td>
</tr>
<tr class="z-h40" bgcolor="${oddColor}">
<td width="5%">文件格式:</td>
<td width="*">
<button type="button" data-options="group:fileType" class="z-button z-large z-bordered z-blue-bd z-hover z-active" onclick="Z.EL.toggleClass(this,'z-active');Z('#fileType').val('');doTemplateSearch('1');">全部</button>
<button type="button" data-options="group:fileType" class="z-button z-large z-bordered z-blue-bd z-hover" onclick="Z.EL.toggleClass(this,'z-active');Z('#fileType').val('CDR');doTemplateSearch('1');">CDR</button>
<button type="button" data-options="group:fileType" class="z-button z-large z-bordered z-blue-bd z-hover" onclick="Z.EL.toggleClass(this,'z-active');Z('#fileType').val('PSD');doTemplateSearch('1');">PSD</button>
<button type="button" data-options="group:fileType" class="z-button z-large z-bordered z-blue-bd z-hover" onclick="Z.EL.toggleClass(this,'z-active');Z('#fileType').val('AI');doTemplateSearch('1');">AI</button>
<button type="button" data-options="group:fileType" class="z-button z-large z-bordered z-blue-bd z-hover" onclick="Z.EL.toggleClass(this,'z-active');Z('#fileType').val('PDF');doTemplateSearch('1');">PDF</button>
</td>
</tr>
</table>
<div id="resultWrap"></div>
${zhiqim_manager_content_end()}
@@ -0,0 +1,85 @@
<script>
function validateForm(form)
{
if (Z.V.isEmpty(form.mediaId.value))
{
Z.tips({text:"请输入模版号", width: 150});
return false;
}
return true;
}
function doTemplateCopy(mediaId)
{//复制
var ajax = new Z.Ajax();
ajax.setClassName("TemplatePresenter");
ajax.setMethodName("doTemplateCopy");
ajax.addParam("mediaId", mediaId);
ajax.setFailureAlert();
ajax.setSuccess(function(){
Z.tips("复制成功");
});
ajax.setLoading(document, true);
ajax.execute();
}
</script>
${zhiqim_manager_breadcrumb("模版日志")}
${zhiqim_manager_content()}
<#-- 导航 -->
<div data-role="z-tabnav" class="z-tabnav-main z-mg-b20 ${zmr_color_class}">
<nav>
<ul>
<li onclick="Z.Location.href('templateDraftMy.htm');">我的草稿模板</li>
<li onclick="Z.Location.href('templateOrderMy.htm');">我的订单模板</li>
<li onclick="Z.Location.href('templateMy.htm');">我的模板</li>
<li onclick="Z.Location.href('templateCollect.htm');">我收藏的</li>
<li onclick="Z.Location.href('templateShare.htm');">分享给我的</li>
<li onclick="Z.Location.href('allTemplate.htm');">所有模板</li>
<!-- <li onclick="Z.Location.href('bestTemplate.htm');">精品模板</li> -->
<#if ZmrPathRule.check(request, "/templateAudit.htm")><li onclick="Z.Location.href('templateAudit.htm');">模板审核</li></#if>
<!-- <#if ZmrPathRule.check(request, "/templateBestAudit.htm")><li onclick="Z.Location.href('templateBestAudit.htm');">精品审核</li></#if> -->
<#if ZmrPathRule.check(request, "/desTemplateLogList.htm")><li class="z-active">模版日志</li></#if>
</ul>
</nav>
</div>
<#-- 查询条件 -->
${zhiqim_manager_title("模版日志查询")}
<form name="theForm" method="post" onsubmit="return validateForm(this);">
<table class="z-table z-bordered z-bg-white z-pd6">
<tr>
<td>
<select name="queryType" class="z-select z-w180" data-role="z-select" data-class="${zmr_color_class}">
<option value="0" <#if queryType == 0>selected</#if>>审核日志</option>
<option value="1" <#if queryType == 1>selected</#if>>模板查询</option>
</select>
&nbsp;&nbsp;模版号:<input class="z-input ${zmr_color_class} z-w200" name="mediaId" value="${mediaId}" maxlength="20" placeholder="模版号">
<button type="submit" class="z-button z-large z-w120 z-mg-l20 z-mg-r15 ${zmr_color_class}">查询</button><button class="z-button z-large" type="button" onclick="Z.FM.clearForm(this.form);">清空</button>
</td>
</tr>
</table>
</form>
<#-- 列表 -->
<table class="z-table z-bordered z-h40-tr zi-bd z-pd5 z-bg-white z-text-center z-mg-t20" >
<tr bgcolor="${zmr_thead_bgcolor}">
<td width="20%">模版号</td>
<td width="20%">审核人</td>
<td width="*">描述</td>
<td width="20%">操作时间</td>
</tr>
${zhiqim_manager_tr_no_record(pageResult, 4, "暂时没有模版日志信息")}
<#for item : pageResult.list()>
<tr ${zhiqim_manager_tr_onmouse()}>
<td>${item.getMediaId()}</td>
<td>${item.getOperatorCode()}</td>
<td>${item.getLogDesc()}</td>
<td><#if queryType == 0>${Sqls.toDateTimeString(item.getCreateTime())}<#else><button type="button" class="z-button z-blue" onclick="doTemplateCopy('${item.getMediaId()}')">复制模板</button></#if></td>
</tr>
</#for>
</table>
${zhiqim_manager_paging(pageResult, "desTemplateLogList.htm")}
${zhiqim_manager_content_end()}
@@ -0,0 +1,37 @@
${Scripts.src(zhiqim_uploadlarge.js)}
<script>
function doFileDownload(filetype,url){
if(filetype=='pdf'){
var fileName = ${mediaId} + ".pdf";
var element1 = document.createElement("a");
element1.href = url;
element1.setAttribute("download", fileName);
element1.click();
}else{
window.open(url);
}
}
</script>
<table class="z-table z-bordered z-pd10 z-bg-white">
<tr height="80">
<td width="15%">请选择:</td>
<td width="85%">
<#if Validates.isNotEmpty(urlMap.get("pdf"))>
<button type="button" class="z-button z-large ${zmr_color_class} zi-mg-l5" onclick="doFileDownload('pdf','${urlMap.get("pdf")}');">
PDF文件下载</button>
</#if>
<#if Validates.isNotEmpty(urlMap.get("cdr"))>
<button type="button" class="z-button z-large ${zmr_color_class} zi-mg-l5" onclick="doFileDownload('cdr','${urlMap.get("cdr")}');">
CDR文件下载</button>
</#if>
<#if Validates.isNotEmpty(urlMap.get("psd"))>
<button type="button" class="z-button z-large ${zmr_color_class} zi-mg-l5" onclick="doFileDownload('psd','${urlMap.get("psd")}')">
PSD文件下载</button>
</#if>
<#if Validates.isNotEmpty(urlMap.get("ai"))>
<button type="button" class="z-button z-large ${zmr_color_class} zi-mg-l5" onclick="doFileDownload('ai','${urlMap.get("ai")}');">
AI文件下载</button>
</#if>
</td>
</tr>
</table>
@@ -0,0 +1,206 @@
${Scripts.src(zhiqim_uploadlarge.js)}
<script>
Z.onload(function()
{//初始化上传组件
initHTML5Uploader();
initHTML5Uploader1();
Z("#FUpload_design").next().attr("accept",".cdr");
Z("#ZUploadmultPreview").next().attr("accept","jpg,png");
});
<#var currentDate = DateTimes.getCurrentDate()/>
var designUpload,endUpload,UploadLarge;
var destDir = "/作品库/"+"${typeName}";
var designPath = destDir + "设计文件" + "/" + '${currentDate}';
var pdfPath = destDir + "印刷文件" + "/" + '${currentDate}';
var thumPath = destDir + "缩略图" + "/" + '${currentDate}';
var items;
var uploadEndFile=true;
function initHTML5Uploader()
{
designUpload = new Z.UploadLarge();
designUpload.elem = "FUpload_design";
designUpload.fileMd5Target = 1;
designUpload.fileCopy = true;
designUpload.maxSizeMiB = 150;
designUpload.contextPath = "${context.getContextPath()}";
designUpload.onSelected = function(fileName, fileLength)
{
var ind = fileName.lastIndexOf(".");
if(ind < 0)
{
Z.alert("不合法的文件名格式");
return false;
}
var ext = fileName.substring(fileName.lastIndexOf(".")+1);
var fileFormat = Z("input[name='fileFormat']:checked").val();
if (ext.toUpperCase() != fileFormat)
{
Z.alert("设计文件文件必须是"+fileFormat+"文件");
return false;
}
//设置上传路径
designUpload.setFileDir(designPath);
};
designUpload.onCompleted = function(fileId){
var ajax = new Z.Ajax();
ajax.setClassName("WorksPresenter");
ajax.setMethodName("dotemplateExternalDesignLoad");
ajax.addParam(fileId);
ajax.addParam(${mediaId});
ajax.setFailure(function(){
designUpload.$delete.click();
Z.failure(this.responseText);
});
ajax.setSuccess(function(){
items = this.responseText;
});
ajax.setLoading(document)
ajax.execute();
};
designUpload.execute();
}
function initHTML5Uploader1()
{
upload = new Z.UploadLarge();
upload.elem = "ZUploadmultPreview";
upload.fileMd5Target = 1;
upload.maxSizeMiB = 1;
upload.showResult = false;
upload.fileCopy = true;
upload.multiSelect = true;
upload.dropWrap = "ZUploadLarge"
upload.contextPath = "${context.getContextPath()}";
upload.onPreview = function(fileName,fileLength)
{
var ind;
for (var i in fileName){
ind = fileName[i].name.lastIndexOf(".")
if(ind < 0)
{
Z.alert("不合法的文件名格式");
return false;
}
var ext = fileName[i].name.substring(fileName[i].name.lastIndexOf(".")+1);
if(ext.toUpperCase() != "JPG" && ext.toUpperCase() != "PNG")
{
Z.alert("缩略图文件必须是jpg,png文件");
return false;
}
}
var ajax = new Z.Ajax();
ajax.setSync(false);
ajax.setClassName("WorksPresenter");
ajax.setMethodName("isUploadDesignExternalFile");
ajax.addParam(${mediaId});
ajax.addParam(Z("input[name='fileFormat']:checked").val());
ajax.setFailureAlert();
ajax.setSuccess(function(){
var resp = Z.J.toObject(this.responseText);
if(!Z.T.isNumber(resp)){
uploadEndFile = false;
Z.alert(resp);
}else{
uploadEndFile = true;
items = resp;
}
});
ajax.execute();
//设置上传路径
upload.setFileDir(thumPath);
var classNames = document.getElementsByClassName("Z-UploadLarge-progress-text z-absolute z-w100p z-px10 z-lh16");//innerHTML innerText
for (var i = 0;i < classNames.length;i++){
document.getElementsByClassName("Z-UploadLarge-progress-text z-absolute z-w100p z-px10 z-lh16")[i].innerHTML = "等待上传";
}
};
upload.onCompleted = function(fileId,uploadedList){
var fileIds = "";
for (var i in uploadedList){
fileIds += uploadedList[i].fileId + ",";
}
if(uploadEndFile){
var ajax1 = new Z.Ajax();
ajax1.setClassName("WorksPresenter");
ajax1.setMethodName("doTemplateExternalEndLoad");
ajax1.addParam(fileIds);
ajax1.addParam(items);
ajax1.addParam(thumPath);
ajax1.setFailure(function(){
document.getElementById('ZUploadLarge').innerHTML = "";
Z.failure(this.responseText);
});
ajax1.setSuccess(function(){
Z.success("上传成功", function(){
<#if Validates.isNotEmpty(templateSrc)>
//新建过来的
parent.Z(".z-dialog-shadow").css("display","none");
parent.Z(".z-dialog").css("display","none");
parent.Z("#item_${mediaId}").find("img").click();
<#else>
parent.parent.Z(".z-dialog-shadow").css("display","none");
parent.parent.Z(".z-dialog").css("display","none");
parent.parent.Z("#item_${mediaId}").find("img").click();
</#if>
});
});
ajax1.setLoading(document);
ajax1.execute();
}else{
document.getElementById('ZUploadLarge').innerHTML = "";
}
};
upload.execute();
}
function doUploadmultPreview()
{
upload.upload();
}
function fileTypeSwitcher(fileType){
Z("#FUpload_design").next().attr("accept",fileType);
}
</script>
<div id="uploadDiv"></div>
<table class="z-table z-bordered z-pd10 z-bg-white">
<tr height="80">
<td width="32%" align="center">文件格式(默认CDR):</td>
<td width="68%">
<button type="button" class="z-button z-large zi-bg-white zi-mg-l5" onclick="Z(this).find('zcover>i.z-radio').click()">
<input type="radio" id="cdrFormat" name="fileFormat" class="z-radio" checked data-class="${zmr_color_class}" data-role="z-radio" onclick="Z.E.stop();fileTypeSwitcher('.cdr');" value="CDR">
CDR</button>
<button type="button" class="z-button z-large zi-bg-white zi-mg-l5" onclick="Z(this).find('zcover>i.z-radio').click()">
<input type="radio" id="psdFormat" name="fileFormat" class="z-radio" data-class="${zmr_color_class}" data-role="z-radio" onclick="Z.E.stop();fileTypeSwitcher('.psd');" value="PSD" >
PSD</button>
<button type="button" class="z-button z-large zi-bg-white zi-mg-l5" onclick="Z(this).find('zcover>i.z-radio').click()">
<input type="radio" id="aiFormat" name="fileFormat" class="z-radio" data-class="${zmr_color_class}" data-role="z-radio" onclick="Z.E.stop();fileTypeSwitcher('.ai');" value="AI">
AI</button>
<button type="button" class="z-button z-large zi-bg-white zi-mg-l5" onclick="Z(this).find('zcover>i.z-radio').click()">
<input type="radio" id="rarFormat" name="fileFormat" class="z-radio" data-class="${zmr_color_class}" data-role="z-radio" onclick="Z.E.stop();fileTypeSwitcher('.rar');" value="RAR">
RAR</button>
</td>
</tr>
<tr height="80">
<td width="32%" align="center">设计文件上传:
<div class="z-text-red" style="font-size: 12px;">(最大150MB</div></td>
<td width="68%"><button id="FUpload_design" type="button" class="z-button z-w200 z-blue">文件上传</button></td>
</tr>
<tr height="80">
<td width="32%" align="center">缩略图上传(jpg、png格式):
<div class="z-text-red" style="font-size: 12px;">(最大1MB</div></td>
<td width="68%">
<div id="ZUploadLarge" class="z-pd5 z-mg-t10 z-mg-b10" style="display: block; box-shadow: transparent 0px 0px 1px 0px;"></div>
<button id="ZUploadmultPreview" class="z-button z-blue z-w120">选择文件</button>
<button id="ZUploadmultUpload" class="z-button z-w120" onclick="doUploadmultPreview();">上传文件</button>
</td>
</tr>
</table>
@@ -0,0 +1,57 @@
<script>
function doSelect()
{
var industryId = Z("#parentIndustryId").val();
var industryName = Z("#parentIndustryName").val();
parent.doShowSubIndustry(industryId, industryName);
parent.doShowSubAttribute(industryId, industryName);
parent.Z.Dialog.close();
}
function doSearchIndustry(industryKeywords)
{
var ajax = new Z.Ajax();
ajax.setClassName("WorksPresenter");
ajax.setMethodName("doSearchIndustry");
ajax.addParam("industryKeywords", industryKeywords);
ajax.setFailureAlert();
ajax.setSuccess(function(responseText)
{
Z("#industry").html(responseText);
});
ajax.execute();
}
</script>
<#-- 查询 -->
<form action="industrySelect.htm" method="post">
<div class="z-absolute z-w100p z-h55 z-bg-gray z-pd10" style="top:0;left:0">
<input id="industryKeywords" name="industryKeywords" style="width:250px" class="z-input fi-h35 fi-bd-r-none" placeholder="行业关键字查找" value="${industryKeywords}" maxlength="20" onkeyup="doSearchIndustry(this.value);"><button type="submit" class="z-button z-w60 z-h35 fi-bd-rd0 ${zmr_color_class}"><i class="z-font z-query"></i></button>
</div>
</form>
<#-- 列表 -->
<input type="hidden" id="parentIndustryId" value="">
<input type="hidden" id="parentIndustryName" value="">
<div id="industry">
<div class="z-pd10 z-overflow-auto" style="margin-top:55px;height:285px;">
<table class="z-table z-bordered z-h40 z-bg-white">
<tr class="z-text-center z-h40 z-bg-gray">
<td width="20%">选择</td>
<td class="z-pd6" width="30%">行业名称</td>
</tr>
<#for item : searchIndustryList>
<tr class="z-text-center z-h40">
<td><input type="radio" name="parentIndustry" data-class="${zmr_color_class}" data-role="z-radio" data-class="z-blue" onclick="Z('#parentIndustryId').val(this.value);Z('#parentIndustryName').val('${item.getIndustryName()}')" value="${item.getIndustryId()}"></td>
<td>${item.getIndustryName()}</td>
</tr>
</#for>
</tale>
</div>
<#-- 操作 -->
<div class="z-absolute z-w100p z-h60 z-text-center z-bg-gray z-pd10" style="bottom:0;left:0">
<button type="button" class="z-button z-large z-w120 z-blue" onclick="doSelect();">选择</button>
<button type="button" class="z-button z-large z-w100 z-mg-l10" onclick="parent.Z.Dialog.close(location.hash);">取消</button>
</div>
</div>
@@ -0,0 +1,327 @@
<script>
var sizeMap = new Map();
var typeMap = new Z.HashMap();
Z.onload(function()
{
var data = Z.J.toObject('${sizeMap}');
for(var key in data)
{
sizeMap.set(key, data[key]);
}
Z("#typeData .z-active")[0].click(); //默认触发第一条click
var typeList = Z.J.toObject('${typeList}');
for (var i = 0; i < typeList.length; i++)
{
var type = typeList[i];
typeMap.put(''+type.typeId, type);
}
});
function doSubmitNewMyTemplate()
{
var typeId = Z("#typeId").val();
var type = typeMap.get(typeId);
if (Z.V.isEmpty(typeId) || !type)
{
Z.alert("请选择正确的类型");
return;
}
var width = parseFloat(Z("#width").val() || 0);
var height = parseFloat(Z("#height").val() || 0);
var sizeBleed = parseFloat(Z("#sizeBleed").val() || 0);
var baseWidthMm = type.sizeMWidth;
var baseHeightMm = type.sizeMHeight;
if (width <=0 || height <= 0)
{
Z.alert("请输入设计尺寸");
return;
}
// pvc名片不补位特殊流程
if(typeId == "1806070857392601" || typeId == "1807131630136416"){
if(width == "87" && height == "50"){
baseWidthMm = 90;
baseHeightMm = 53;
sizeBleed = 3;
} else if(width == "85" && height == "54") {
baseWidthMm = 88.5;
baseHeightMm = 57;
width = 85;
height = 53.5;
sizeBleed = 3.5;
} else {
baseWidthMm = 88.5;
baseHeightMm = 57;
sizeBleed = 3.5;
}
}
// 添加 2mm 出血长度
width += sizeBleed;
height += sizeBleed;
if (!type.sizeMWidth || !type.sizeMHeight)
{
Z.alert("模位尺寸不正确,请联系管理员");
return;
}
function getAreaTimes(widthMm, heightMm)
{
var fullWidthMm = baseWidthMm * Math.ceil(widthMm / baseWidthMm);
var fullHeightMm = baseHeightMm * Math.ceil(heightMm / baseHeightMm);
return fullWidthMm * fullHeightMm;
}
// 切换横竖版,减少用纸单位
if (getAreaTimes(height, width) < getAreaTimes(width, height))
{
// width、height 对调
var setWidth = width;
width = height;
height = setWidth;
}
var fullWidth = baseWidthMm * Math.ceil(width / baseWidthMm);
var fullHeight = baseHeightMm * Math.ceil(height / baseHeightMm);
var templateType = Z("#templateType").val();
var oddEven = Z("#oddEven").val();
var pageValue = document.getElementById("pageValues") == null ? Z("#pageValue").val() : document.getElementById("pageValues").value;
var templateName = "";
if(document.getElementById("templateName"))
{
templateName = document.getElementById("templateName").value;
}
//创建新的我的模板
var ajax = new Z.Ajax();
ajax.setClassName("TemplatePresenter");
ajax.setMethodName("doCreateMyTemplate");
ajax.addParam("typeId", typeId);
ajax.addParam("baseWidthMm", baseWidthMm);
ajax.addParam("baseHeightMm", baseHeightMm);
ajax.addParam("width", width);
ajax.addParam("height", height);
ajax.addParam("fullWidth", fullWidth);
ajax.addParam("fullHeight", fullHeight);
ajax.addParam("sizeBleed", sizeBleed);
ajax.addParam("pageValue", pageValue);
ajax.addParam("createMode", 0);
ajax.addParam("isModify", false);
ajax.addParam("createChannel", templateType == 1 ? "out_draft" : "platform_design");
ajax.addParam("oddEven", oddEven);
ajax.addParam("templateName", templateName);
ajax.setFailureAlert();
ajax.setSuccess(function(){
var mediaId = this.responseText;
if(templateType == 2){
var newLink = "/zhiqimMediaEditor/mediaDesign.htm?";
newLink += "mediaId=" + mediaId + "&";
newLink += "designWidth=" + baseWidthMm + "&";
newLink += "designHeight=" + baseHeightMm + "&";
newLink += "bleedSize=" + sizeBleed + "&isTemplateEdit=true";
window.open(newLink);
parent.location.reload();
}else{
window.parent.externalDraftUpload("newTemplate",type.typeName);
parent.Z.Dialog.close();
}
});
ajax.execute();
}
function doSelDesignType(typeId,typeName)
{//选择类型
var list = sizeMap.get("" + typeId) || [];
var html = '';
var typeHtml = '';
var width = 0, height = 0, bleedSize;
for(var i=0; i < list.length;i++)
{
bleedSize = list[i].sizeBleed;
width = list[i].sizeWidth - bleedSize;
height = list[i].sizeHeight - bleedSize;
html += '<button type="button" data-sizeWidth="' + width + '"data-sizeHeight="' + height + '"data-sizeBleed="' + bleedSize;
html += '" class="z-button z-large z-bordered z-blue-bd z-mg-t3 z-mg-r5" onclick="doSelSize(this);">' + width + "X" + height + '</button>';
}
var defaultBleedSize = list[0] ? list[0].sizeBleed : 2;
html += '<button type="button" class="z-button z-large z-bordered z-blue-bd z-mg-t3 z-mg-r5" data-sizeBleed="'+defaultBleedSize+'" onclick="doSelSize(this);">自定义</button>'
if(typeName.indexOf("普通名片") != -1 || typeName.indexOf("代金券") != -1 || typeName.indexOf("彩页") != -1 ){
typeHtml += '<button type="button" data-options="group:templateType" class="z-button z-large z-bordered z-blue-bd z-mg-t3 z-hover z-active" onclick="doType(this,1);">外部稿件</button>'
Z("#templateType").val(1);
}else {
typeHtml += '<button type="button" data-options="group:templateType" class="z-button z-large z-bordered z-blue-bd z-mg-t3 z-hover z-active" onclick="doType(this,1);">外部稿件</button>'
Z("#templateType").val(1);
}
Z("#typeId").val(typeId);
Z("#sizeCont").html(html);
Z("#typeCont").html(typeHtml);
if (typeName.indexOf("画册") != -1) {
var pageValueHtml = "";
pageValueHtml += '<button type="button" class="z-button z-large z-bordered z-blue-bd z-mg-t3 z-mg-r5 z-active" onclick="doSelSize(this);">自定义</button>'
pageValueHtml += '<span><input type="number" id="pageValues" name="pageValues" class="z-input z-w70" value="" class="z-mg-r3" maxlength="3" placeholder="P数" data-options="type:Amount2R;paste:true;"></span>'
Z("#pageValueTd").html(pageValueHtml);
var tb = document.getElementById("templateTable");
var tbody = document.createElement("tbody");
var tr = document.createElement("tr");
var td1 = document.createElement("td");
var td2 = document.createElement("td");
tr.id = "newMyTemplateId";
td2.style.float = "left";
td2.style.paddingLeft = "6px";
td1.innerHTML = "模板版式:";
td2.innerHTML = '<button type="button" data-options="group:oddEven" class="z-button z-large z-bordered z-blue-bd z-mg-t3 z-hover z-active" onclick="doOddEven(this,0);">横版</button>&nbsp;';
td2.innerHTML += '<button type="button" data-options="group:oddEven" class="z-button z-large z-bordered z-blue-bd z-mg-t3 z-hover" onclick="doOddEven(this,1);">竖版</button>';
tr.appendChild(td1);
tr.appendChild(td2);
tbody.append(tr);
tb.appendChild(tbody);
var tr2 = document.createElement("tr");
var td21 = document.createElement("td");
var td22 = document.createElement("td");
tr2.id = "newMyTemplateNameId";
td22.style.float = "left";
td22.style.paddingLeft = "6px";
td21.innerHTML = "模板名称:";
td22.innerHTML = '<span><input id="templateName" name="templateName" type="test" placeholder="模板画册名称" class="z-input z-w300 z-mg-r3" value="" data-options="type:Amount2R;paste:true;"></span>';
tr2.appendChild(td21);
tr2.appendChild(td22);
tbody.append(tr2);
tb.appendChild(tbody);
}else {
var allTemplateTr = document.getElementById("newMyTemplateId");
if (allTemplateTr != null){
var tb = document.getElementById("templateTable");
tb.deleteRow(3);//注意:添加行可能需要修改
tb.deleteRow(3);
}
var pageValueHtml = "";
pageValueHtml += '<button type="button" data-options="group:pageValue" class="z-button z-large z-bordered z-blue-bd z-mg-t3 z-hover" onclick="doPageValues(this,1)">单面</button>&nbsp;';
pageValueHtml += '<button type="button" data-options="group:pageValue" class="z-button z-large z-bordered z-blue-bd z-mg-t3 z-hover z-active" onclick="doPageValues(this,2)">双面</button>';
Z("#pageValueTd").html(pageValueHtml);
}
Z("#sizeCont button")[0].click(); //默认触发第一条click
}
function doPageValues(ele,pageValue){
Z("#pageValue").val(pageValue);
Z(ele).addClass('z-active').siblings("button").removeClass("z-active");
}
function doOddEven(ele,oddEvenId){
Z("#oddEven").val(oddEvenId);
Z(ele).addClass('z-active').siblings("button").removeClass("z-active");
}
function doType(ele,createChannelId) {
Z("#templateType").val(createChannelId);
Z(ele).addClass('z-active').siblings("button").removeClass("z-active");
}
function doSelSize(ele)
{//选择尺寸
Z(ele).addClass('z-active').siblings("button").removeClass("z-active");
Z("#width").val(Z(ele).attr("data-sizeWidth") || "");
Z("#height").val(Z(ele).attr("data-sizeHeight") || "");
Z("#sizeBleed").val(Z(ele).attr("data-sizeBleed") || 2);
}
function diyCardSize()
{
var width = parseFloat(Z("#width").val() || 0);
var height = parseFloat(Z("#height").val() || 0);
var $$btn = Z("#sizeCont button");
var $btnDiy = Z($$btn[$$btn.length-1]);
var flag = false;
if (width > 0 || height > 0)
{
for (var i = 0; i< $$btn.length-1; i++)
{
var btn = $$btn[i];
var sizeWidth = Z(btn).attr("data-sizeWidth");
var sizeHeight = Z(btn).attr("data-sizeHeight");
if (width == sizeWidth && height == sizeHeight)
{
btn.click();
flag = true;
break;
}
}
}
if (!flag)
{
$btnDiy.addClass('z-active').siblings("button").removeClass("z-active");
Z("#sizeBleed").val($btnDiy.attr("data-sizeBleed") || 2);
}
}
</script>
<div class="content">
<form id="theForm" name="theForm" style="overflow: scroll;height:420px;padding-bottom: 20px;">
<input type="hidden" name="mediaId" id="mediaId" value="">
<input type="hidden" name="typeId" id="typeId" value="">
<input type="hidden" name="sizeBleed" id="sizeBleed" value="2">
<input type="hidden" name="pageValue" id="pageValue" value="2">
<input type="hidden" name="templateType" id="templateType" value="2">
<input type="hidden" name="oddEven" id="oddEven" value="0">
<table id="templateTable" class="z-table z-pd6 z-bg-white z-text-center">
<tr class="z-h50">
<td width="100">产品类型:</td>
<td width="*%" align="left" id="typeData">
<#for item : DesignTypeDao.listTemmplate()>
<button type="button" data-options="group:typeId" class="z-button z-large z-bordered z-blue-bd z-mg-t3 z-hover <#if item_index == 0>z-active</#if>" onclick="{Z(this).toggleClass('z-active');doSelDesignType('${item.getTypeId()}','${item.getTypeName()}')};">${item.getTypeName()}</button>
</#for>
</td>
</tr>
<tr class="z-h50">
<td>设计面数:</td>
<td align="left" id="pageValueTd">
<button type="button" data-options="group:pageValue" class="z-button z-large z-bordered z-blue-bd z-mg-t3 z-hover" onclick="{Z(this).toggleClass('z-active');Z('#pageValue').val(1);};">单面</button>
<button type="button" data-options="group:pageValue" class="z-button z-large z-bordered z-blue-bd z-mg-t3 z-hover z-active" onclick="{Z(this).toggleClass('z-active');Z('#pageValue').val(2);};">双面</button>
</td>
</tr>
<tr class="z-h50">
<td>设计尺寸:</td>
<td align="left">
<span class="z-w100p" id="sizeCont">
<button type="button" class="z-button z-large z-bordered z-blue-bd z-mg-t3" onclick="doSelSize(this);">自定义</button>
</span>
<span class="z-w200" >
<input type="text" id="width" name="width" class="z-input z-w70 ${zmr_color_class}" oninput="diyCardSize();" value="" class="z-mg-r3" maxlength="8" placeholder="宽度" data-options="type:Amount2R;paste:true;">&nbsp;X&nbsp;
<input type="text" id="height" name="height" class="z-input z-w70 ${zmr_color_class}" oninput="diyCardSize();" value="" class="z-mg-r3" maxlength="8" placeholder="高度" data-options="type:Amount2R;paste:true;">&nbsp;mm
</span>
</td>
</tr>
</table>
<table class="z-table z-pd6 z-bg-white z-text-center">
<tr class="z-h50">
<td width="100">模板类型:</td>
<td align="left" id="typeCont">
<!--<button type="button" data-options="group:templateType" class="z-button z-large z-bordered z-blue-bd z-mg-t3 z-hover" onclick="{Z(this).toggleClass('z-active');Z('#templateType').val(1);};">外部稿件</button>
<button type="button" data-options="group:templateType" class="z-button z-large z-bordered z-blue-bd z-mg-t3 z-hover z-active" onclick="{Z(this).toggleClass('z-active');Z('#templateType').val(2);};">平台设计</button>-->
</td>
</tr>
</table>
</form>
<div class="z-bg-gray z-absolute z-w100p z-h80 z-text-center z-pd20" style="bottom:0;">
<button type="button" class="z-button z-large z-w100 z-blue" onclick="doSubmitNewMyTemplate();">确定</button>
<button type="button" class="z-button z-large z-w100 z-mg-l10" onclick="parent.Z.Dialog.close();">关闭</button>
</div>
</div>
@@ -0,0 +1,47 @@
<#if pageResult.total() != 0>
<div id="mediaList" class="srcFileList">
<#for item : pageResult.list()>
<#if item_index!=0 && item_index%5==0></div></#if>
<#if item_index%5==0><div class="z-clearfix"></#if>
<div id="item_${item.getMediaId()}" class="item" title="${DesignTypeDao.name(item.getTypeId())}&nbsp;${Global.get(DesignIndustryCache.class).getIndustryName(item.getIndustryId())}&nbsp;${item.getIndustrySubName()}&nbsp;${item.getAttributeName()}&nbsp;${item.getKeywordName()}">
<div class="z-bg-white z-pointer
<#if item.getTemplateType() = 110>bestItem</#if>
<#if item.getTemplateType() = 100>modelItem</#if>
<#if item.getTemplateType() = 80>orderItem</#if>
<#if item.getTemplateType() = 10 || item.getTemplateType() = 20>myItem</#if>
<#if item.getTemplateType() = 0>temporaryItem</#if>
">
<img style="max-width:300px;" src="
<#if Validates.isEmpty(item.getMediaUrl())>/zinc/images/nopic.png
<#else>
<#if media.getMediaUrl().indexOf(",") == -1>
${item.getMediaUrl()}
<#else>
<#for path : Arrays.toStringArray(item.getMediaUrl())>
<#if path_index lt 1>
${path}
</#if>
</#for>
</#if>
</#if>
" onclick="Design.doTemplateShow('${item.getMediaId()}');" />
<span class="allItem-info z-absolute" onclick="Design.doTemplateShow('${item.getMediaId()}');">${item.getMediaId()}</span>
<span class="itemCtrBar z-absolute">
<button class="z-button modelCheckBtn z-small z-blue z-float-left" onclick="<#if item.getTemplateType() == 20>templateConfirmItemAdd<#else>bestConfirmItemAdd</#if>(event, '${item.getMediaId()}', 'yes');"><i class="z-font z-px12 z-success"></i>同意</button>
<button class="z-button modelCheckBtn z-small z-red z-float-right" onclick="<#if item.getTemplateType() == 20>templateCancelItemAdd<#else>bestCancelItemAdd</#if>(event, '${item.getMediaId()}', 'no');"><i class="z-font z-px12 z-error"></i>拒绝</button>
</span>
</div>
</div>
<#if item_index == (pageResult.list().size() - 1)></div></#if>
</#for>
</div>
<div style="width:100%;text-align:center;margin-bottom:35px;">
<table class="z-table z-bordered zi-bd-t-none z-bg-white">
<tr class="z-h50">
<td><div class="z-float-right z-mg-r10">${PagingGo.toHtmlClick(pageResult, "doTemplateSearch")}</div></td>
</tr>
</table>
</div>
<#else>
<div class="z-float-left z-color-gray z-w100p z-text-center z-px20 z-mg-t20">暂无模板信息</div>
</#if>
@@ -0,0 +1,41 @@
<#if pageResult.total() != 0>
<div id="mediaList" class="srcFileList">
<#for item : pageResult.list()>
<#if item_index!=0 && item_index%5==0></div></#if>
<#if item_index%5==0><div class="z-clearfix"></#if>
<div id="item_${item.getMediaId()}" class="item" title="${DesignTypeDao.name(item.getTypeId())}&nbsp;${Global.get(DesignIndustryCache.class).getIndustryName(item.getIndustryId())}&nbsp;${item.getIndustrySubName()}&nbsp;${item.getAttributeName()}&nbsp;${item.getKeywordName()}">
<div class="z-bg-white z-pointer
<#if item.getTemplateType() = 100>modelItem</#if>
<#if item.getTemplateType() = 110>bestItem</#if>
">
<img style="max-width:300px;" src="
<#if Validates.isEmpty(item.getMediaUrl())>/zinc/images/nopic.png
<#else>
<#if media.getMediaUrl().indexOf(",") == -1>
${item.getMediaUrl()}
<#else>
<#for path : Arrays.toStringArray(item.getMediaUrl())>
<#if path_index lt 1>
${path}
</#if>
</#for>
</#if>
</#if>
" onclick="Design.doTemplateShow('${item.getMediaId()}');" />
<span class="allItem-info z-absolute" onclick="Design.doTemplateShow('${item.getMediaId()}');">${item.getMediaId()}</span>
</div>
</div>
<#if item_index == (pageResult.list().size() - 1)></div></#if>
</#for>
</div>
<div style="width:100%;text-align:center;margin-bottom:35px;">
<table class="z-table z-bordered zi-bd-t-none z-bg-white">
<tr class="z-h50">
<td><div class="z-float-right z-mg-r10">${PagingGo.toHtmlClick(pageResult, "doSearchAjax")}</div></td>
</tr>
</table>
</div>
<#else>
<div class="z-float-left z-color-gray z-w100p z-text-center z-px20 z-mg-t20">暂无模板信息,请重新搜索</div>
</#if>
@@ -0,0 +1,28 @@
<#if pageResult.total() != 0>
<div id="mediaList" class="srcFileList">
<#for item : pageResult.list()>
<#if item_index!=0 && item_index%5==0></div></#if>
<#if item_index%5==0><div class="z-clearfix"></#if>
<div id="item_${item.getMediaId()}" class="item">
<div class="z-bg-white z-pointer
<#if item.getTemplateType() = 80>orderItem</#if>
<#if item.getTemplateType() = 0>temporaryItem</#if>
">
<img style="max-width:300px;" src="<#if Validates.isEmpty(item.getMediaUrl())>/zinc/images/nopic.png<#else>${item.getMediaUrl()}</#if>" onclick="Design.doTemplateShow('${item.getMediaId()}');"/>
<span class="allItem-info z-absolute" onclick="Design.doTemplateShow('${item.getMediaId()}');">${item.getDesignId()}</span>
</div>
</div>
<#if item_index == (pageResult.list().size() - 1)></div></#if>
</#for>
</div>
<div style="width:100%;text-align:center;margin-bottom:35px;">
<table class="z-table z-bordered zi-bd-t-none z-bg-white">
<tr class="z-h50">
<td><div class="z-float-right z-mg-r10">${PagingGo.toHtmlClick(pageResult, "doTemplateSearch")}</div></td>
</tr>
</table>
</div>
<#else>
<div class="z-float-left z-color-gray z-w100p z-text-center z-px20 z-mg-t20">暂无模板信息</div>
</#if>
@@ -0,0 +1,46 @@
<#include "/ztmpl/zhiqim_manager/"+themeMain+"/define.htm"/>
<input id="creater" type="hidden" value="${creater}">
<input id="productTypeId" type="hidden" value="${productTypeId}">
<#-- 列表 -->
<table class="z-table z-bordered z-h40-tr z-pd5 z-bg-white z-text-center" style="height:auto;">
<tr bgcolor="${zmr_thead_bgcolor}">
<td width="140">订单号</td>
<td width="100">订单类型</td>
<td width="150">所属组织</td>
<td width="130">旺旺号</td>
<td width="120">店铺</td>
<td width="110">设计师</td>
<td width="90">录单时间</td>
<td width="110">倒计时</td>
<td width="90">领单时间</td>
<td width="110">订单状态</td>
<td width="160">进度备注</td>
<td width="*" style="min-width:220px">产品</td>
<td width="80">订单金额</td>
</tr>
${zhiqim_manager_tr_no_record(pageResult, 12, "暂时没有滞留单")}
<#for item : pageResult.list()>
<#var isCountDown=CalculationUtil.retentDealCountDownCal(request,item.getDesignId())/>
<input id="buyerNick_${item.getDesignId()}" type="hidden" value="${item.getBuyerNick()}">
<input id="userQq_${item.getDesignId()}" type="hidden" value="${item.getUserQq()}">
<tr class="z-pointer <#if isCountDown == "">z-text-red</#if>" ${zhiqim_manager_tr_onmouse()} ${zhiqim_manager_tr_click_radio()}>
<td>${item.getDesignId()}</td>
<td>${DraftConstants.get(item.getDraftType())}</td>
<td>${ZmrOrgDao.getOrgName(request,item.getOrgId())}</td>
<td>${item.getBuyerNick()}</td>
<td>${item.getShopNick()}</td>
<td>${item.getDesigner()}</td>
<td>${Sqls.toDateTimeString(item.getCreateTime())}</td>
<td>
<#var effectiveTime = typeMap.get(item.getTypeId()).getEffectiveTime()/>
<span id="time_${item.getDesignId()}" data-effectiveTime="${effectiveTime}" data-createTime="${item.getCreateTime()}"></span>
</td>
<td>${Sqls.toDateTimeString(item.getDesignReceiveTime())}</td>
<td>${StatusConstants.getStatus(item.getStatus())}</td>
<td>${progressNoteMap.get(item.getDesignId())}</td>
<td>${item.getOrderText()}</td>
<td>${Amounts.toYuanMustRadix(item.getAmount())}</td>
</tr>
</#for>
</table>
${zhiqim_manager_paging_jsMethod(pageResult, "doQueryRetentionDealOrder")}
@@ -0,0 +1,44 @@
<#if pageResult.total() != 0>
<div id="mediaList" class="srcFileList">
<#for item : pageResult.list()>
<#if item_index!=0 && item_index%5==0></div></#if>
<#if item_index%5==0><div class="z-clearfix"></#if>
<div id="item_${item.getMediaId()}" class="item" title="${DesignTypeDao.name(item.getTypeId())}&nbsp;${Global.get(DesignIndustryCache.class).getIndustryName(item.getIndustryId())}&nbsp;${item.getIndustrySubName()}&nbsp;${item.getAttributeName()}&nbsp;${item.getKeywordName()}">
<div class="z-bg-white z-pointer
<#if item.getTemplateType() = 110>bestItem</#if>
<#if item.getTemplateType() = 100>modelItem</#if>
<#if item.getTemplateType() = 80>orderItem</#if>
<#if item.getTemplateType() = 10 || item.getTemplateType() = 20>myItem</#if>
<#if item.getTemplateType() = 0>temporaryItem</#if>
">
<img style="max-width:300px;" src="
<#if Validates.isEmpty(item.getMediaUrl())>/zinc/images/nopic.png
<#else>
<#if media.getMediaUrl().indexOf(",") == -1>
${item.getMediaUrl()}
<#else>
<#for path : Arrays.toStringArray(item.getMediaUrl())>
<#if path_index lt 1>
${path}
</#if>
</#for>
</#if>
</#if>
" onclick="Design.doTemplateShow('${item.getMediaId()}','${urlParam}');" />
<span class="allItem-info z-absolute" onclick="Design.doTemplateShow('${item.getMediaId()}','${urlParam}');">${item.getMediaId()}</span>
</div>
</div>
<#if item_index == (pageResult.list().size() - 1)></div></#if>
</#for>
</div>
<div style="width:100%;text-align:center;margin-bottom:35px;">
<table class="z-table z-bordered zi-bd-t-none z-bg-white">
<tr class="z-h50">
<td><div class="z-float-right z-mg-r10">${PagingGo.toHtmlClick(pageResult, "doTemplateSearch")}</div></td>
</tr>
</table>
</div>
<#else>
<div class="z-float-left z-color-gray z-w100p z-text-center z-px20 z-mg-t20">暂无模板信息,请重新搜索</div>
</#if>
@@ -0,0 +1,139 @@
<#def designatedPath="/allTemplate.htm"/>
<script>
Z.onload(function()
{//定义搜索框
doTemplateSearch("1");
})
function doTemplateSearch(page)
{
var templateType = Z("#searchTemplateType").val();
if(!templateType){
templateType = 20;
}
var ajax = new Z.Ajax();
ajax.setClassName("TemplatePresenter");
ajax.setMethodName("doTemplateAuditSearch");
ajax.addParam("page", page);
ajax.addParam("urlParam", "AUDIT");
ajax.addParam("typeId", Z("#typeId").val());
ajax.addParam("industryId", Z("#industryId").val());
ajax.addParam("templateType", templateType);
ajax.setCallback("resultWrap");
ajax.setLoading("resultWrap");
ajax.execute();
}
function bestConfirmItemAdd(e, value, type)
{//确认
Z.E.forbidden(e);
var ajax = new Z.Ajax();
ajax.setClassName("TemplatePresenter");
ajax.setMethodName("doTemplateBestAudit");
ajax.addParam(value)
ajax.addParam(type);
ajax.setFailureAlert();
ajax.setSuccess(function(){doTemplateSearch("1");});
ajax.execute();
}
function templateConfirmItemAdd(e, value, type)
{//确认
Z.E.forbidden(e);
var ajax = new Z.Ajax();
ajax.setClassName("TemplatePresenter");
ajax.setMethodName("doTemplateAudit");
ajax.addParam(value)
ajax.addParam(type);
ajax.setFailureAlert();
ajax.setSuccess(function(){ doTemplateSearch("1");});
ajax.execute();
}
function bestCancelItemAdd(e, value, type)
{//取消
Z.E.forbidden(e);
var ajax = new Z.Ajax();
ajax.setClassName("TemplatePresenter");
ajax.setMethodName("doTemplateBestAudit");
ajax.addParam(value)
ajax.addParam(type);
ajax.setFailureAlert();
ajax.setSuccess(function(){doTemplateSearch("1");});
ajax.execute();
}
function templateCancelItemAdd(e, value, type)
{//取消
Z.E.forbidden(e);
var ajax = new Z.Ajax();
ajax.setClassName("TemplatePresenter");
ajax.setMethodName("doTemplateAudit");
ajax.addParam(value)
ajax.addParam(type);
ajax.setFailureAlert();
ajax.setSuccess(function(){doTemplateSearch("1");});
ajax.execute();
}
</script>
${Styles.src("/zinc/css/design_2018102301.css")}
${Scripts.src("/zinc/js/design_2018102301.js")}
${zhiqim_manager_breadcrumb_parent("/templateMy.htm", "我的模板", "模板审核")}
${zhiqim_manager_content()}
<#-- 导航栏 -->
<div class="z-tabnav-main z-blue z-mg-b20">
<nav>
<ul>
<li onclick="Z.Location.href('templateDraftMy.htm');">我的订单草稿</li>
<li onclick="Z.Location.href('templateOrderMy.htm');">我的订单模板</li>
<li onclick="Z.Location.href('templateMy.htm');">我的模板</li>
<li onclick="Z.Location.href('templateCollect.htm');">我收藏的</li>
<li onclick="Z.Location.href('templateShare.htm');">分享给我的</li>
<li onclick="Z.Location.href('allTemplate.htm');">所有模板</li>
<!-- <li onclick="Z.Location.href('bestTemplate.htm');">精品模板</li> -->
<#if ZmrPathRule.check(request, "/templateAudit.htm")><li class="z-active">模板审核</li></#if>
<!-- <#if ZmrPathRule.check(request, "/templateBestAudit.htm")><li onclick="Z.Location.href('templateBestAudit.htm');">精品审核</li></#if> -->
<#if ZmrPathRule.check(request, "/desTemplateLogList.htm")><li onclick="Z.Location.href('desTemplateLogList.htm');">模版日志</li></#if>
</ul>
</nav>
</div>
<table class="z-table z-bordered z-pd6">
<input type="hidden" id="typeId" name="typeId" value="">
<input type="hidden" id="industryId" name="industryId" value="">
<input type="hidden" id="searchTemplateType" name="searchTemplateType" value="">
<tr class="z-h40" bgcolor="${oddColor}">
<td width="5%">类型:${typeId}</td>
<td width="*">
<button type="button" data-options="group:typeId" class="z-button z-large z-bordered z-blue-bd z-hover <#if typeId == -1 || Validates.isEmpty(typeId)>z-active</#if>" onclick="{Z(this).toggleClass('z-active');Z('#typeId').val('');};doTemplateSearch('1');">全部</button>
<#for item : DesignTypeDao.list()>
<button type="button" data-options="group:typeId" class="z-button z-large z-bordered z-blue-bd z-hover z-mg-t3 <#if item.getTypeId() == typeId>z-active</#if>" onclick="{Z(this).toggleClass('z-active');Z('#typeId').val(${item.getTypeId()});};doTemplateSearch('1');">${item.getTypeName()}</button>
</#for>
</td>
</tr>
<tr class="z-h40" bgcolor="#FFFFFF">
<td>行业:</td>
<td>
<button type="button" data-options="group:industryId" class="z-button z-large z-bordered z-blue-bd z-hover <#if industryId == -1 || Validates.isEmpty(industryId)>z-active</#if>" onclick="{Z(this).toggleClass('z-active');Z('#industryId').val('');};doTemplateSearch('1');">全部</button>
<#for item : Global.get(DesignIndustryCache.class).getIndustryList()>
<button type="button" data-options="group:industryId" class="z-button z-large z-bordered z-blue-bd z-hover z-mg-t3 <#if item.getIndustryId() == industryId>z-active</#if>" onclick="{Z(this).toggleClass('z-active');Z('#industryId').val(${item.getIndustryId()});};doTemplateSearch('1');">${item.getIndustryName()}</button>
</#for>
</td>
</tr>
<tr class="z-h40" bgcolor="#FFFFFF">
<td>审核类型:</td>
<td>
<button type="button" data-options="group:searchTemplateType" class="z-button z-large z-bordered z-blue-bd z-hover z-active" onclick="{Z(this).toggleClass('z-active');Z('#searchTemplateType').val(20);};doTemplateSearch('1');">普通审核</button>
<button type="button" data-options="group:searchTemplateType" class="z-button z-large z-bordered z-blue-bd z-hover z-mg-t3" onclick="{Z(this).toggleClass('z-active');Z('#searchTemplateType').val(100);};doTemplateSearch('1');">精品审核</button>
</td>
</tr>
</table>
<div id="resultWrap"></div>
${zhiqim_manager_content_end()}
@@ -0,0 +1,98 @@
<#def designatedPath="/allTemplate.htm"/>
<script>
Z.onload(function()
{//定义搜索框
doTemplateSearch("1");
})
function doTemplateSearch(page)
{
var ajax = new Z.Ajax();
ajax.setClassName("TemplatePresenter");
ajax.setMethodName("doTemplateAuditSearch");
ajax.addParam("page", page);
ajax.addParam("urlParam", "BEST_AUDIT");
ajax.addParam("typeId", Z("#typeId").val());
ajax.addParam("industryId", Z("#industryId").val());
ajax.setCallback("resultWrap");
ajax.setLoading("resultWrap");
ajax.execute();
}
function confirmItemAdd(e, value, type)
{//确认
Z.E.forbidden(e);
var ajax = new Z.Ajax();
ajax.setClassName("TemplatePresenter");
ajax.setMethodName("doTemplateBestAudit");
ajax.addParam(value)
ajax.addParam(type);
ajax.setFailureAlert();
ajax.setSuccess(function(){doTemplateSearch("1");});
ajax.execute();
}
function cancelItemAdd(e, value, type)
{//取消
Z.E.forbidden(e);
var ajax = new Z.Ajax();
ajax.setClassName("TemplatePresenter");
ajax.setMethodName("doTemplateBestAudit");
ajax.addParam(value)
ajax.addParam(type);
ajax.setFailureAlert();
ajax.setSuccess(function(){doTemplateSearch("1");});
ajax.execute();
}
</script>
${Styles.src("/zinc/css/design_2018102301.css")}
${Scripts.src("/zinc/js/design_2018102301.js")}
${zhiqim_manager_breadcrumb_parent("/templateMy.htm", "我的模板", "精品审核")}
${zhiqim_manager_content()}
<#-- 导航栏 -->
<div class="z-tabnav-main z-blue z-mg-b20">
<nav>
<ul>
<li onclick="Z.Location.href('templateDraftMy.htm');">我的订单草稿</li>
<li onclick="Z.Location.href('templateOrderMy.htm');">我的订单模板</li>
<li onclick="Z.Location.href('templateMy.htm');">我的模板</li>
<li onclick="Z.Location.href('templateCollect.htm');">我收藏的</li>
<li onclick="Z.Location.href('templateShare.htm');">分享给我的</li>
<li onclick="Z.Location.href('allTemplate.htm');">所有模板</li>
<li onclick="Z.Location.href('bestTemplate.htm');">精品模板</li>
<#if ZmrPathRule.check(request, "/templateAudit.htm")><li onclick="Z.Location.href('templateAudit.htm');">模板审核</li></#if>
<#if ZmrPathRule.check(request, "/templateBestAudit.htm")><li class="z-active">精品审核</li></#if>
<#if ZmrPathRule.check(request, "/desTemplateLogList.htm")><li onclick="Z.Location.href('desTemplateLogList.htm');">模版日志</li></#if>
</ul>
</nav>
</div>
<table class="z-table z-bordered z-pd6">
<input type="hidden" id="typeId" name="typeId" value="">
<input type="hidden" id="industryId" name="industryId" value="">
<tr class="z-h40" bgcolor="${oddColor}">
<td width="5%">类型:</td>
<td width="*">
<button type="button" data-options="group:typeId" class="z-button z-large z-bordered z-blue-bd z-hover <#if typeId == -1 || Validates.isEmpty(typeId)>z-active</#if>" onclick="{Z(this).toggleClass('z-active');Z('#typeId').val('');};doTemplateSearch('1');">全部</button>
<#for item : DesignTypeDao.list()>
<button type="button" data-options="group:typeId" class="z-button z-large z-bordered z-blue-bd z-hover z-mg-t3 <#if item.getTypeId() == typeId>z-active</#if>" onclick="{Z(this).toggleClass('z-active');Z('#typeId').val(${item.getTypeId()});};doTemplateSearch('1');">${item.getTypeName()}</button>
</#for>
</td>
</tr>
<tr class="z-h40" bgcolor="#FFFFFF">
<td>行业:</td>
<td>
<button type="button" data-options="group:industryId" class="z-button z-large z-bordered z-blue-bd z-hover <#if industryId == -1 || Validates.isEmpty(industryId)>z-active</#if>" onclick="{Z(this).toggleClass('z-active');Z('#industryId').val('');};doTemplateSearch('1');">全部</button>
<#for item : Global.get(DesignIndustryCache.class).getIndustryList()>
<button type="button" data-options="group:industryId" class="z-button z-large z-bordered z-blue-bd z-hover z-mg-t3 <#if item.getIndustryId() == industryId>z-active</#if>" onclick="{Z(this).toggleClass('z-active');Z('#industryId').val(${item.getIndustryId()});};doTemplateSearch('1');">${item.getIndustryName()}</button>
</#for>
</td>
</tr>
</table>
<div id="resultWrap"></div>
${zhiqim_manager_content_end()}
@@ -0,0 +1,73 @@
<#def designatedPath="/allTemplate.htm"/>
<script>
<!--
Z.onload(function()
{
doTemplateSearch("1");
})
function doTemplateSearch(page)
{
var ajax = new Z.Ajax();
ajax.setClassName("TemplatePresenter");
ajax.setMethodName("doTemplateSearch");
ajax.addParam("page", page);
ajax.addParam("urlParam", "COLLECT");
ajax.addParam("typeId", Z("#typeId").val());
ajax.addParam("industryId", Z("#industryId").val());
ajax.setCallback("resultWrap");
ajax.setLoading("resultWrap");
ajax.execute();
}
-->
</script>
${Styles.src("/zinc/css/design_2018102301.css")}
${Scripts.src("/zinc/js/design_2018102301.js")}
${zhiqim_manager_breadcrumb("我的模板")}
${zhiqim_manager_content()}
<#-- 导航栏 -->
<div class="z-tabnav-main z-blue z-mg-b20">
<nav>
<ul>
<li onclick="Z.Location.href('templateDraftMy.htm');">我的订单草稿</li>
<li onclick="Z.Location.href('templateOrderMy.htm');">我的订单模板</li>
<li onclick="Z.Location.href('templateMy.htm');">我的模板</li>
<li class="z-active">我收藏的</li>
<li onclick="Z.Location.href('templateShare.htm');">分享给我的</li>
<li onclick="Z.Location.href('allTemplate.htm');">所有模板</li>
<!-- <li onclick="Z.Location.href('bestTemplate.htm');">精品模板</li> -->
<#if ZmrPathRule.check(request, "/templateAudit.htm")><li onclick="Z.Location.href('templateAudit.htm');">模板审核</li></#if>
<!-- <#if ZmrPathRule.check(request, "/templateBestAudit.htm")><li onclick="Z.Location.href('templateBestAudit.htm');">精品审核</li></#if> -->
<#if ZmrPathRule.check(request, "/desTemplateLogList.htm")><li onclick="Z.Location.href('desTemplateLogList.htm');">模版日志</li></#if>
</ul>
</nav>
</div>
<table class="z-table z-bordered z-pd6">
<input type="hidden" id="typeId" name="typeId" value="">
<input type="hidden" id="industryId" name="industryId" value="">
<tr class="z-h40" bgcolor="${oddColor}">
<td width="5%">类型:${typeId}</td>
<td width="*">
<button type="button" data-options="group:typeId" class="z-button z-large z-bordered z-blue-bd z-hover <#if typeId == -1 || Validates.isEmpty(typeId)>z-active</#if>" onclick="{Z(this).toggleClass('z-active');Z('#typeId').val('');};doTemplateSearch('1');">全部</button>
<#for item : DesignTypeDao.listTemmplate()>
<button type="button" data-options="group:typeId" class="z-button z-large z-bordered z-blue-bd z-hover z-mg-t3 <#if item.getTypeId() == typeId>z-active</#if>" onclick="{Z(this).toggleClass('z-active');Z('#typeId').val(${item.getTypeId()});};doTemplateSearch('1');">${item.getTypeName()}</button>
</#for>
</td>
</tr>
<tr class="z-h40" bgcolor="#FFFFFF">
<td>行业:</td>
<td>
<button type="button" data-options="group:industryId" class="z-button z-large z-bordered z-blue-bd z-hover <#if industryId == -1 || Validates.isEmpty(industryId)>z-active</#if>" onclick="{Z(this).toggleClass('z-active');Z('#industryId').val('');};doTemplateSearch('1');">全部</button>
<#for item : Global.get(DesignIndustryCache.class).getIndustryList()>
<button type="button" data-options="group:industryId" class="z-button z-large z-bordered z-blue-bd z-hover z-mg-t3 <#if item.getIndustryId() == industryId>z-active</#if>" onclick="{Z(this).toggleClass('z-active');Z('#industryId').val(${item.getIndustryId()});};doTemplateSearch('1');">${item.getIndustryName()}</button>
</#for>
</td>
</tr>
</table>
<div id="resultWrap"></div>
${zhiqim_manager_content_end()}
@@ -0,0 +1,82 @@
<#def designatedPath="/allTemplate.htm"/>
<script>
<!--
Z.onload(function()
{//定义搜索框
doTemplateSearch("1");
})
function doTemplateSearch(page)
{
var ajax = new Z.Ajax();
ajax.setClassName("TemplatePresenter");
ajax.setMethodName("doSearchOrderTemplate");
ajax.addParam("page", page);
ajax.addParam("urlParam", "DRAFT");
ajax.addParam("typeId", Z("#typeId").val());
ajax.addParam("industryId", Z("#industryId").val());
ajax.addParam("q", Z("#q").val());
ajax.setCallback("resultWrap");
ajax.setLoading("resultWrap");
ajax.execute();
}
-->
</script>
${Styles.src("/zinc/css/design_2018102301.css")}
${Scripts.src("/zinc/js/design_2018102301.js")}
${zhiqim_manager_breadcrumb_parent("/templateMy.htm", "我的模板", " 我的订单草稿")}
${zhiqim_manager_content()}
<#-- 导航栏 -->
<div class="z-tabnav-main z-blue z-mg-b20">
<nav>
<ul>
<li class="z-active">我的订单草稿</li>
<li onclick="Z.Location.href('templateOrderMy.htm');">我的订单模板</li>
<li onclick="Z.Location.href('templateMy.htm');">我的模板</li>
<li onclick="Z.Location.href('templateCollect.htm');">我收藏的</li>
<li onclick="Z.Location.href('templateShare.htm');">分享给我的</li>
<li onclick="Z.Location.href('allTemplate.htm');">所有模板</li>
<!-- <li onclick="Z.Location.href('bestTemplate.htm');">精品模板</li> -->
<#if ZmrPathRule.check(request, "/templateAudit.htm")><li onclick="Z.Location.href('templateAudit.htm');">模板审核</li></#if>
<!-- <#if ZmrPathRule.check(request, "/templateBestAudit.htm")><li onclick="Z.Location.href('templateBestAudit.htm');">精品审核</li></#if> -->
<#if ZmrPathRule.check(request, "/desTemplateLogList.htm")><li onclick="Z.Location.href('desTemplateLogList.htm');">模版日志</li></#if>
</ul>
</nav>
</div>
<#-- 订单搜索 -->
<div class="z-mg-t20 z-h1 z-text-center">
<input type="hidden" id="typeId" name="typeId" value="">
<input type="hidden" id="industryId" name="industryId" value="">
<span style="float:center;">
<input id="q" class="z-input z-w400 zi-h40 zi-bd-r-none" placeholder="请输入订单号" value="" maxlength="60"><button type="button" class="z-button z-w70 z-h40 zi-bd-rd0 z-blue" onclick="doTemplateSearch('1')"><i class="z-font z-query"></i>查询</button>
</span>
</div>
<table class="z-table z-bordered z-pd6">
<tr class="z-h40" bgcolor="${oddColor}">
<td width="5%">类型:</td>
<td width="*">
<button type="button" data-options="group:typeId" class="z-button z-large z-bordered z-blue-bd z-hover <#if typeId == -1 || Validates.isEmpty(typeId)>z-active</#if>" onclick="{Z(this).toggleClass('z-active');Z('#typeId').val('');};doTemplateSearch('1');">全部</button>
<#for item : DesignTypeDao.list()>
<button type="button" data-options="group:typeId" class="z-button z-large z-bordered z-blue-bd z-hover z-mg-t3 <#if item.getTypeId() == typeId>z-active</#if>" onclick="{Z(this).toggleClass('z-active');Z('#typeId').val(${item.getTypeId()});};doTemplateSearch('1');">${item.getTypeName()}</button>
</#for>
</td>
</tr>
<tr class="z-h40" bgcolor="#FFFFFF">
<td>行业:</td>
<td>
<button type="button" data-options="group:industryId" class="z-button z-large z-bordered z-blue-bd z-hover <#if industryId == -1 || Validates.isEmpty(industryId)>z-active</#if>" onclick="{Z(this).toggleClass('z-active');Z('#industryId').val('');};doTemplateSearch('1');">全部</button>
<#for item : Global.get(DesignIndustryCache.class).getIndustryList()>
<button type="button" data-options="group:industryId" class="z-button z-large z-bordered z-blue-bd z-hover z-mg-t3 <#if item.getIndustryId() == industryId>z-active</#if>" onclick="{Z(this).toggleClass('z-active');Z('#industryId').val(${item.getIndustryId()});};doTemplateSearch('1');">${item.getIndustryName()}</button>
</#for>
</td>
</tr>
</table>
<div id="resultWrap"></div>
${zhiqim_manager_content_end()}
@@ -0,0 +1,207 @@
<script>
//所有子行业 map 根据 行业 分组
var subIndustryMap = new Z.HashMap();
<#for key : subIndustryMap.keySet()>
subIndustryMap.put('${key}', ${Jsons.toString(subIndustryMap.get(key))});
</#for>
//所有属性分类 map 根据 行业 分组
var attributeCatMap = new Z.HashMap();
<#for key : attributeCatMap.keySet()>
attributeCatMap.put('${key}', ${Jsons.toString(attributeCatMap.get(key))});
</#for>
//所有属性分类 map 根据 分类 分组
var attributeMap = new Z.HashMap();
<#for key : attributeMap.keySet()>
attributeMap.put('${key}', ${Jsons.toString(attributeMap.get(key))});
</#for>
var indIdarr = Z.AR.toArray("${indIdarr}", ",");
var attrIdarr = Z.AR.toArray("${attrIdarr}", ",");
function doLabelIdSet(type, attaid, btn)
{
if (type == "industry")
{
if(Z.AR.contains(indIdarr, attaid))
{
Z.AR.remove(indIdarr, attaid);
Z(btn).removeClass("z-active");
}
else
{
indIdarr.push(attaid);
Z(btn).addClass("z-active");
}
}
else if (type == "attribute")
{
if (Z.AR.contains(attrIdarr, attaid))
{
Z.AR.remove(attrIdarr, attaid);
Z(btn).removeClass("z-active");
}
else
{
attrIdarr.push(attaid);
Z(btn).addClass("z-active");
}
}
}
function doIndustrySelect()
{//选择行业
var dialog = new Z.Dialog();
dialog.title = "选择行业";
dialog.url = "industrySelect.htm" ;
dialog.width = 360;
dialog.height = 400;
dialog.fixed = true;
dialog.scroll = true;
dialog.execute();
}
var nativeIndustryId = '${template.getIndustryId()}';
var nativeindIdarr = Z.AR.toArray("${indIdarr}", ",");
var nativeattrIdarr = Z.AR.toArray("${attrIdarr}", ",");
var selectIndustryId = nativeIndustryId;
function doShowSubIndustry(industryId, industryName)
{//显示子行业 industryId 父行业ID ,industryName父行业名
Z("#industryId").val(industryName);
selectIndustryId = industryId;
//清空选中信息
indIdarr = [];
var subArr = subIndustryMap.get(""+industryId);
var subListHtml = "";
if(subArr != null && typeof(subArr) != "undefined" && subArr.length > 0)
{
Z.each(subArr, function(sub, i){
var active = "";
if(industryId == nativeIndustryId && Z.AR.contains(nativeindIdarr, ""+sub.industrySubId))
{//如果切换回来 保存原来的选择
active = "z-active";
indIdarr.push(""+sub.industrySubId);
}
subListHtml += '<button name="subName" id="sub_'+sub.industrySubId+'" type="button" class="z-button z-large z-bordered z-blue-bd z-mg-r6 z-mg-t6 z-hover '+active+'" onclick="doLabelIdSet(\'industry\', \''+sub.industrySubId+'\',this)">'+sub.industrySubName+'</button>';
});
}
Z("#subList").html(subListHtml);
}
function doShowSubAttribute(industryId, industryName)
{//显示 行业 关联标签属性
var attributeInfoHtml = "";
//获取行业对应的所有分类
var catList = attributeCatMap.get(""+industryId);
//清空属性选中信息
attrIdarr = [];
if (typeof(catList) != "undefined" && catList.hasOwnProperty("length") && catList.length > 0)
{
attributeInfoHtml += '<table class="z-table z-bordered z-pd6">';
Z.each(catList, function(cat, i){
var trColor = (i%2 == 0) ? "#f3fdfc" : "";
attributeInfoHtml += '<tr class="z-h40" bgcolor="'+trColor+'">';
attributeInfoHtml += '<td width="10%">'+cat.attributeCatName+'</td>';
attributeInfoHtml += '<td width="*">';
//获取 行业下分类 下的 属性
var attributeList = attributeMap.get(""+cat.attributeCatId);
if (typeof(attributeList) != "undefined" && attributeList != null && attributeList.hasOwnProperty("length") && attributeList.length > 0)
{
Z.each(attributeList, function(attr, j){
var active = "";
if(industryId == nativeIndustryId && Z.AR.contains(nativeattrIdarr, ""+attr.attributeId))
{//如果切换回来 保存原来的选择
active = "z-active";
attrIdarr.push(""+attr.attributeId);
}
attributeInfoHtml += '<button name="attrId" id="sub_'+attr.attributeId+'" type="button" class="z-button z-large z-bordered z-blue-bd z-mg-r6 z-mg-t6 z-hover '+active+'" onclick="doLabelIdSet(\'attribute\', \''+attr.attributeId+'\',this)">'+attr.attributeName+'</button>';
});
}
attributeInfoHtml += '</td>';
attributeInfoHtml += '</tr>';
});
attributeInfoHtml += '</table>';
}
Z("#attributeInfo").html(attributeInfoHtml);
}
function doTemplateLabelExec()
{//提交关联操作
if (indIdarr.length == 0)
{
Z.alert("请选择一个或多个子行业");
return;
}
if (attrIdarr.length == 0)
{
Z.alert("请选择 一个或多个属性");
return;
}
var ajax = new Z.Ajax();
ajax.setClassName("LabelPresenter");
ajax.setMethodName("doTemplateLabelRelation");
ajax.addParam("mediaId", '${template.getMediaId()}');
ajax.addParam("industryId", selectIndustryId);
ajax.addParam("industrySubIds", Z.AR.toString(indIdarr, ","));
ajax.addParam("attributeIds", Z.AR.toString(attrIdarr, ","));
ajax.setFailureAlert();
ajax.setSuccess(function(){
Z.success("关联成功", function(){parent.location.reload();})
});
ajax.execute();
}
</script>
<div class="z-w100p z-overflow-x-hidden z-overflow-y-scroll" style="height:516px" >
<table class="z-table z-bordered z-pd6">
<tr class="z-h40" bgcolor="${oddColor}">
<td width="10%" >产品类型:</td>
<td width="*"> ${DesignTypeDao.name(template.getTypeId())}</td>
</tr>
<tr class="z-h40" bgcolor="#FFFFFF">
<td>行业:</td>
<td><input name="industryId" id="industryId" class="z-input zi-bd-none zi-shadow-none z-blue z-w120 " type="text" value="${Global.get(DesignIndustryCache.class).getIndustryName(template.getIndustryId())}" readonly>&nbsp;&nbsp;<button class="z-button z-blue" onclick="doIndustrySelect();">修改行业</button></td>
</tr>
<tr class="z-h40" bgcolor="${oddColor}">
<td>子行业:</td>
<td id="subList">
<#for item : inSubList>
<button name="subName" id="sub_${item.getIndustrySubId()}" type="button" class="z-button z-large z-bordered z-mg-r6 z-mg-t6 z-blue-bd z-hover <#if subsList.contains(item.getIndustrySubId()+"")>z-active</#if>" onclick="doLabelIdSet('industry', '${item.getIndustrySubId()}',this)">${item.getIndustrySubName()}</button>
</#for>
</td>
</tr>
</table><br>
${zhiqim_manager_title("关联属性")}
<div id ="attributeInfo">
<table class="z-table z-bordered z-pd6">
<#for item : attrCatList>
<tr class="z-h40" bgcolor="<#if (item_index%2)==0>${oddColor}</#if>">
<td width="10%">${item.getAttributeCatName()}</td>
<td width="*">
<#for aitem : map.get(item.getAttributeCatId())>
<button name="attrId" id="sub_${aitem.getAttributeId()}" type="button" class="z-button z-large z-mg-r6 z-mg-t6 z-bordered z-blue-bd z-hover <#if attrList.contains(aitem.getAttributeId()+"")>z-active</#if>" onclick="Z.EL.toggleClass(this, 'z-active');doLabelIdSet('attribute', '${aitem.getAttributeId()}')">${aitem.getAttributeName()}</button>
</#for>
</td>
</tr>
</#for>
</table>
</div>
<div class="z-absolute z-w100p z-h80 z-text-center z-bg-gray" style="bottom:0;left:0">
<button class="z-button ${zmr_color_class} z-w150 z-h50 z-mg-t15 z-mg-l5 z-mg-l20 zi-px22" type="button" onclick="doTemplateLabelExec();">提交</button>
<button class="z-button z-w150 z-h50 z-mg-t15 z-mg-l5 z-mg-l20 zi-px22" type="button" onclick="parent.location.reload();">关闭</button>
</div>
</div>
@@ -0,0 +1,122 @@
<#def designatedPath="/allTemplate.htm"/>
<script>
Z.onload(function()
{
doTemplateSearch("1");
})
function doTemplateAdd()
{
var dialog = new Z.Dialog();
dialog.title = "新建我的模板";
dialog.url = "newMyTemplate.htm";
dialog.width = 800;
dialog.height = 480;
dialog.fixed = true;
dialog.execute();
}
function doTemplateSearch(page)
{
var ajax = new Z.Ajax();
ajax.setClassName("TemplatePresenter");
ajax.setMethodName("doTemplateSearch");
ajax.addParam("page", page);
ajax.addParam("urlParam", "MY");
ajax.addParam("typeId", Z("#typeId").val());
ajax.addParam("industryId", Z("#industryId").val());
ajax.addParam("fileType", Z("#fileType").val());
ajax.setCallback("resultWrap");
ajax.setLoading("resultWrap");
ajax.execute();
}
function externalDraftUpload(templateSrc,typeName){
var ajax = new Z.Ajax();
ajax.setClassName("WorksPresenter");
ajax.setMethodName("doQueryOperatorTemplateDesc");
ajax.setSuccess(function(){
var templateId = Z.J.toObject(this.responseText);
if(templateId !=0){
var dialog = new Z.Dialog();
dialog.shadow = true;
dialog.title = "上传外部稿件";
dialog.fixed = true;
dialog.url = "externalDraftUpload.htm?mediaId="+templateId+"&templatePage=MY&templateSrc="+templateSrc+"&typeName="+typeName;;
dialog.width = 800;
dialog.height =300;
dialog.execute();
}
doTemplateSearch("1");
});
ajax.execute();
}
</script>
${Styles.src("/zinc/css/design_2018102301.css")}
${Scripts.src("/zinc/js/design_2018102301.js")}
${zhiqim_manager_breadcrumb("我的模板")}
${zhiqim_manager_content()}
<#-- 导航栏 -->
<div class="z-tabnav-main z-blue z-mg-b20">
<nav>
<ul>
<li onclick="Z.Location.href('templateDraftMy.htm');">我的订单草稿</li>
<li onclick="Z.Location.href('templateOrderMy.htm');">我的订单模板</li>
<li class="z-active">我的模板</li>
<li onclick="Z.Location.href('templateCollect.htm');">我收藏的</li>
<li onclick="Z.Location.href('templateShare.htm');">分享给我的</li>
<li onclick="Z.Location.href('allTemplate.htm');">所有模板</li>
<!-- <li onclick="Z.Location.href('bestTemplate.htm');">精品模板</li> -->
<#if ZmrPathRule.check(request, "/templateAudit.htm")><li onclick="Z.Location.href('templateAudit.htm');">模板审核</li></#if>
<!-- <#if ZmrPathRule.check(request, "/templateBestAudit.htm")><li onclick="Z.Location.href('templateBestAudit.htm');">精品审核</li></#if> -->
<#if ZmrPathRule.check(request, "/desTemplateLogList.htm")><li onclick="Z.Location.href('desTemplateLogList.htm');">模版日志</li></#if>
</ul>
<div class="z-float-right z-mg-t10 z-mg-r5">
<button class="z-button z-w130 z-mg-r20 ${zmr_color_class}" onclick="doTemplateAdd();"><i class="z-font z-add"></i>新建模板</button>
</div>
</nav>
</div>
<table class="z-table z-bordered z-pd6">
<input type="hidden" id="typeId" name="typeId" value="">
<input type="hidden" id="industryId" name="industryId" value="">
<input type="hidden" id="fileType" name="fileType" value="">
<tr class="z-h40" bgcolor="${oddColor}">
<td width="5%">类型:${typeId}</td>
<td width="*">
<button type="button" data-options="group:typeId" class="z-button z-large z-bordered z-blue-bd z-hover <#if typeId == -1 || Validates.isEmpty(typeId)>z-active</#if>" onclick="{Z(this).toggleClass('z-active');Z('#typeId').val('');};doTemplateSearch('1');">全部</button>
<#for item : DesignTypeDao.listTemmplate()>
<button type="button" data-options="group:typeId" class="z-button z-large z-bordered z-blue-bd z-hover z-mg-t3 <#if item.getTypeId() == typeId>z-active</#if>" onclick="{Z(this).toggleClass('z-active');Z('#typeId').val(${item.getTypeId()});};doTemplateSearch('1');">${item.getTypeName()}</button>
</#for>
</td>
</tr>
<tr class="z-h40" bgcolor="#FFFFFF">
<td>行业:</td>
<td>
<button type="button" data-options="group:industryId" class="z-button z-large z-bordered z-blue-bd z-hover <#if industryId == -1 || Validates.isEmpty(industryId)>z-active</#if>" onclick="{Z(this).toggleClass('z-active');Z('#industryId').val('');};doTemplateSearch('1');">全部</button>
<#for item : Global.get(DesignIndustryCache.class).getIndustryList()>
<button type="button" data-options="group:industryId" class="z-button z-large z-bordered z-blue-bd z-hover z-mg-t3 <#if item.getIndustryId() == industryId>z-active</#if>" onclick="{Z(this).toggleClass('z-active');Z('#industryId').val(${item.getIndustryId()});};doTemplateSearch('1');">${item.getIndustryName()}</button>
</#for>
</td>
</tr>
<tr class="z-h40" bgcolor="${oddColor}">
<td width="5%">文件格式:</td>
<td width="*">
<button type="button" data-options="group:fileType" class="z-button z-large z-bordered z-blue-bd z-hover z-active" onclick="Z.EL.toggleClass(this,'z-active');Z('#fileType').val('');doTemplateSearch('1');">全部</button>
<button type="button" data-options="group:fileType" class="z-button z-large z-bordered z-blue-bd z-hover" onclick="Z.EL.toggleClass(this,'z-active');Z('#fileType').val('CDR');doTemplateSearch('1');">CDR</button>
<button type="button" data-options="group:fileType" class="z-button z-large z-bordered z-blue-bd z-hover" onclick="Z.EL.toggleClass(this,'z-active');Z('#fileType').val('PSD');doTemplateSearch('1');">PSD</button>
<button type="button" data-options="group:fileType" class="z-button z-large z-bordered z-blue-bd z-hover" onclick="Z.EL.toggleClass(this,'z-active');Z('#fileType').val('AI');doTemplateSearch('1');">AI</button>
<button type="button" data-options="group:fileType" class="z-button z-large z-bordered z-blue-bd z-hover" onclick="Z.EL.toggleClass(this,'z-active');Z('#fileType').val('RAR');doSearchAjax('1');">RAR</button>
<button type="button" data-options="group:fileType" class="z-button z-large z-bordered z-blue-bd z-hover" onclick="Z.EL.toggleClass(this,'z-active');Z('#fileType').val('PDF');doTemplateSearch('1');">PDF</button>
</td>
</tr>
</table>
<div id="resultWrap"></div>
<!-- 浮动选中框 end -->
${zhiqim_manager_content_end()}
@@ -0,0 +1,88 @@
<#def designatedPath="/allTemplate.htm"/>
<script>
<!--
Z.onload(function()
{//定义搜索框
doTemplateSearch("1");
})
var prdIdarr = Z.AR.toArray("${prdIdarr}", ",");
var indIdarr = Z.AR.toArray("${indIdarr}", ",");
function doTemplateSearch(page)
{
var ajax = new Z.Ajax();
ajax.setClassName("TemplatePresenter");
ajax.setMethodName("doSearchOrderTemplate");
ajax.addParam("page", page);
ajax.addParam("urlParam", "ORDER");
ajax.addParam("typeId", Z("#typeId").val());
ajax.addParam("industryId", Z("#industryId").val());
ajax.addParam("selOrderTemplate", Z("#selOrderTemplate").val());
ajax.addParam("q", Z("#q").val());
ajax.setCallback("resultWrap");
ajax.setLoading("resultWrap");
ajax.execute();
}
-->
</script>
${Styles.src("/zinc/css/design_2018102301.css")}
${Scripts.src("/zinc/js/design_2018102301.js")}
${zhiqim_manager_breadcrumb_parent("/templateMy.htm", "我的模板", " 我的订单模板")}
${zhiqim_manager_content()}
<#-- 导航栏 -->
<div class="z-tabnav-main z-blue z-mg-b20">
<nav>
<ul>
<li onclick="Z.Location.href('templateDraftMy.htm');">我的订单草稿</li>
<li class="z-active">我的订单模板</li>
<li onclick="Z.Location.href('templateMy.htm');">我的模板</li>
<li onclick="Z.Location.href('templateCollect.htm');">我收藏的</li>
<li onclick="Z.Location.href('templateShare.htm');">分享给我的</li>
<li onclick="Z.Location.href('allTemplate.htm');">所有模板</li>
<!-- <li onclick="Z.Location.href('bestTemplate.htm');">精品模板</li> -->
<#if ZmrPathRule.check(request, "/templateAudit.htm")><li onclick="Z.Location.href('templateAudit.htm');">模板审核</li></#if>
<!-- <#if ZmrPathRule.check(request, "/templateBestAudit.htm")><li onclick="Z.Location.href('templateBestAudit.htm');">精品审核</li></#if> -->
<#if ZmrPathRule.check(request, "/desTemplateLogList.htm")><li onclick="Z.Location.href('desTemplateLogList.htm');">模版日志</li></#if>
</ul>
</nav>
</div>
<#-- 订单搜索 -->
<div class="z-mg-t20 z-h1 z-text-center">
<input type="hidden" id="typeId" name="typeId" value="">
<input type="hidden" id="industryId" name="industryId" value="">
<span style="float:center;">
<#if ZmrPathRule.check(request, "/viewAllCompletedOrderTemplate.htm")> <!-- 模板审核人员,具有查看所有订单模板权限-->
<input type="hidden" id="selOrderTemplate" class="z-input z-w200 zi-h40" value="selOrderTemplate" maxlength="60">
</#if>
<input id="q" class="z-input z-w400 zi-h40 zi-bd-r-none" placeholder="请输入订单号" value="" maxlength="60"><button type="button" class="z-button z-w70 z-h40 zi-bd-rd0 z-blue" onclick="doTemplateSearch('1')"><i class="z-font z-query"></i>查询</button>
</span>
</div>
<table class="z-table z-bordered z-pd6">
<tr class="z-h40" bgcolor="${oddColor}">
<td width="5%">类型:</td>
<td width="*">
<button type="button" data-options="group:typeId" class="z-button z-large z-bordered z-blue-bd z-hover <#if typeId == -1 || Validates.isEmpty(typeId)>z-active</#if>" onclick="{Z(this).toggleClass('z-active');Z('#typeId').val('');};doTemplateSearch('1');">全部</button>
<#for item : DesignTypeDao.list()>
<button type="button" data-options="group:typeId" class="z-button z-large z-bordered z-blue-bd z-hover z-mg-t3 <#if item.getTypeId() == typeId>z-active</#if>" onclick="{Z(this).toggleClass('z-active');Z('#typeId').val(${item.getTypeId()});};doTemplateSearch('1');">${item.getTypeName()}</button>
</#for>
</td>
</tr>
<tr class="z-h40" bgcolor="#FFFFFF">
<td>行业:</td>
<td>
<button type="button" data-options="group:industryId" class="z-button z-large z-bordered z-blue-bd z-hover <#if industryId == -1 || Validates.isEmpty(industryId)>z-active</#if>" onclick="{Z(this).toggleClass('z-active');Z('#industryId').val('');};doTemplateSearch('1');">全部</button>
<#for item : Global.get(DesignIndustryCache.class).getIndustryList()>
<button type="button" data-options="group:industryId" class="z-button z-large z-bordered z-blue-bd z-hover z-mg-t3 <#if item.getIndustryId() == industryId>z-active</#if>" onclick="{Z(this).toggleClass('z-active');Z('#industryId').val(${item.getIndustryId()});};doTemplateSearch('1');">${item.getIndustryName()}</button>
</#for>
</td>
</tr>
</table>
<div id="resultWrap"></div>
${zhiqim_manager_content_end()}
@@ -0,0 +1,200 @@
<script>
var paramStrs;
Z.onload(function(){
paramStrs = '${paramStr}';
if (paramStrs != "")
doSelPrdType(${works.getDesignType()});
});
function doTemplateParam()
{
var worksId = '${works.getWorksId()}';
var industryId = '${works.getIndustryId()}';
var typeId = '${works.getDesignType()}';
var designer = '${operatorCode}';
var sizes = Z("input[name=sizes]:checked").val();
if ("userDefined" == sizes)
{
var width = Z("input[name=width]").val();
var height = Z("input[name=height]").val();
iZ(width <=0 || height <= 0)
{
Z.alert("请输入自定义尺寸");
return;
}
}
sizes = sizes.replace("X", "x");
var arr = sizes.split("x");
var prdPageId;
var prdSizeId;
var totalPage;
var paramJson;
if (paramStrs == "")
{
prdPageId = '${works.getPrdPageId()}';
prdSizeId = '${works.getPrdSizeId()}';
totalPage = '${Global.get(PrdPageCache.class).get(works.getPrdPageId()).getPrdPageValue()}';
Z("input[name=width]").val(arr[0]);
Z("input[name=height]").val(arr[1]);
Z("input[name=totalPage]").val(totalPage);
Z("input[name=paramCat]").val(typeId);
paramJson = "{\"designer\":" + designer + ",\"worksId\":" + worksId + ",\"industryId\":" + industryId + ",\"typeId\":" + typeId + ",\"prdPageId\":" + prdPageId + ",\"prdSizeId\":" + prdSizeId + "}";
}
else
{
prdPageId = Z("input[name=prdPageId]:checked").val();
prdSizeId = Z("input[name=prdSizeId]:checked").val();
totalPage = Z("input[name=totalPage]").val();
Z("input[name=totalPage]").val(totalPage);
paramJson = "{\"designer\":" + designer + ",\"typeId\":" + typeId + ",\"prdPageId\":" + prdPageId + ",\"prdSizeId\":" + prdSizeId + "}";
}
if (Z.V.isEmpty(typeId) || Z.V.isEmpty(prdPageId) || Z.V.isEmpty(prdSizeId) || Z.V.isEmpty(sizes))
{
Z.alert("请选择类型、面数、尺寸、大小等");
return;
}
var form = document.theForm;
Z("#paramJson").val(paramJson);
Z("#paramCat").val(typeId);
form.submit();
//window.open("/mediaDesign.htm?dpi=300"+"&width="+arr[0] + "&height=" +arr[1] + "&totalPage=" + totalPage + "&paramCat=" + typeId + "&paramJson={\"designer\":" + designer + ",\"worksId\":" + worksId + ",\"industryId\":" + industryId + ",\"typeId\":" + typeId + ",\"prdPageId\":" + prdPageId + ",\"prdSizeId\":" + prdSizeId + "}");
}
function doSelPrdType(typeId)
{//选择类型
var ajax = new Z.Ajax();
ajax.setClassName("MediaSelectParamAction");
ajax.setMethodName("doSelPrdType");
ajax.addParam("typeId", typeId);
ajax.setFailureAlert();
ajax.setSuccess(function(){
Z("#result").htmlc(this.responseText);
Z("#sizeCont").html('');
//非名片类,出血默认为3mm
iZ(typeId != 1)
Z("input[name=bleedSize]").val("3");
});
ajax.setLoading("result");
ajax.execute();
}
function doSelPrdSize(prdSizeId)
{//选择尺寸
var ajax = new Z.Ajax();
ajax.setClassName("MediaSelectParamAction");
ajax.setMethodName("doSelPrdSize");
ajax.addParam("prdSizeId", prdSizeId);
ajax.setFailureAlert();
ajax.setSuccess(function(){
var obj = Z.J.toObject(this.responseText);
var html = '';
for(var i=0;i<obj.length;i++)
{
html += '<input type="radio" name="sizes" data-role="z-radio" data-class="z-blue z-large" value="' + obj[i] + '" class="z-mg-r3" <#if item_index == 0>checked</#if> onclick="javascript:doCaclSize();"><span class="z-mg-r3">' + obj[i] + '</span>';
}
Z("#sizeCont").htmlc(html);
});
ajax.execute();
}
function doSelPrdPage(value)
{//选择面数
Z("#totalPage").val(value);
}
function doCaclSize()
{//选择具体大小
var sizes = Z.FM.getChecked("sizes", "");
if (Z.V.isEmpty(sizes))
{
Z.alert("请选择具体尺寸");
return;
}
if ("userDefined" == sizes)
{//自定义
Z("input[name=width]").removeAttr("readonly");
Z("input[name=height]").removeAttr("readonly");
return;
}
else
{
Z("input[name=width]").attr("readonly", true);
Z("input[name=height]").attr("readonly", true);
sizes = sizes.replace("X", "x");
var arr = sizes.split("x");
Z("input[name=width]").val(arr[0].trim());
Z("input[name=height]").val(arr[1].trim());
}
}
</script>
<div class="content">
<form id="theForm" name="theForm" action="/zhiqimMediaEditor/mediaDesign.htm" method="POST" target="_blank">
<input type="hidden" name="dpi" id="dpi" value="300">
<input type="hidden" name="paramCat" id="paramCat" value="">
<input type="hidden" name="totalPage" id="totalPage" value="1">
<input type="hidden" name="bleedSize" id="bleedSize" value="2">
<input type="hidden" name="createMode" id="createMode" value="0">
<input type="hidden" name="paramJson" id="paramJson" value="">
<#if ZmrPathRule.check(request, "/templateSizeModify.htm")>
<input type="hidden" name="isModify" id="isModify" value="true">
<#else>
<input type="hidden" name="isModify" id="isModify" value="false">
</#if>
<table class="z-table z-pd6 z-text-center">
<tr class="z-h50">
<td width="100">产品类型:</td>
<td width="*%" align="left">${Global.get(ProductTypeCache.class).getName(works.getDesignType())}</td>
</tr>
<#if Validates.isNotEmpty(paramStr)>
<tbody id="result"></tbody>
<tr class="z-h50">
<td>设计尺寸:</td>
<td align="left">
<span class="z-w100p" id="sizeCont"></span>
<span class="z-w200" >
<input type="radio" name="sizes" data-role="z-radio" data-class="z-blue z-large" value="userDefined" class="z-mg-r3" onclick="doCaclSize();"><span>自定义&nbsp;&nbsp;</span>
<input type="text" name="width" class="z-input z-w70 ${zmr_color_class}" value="" class="z-mg-r3" maxlength="6" placeholder="长" data-options="type:Integer;">&nbsp;X&nbsp;
<input type="text" name="height" class="z-input z-w70 ${zmr_color_class}" value="" class="z-mg-r3" maxlength="6" placeholder="宽" data-options="type:Integer;">&nbsp;mm
</span>
</td>
</tr>
<#else>
<tr class="z-h50">
<td>面数:</td>
<td align="left">${Global.get(PrdPageCache.class).getName(works.getPrdPageId())}</td>
</tr>
<tr class="z-h50">
<td>成品尺寸:</td>
<td align="left">${Global.get(PrdSizeCache.class).getName(works.getPrdSizeId())}</td>
</tr>
<tr class="z-h50">
<td>设计尺寸:</td>
<td align="left">
<#for item : strList>
<input type="radio" name="sizes" data-role="z-radio" data-class="z-blue" value="${item}" class="z-mg-r3" <#if item_index == 0>checked</#if>><span>${item}</span>
</#for>
</td>
</tr>
</#if>
<tr class="z-h50">
<td colspan="2"><button type="button" class="z-button z-large z-w100 z-blue" onclick="doTemplateParam();">前往设计</button><button type="button" class="z-button z-large z-w100 z-mg-l10" onclick="parent.Z.Dialog.close();">关闭</button></td>
</tr>
</table>
</form>
</div>
@@ -0,0 +1,73 @@
<#def designatedPath="/allTemplate.htm"/>
<script>
<!--
Z.onload(function()
{
doTemplateSearch("1");
})
function doTemplateSearch(page)
{
var ajax = new Z.Ajax();
ajax.setClassName("TemplatePresenter");
ajax.setMethodName("doTemplateSearch");
ajax.addParam("page", page);
ajax.addParam("urlParam", "SHARE");
ajax.addParam("typeId", Z("#typeId").val());
ajax.addParam("industryId", Z("#industryId").val());
ajax.setCallback("resultWrap");
ajax.setLoading("resultWrap");
ajax.execute();
}
-->
</script>
${Styles.src("/zinc/css/design_2018102301.css")}
${Scripts.src("/zinc/js/design_2018102301.js")}
${zhiqim_manager_breadcrumb("我的模板")}
${zhiqim_manager_content()}
<#-- 导航栏 -->
<div class="z-tabnav-main z-blue z-mg-b20">
<nav>
<ul>
<li onclick="Z.Location.href('templateDraftMy.htm');">我的订单草稿</li>
<li onclick="Z.Location.href('templateOrderMy.htm');">我的订单模板</li>
<li onclick="Z.Location.href('templateMy.htm');">我的模板</li>
<li onclick="Z.Location.href('templateCollect.htm');">我收藏的</li>
<li class="z-active">分享给我的</li>
<li onclick="Z.Location.href('allTemplate.htm');">所有模板</li>
<!-- <li onclick="Z.Location.href('bestTemplate.htm');">精品模板</li> -->
<#if ZmrPathRule.check(request, "/templateAudit.htm")><li onclick="Z.Location.href('templateAudit.htm');">模板审核</li></#if>
<!-- <#if ZmrPathRule.check(request, "/templateBestAudit.htm")><li onclick="Z.Location.href('templateBestAudit.htm');">精品审核</li></#if> -->
<#if ZmrPathRule.check(request, "/desTemplateLogList.htm")><li onclick="Z.Location.href('desTemplateLogList.htm');">模版日志</li></#if>
</ul>
</nav>
</div>
<table class="z-table z-bordered z-pd6">
<input type="hidden" id="typeId" name="typeId" value="">
<input type="hidden" id="industryId" name="industryId" value="">
<tr class="z-h40" bgcolor="${oddColor}">
<td width="5%">类型:${typeId}</td>
<td width="*">
<button type="button" data-options="group:typeId" class="z-button z-large z-bordered z-blue-bd z-hover <#if typeId == -1 || Validates.isEmpty(typeId)>z-active</#if>" onclick="{Z(this).toggleClass('z-active');Z('#typeId').val('');};doTemplateSearch('1');">全部</button>
<#for item : DesignTypeDao.listTemmplate()>
<button type="button" data-options="group:typeId" class="z-button z-large z-bordered z-blue-bd z-hover z-mg-t3 <#if item.getTypeId() == typeId>z-active</#if>" onclick="{Z(this).toggleClass('z-active');Z('#typeId').val(${item.getTypeId()});};doTemplateSearch('1');">${item.getTypeName()}</button>
</#for>
</td>
</tr>
<tr class="z-h40" bgcolor="#FFFFFF">
<td>行业:</td>
<td>
<button type="button" data-options="group:industryId" class="z-button z-large z-bordered z-blue-bd z-hover <#if industryId == -1 || Validates.isEmpty(industryId)>z-active</#if>" onclick="{Z(this).toggleClass('z-active');Z('#industryId').val('');};doTemplateSearch('1');">全部</button>
<#for item : Global.get(DesignIndustryCache.class).getIndustryList()>
<button type="button" data-options="group:industryId" class="z-button z-large z-bordered z-blue-bd z-hover z-mg-t3 <#if item.getIndustryId() == industryId>z-active</#if>" onclick="{Z(this).toggleClass('z-active');Z('#industryId').val(${item.getIndustryId()});};doTemplateSearch('1');">${item.getIndustryName()}</button>
</#for>
</td>
</tr>
</table>
<div id="resultWrap"></div>
${zhiqim_manager_content_end()}
@@ -0,0 +1,543 @@
${Scripts.src(zhiqim_uploadlarge.js)}
<script>
function doTemplateDownload()
{//下载文件
Z.Location.href("templateDownload.htm?mediaId=" + '${media.getMediaId()}');
}
function doTemplateShare()
{//作品库分享
var shareOperator = Z("#shareOperator").val();
if(!shareOperator){
Z.alert("请选择设计师!");
return;
}
var ajax = new Z.Ajax();
ajax.setClassName("TemplatePresenter");
ajax.setMethodName("doTemplateShare");
ajax.addParam("mediaId", '${media.getMediaId()}');
ajax.addParam("operatorCode", shareOperator);
ajax.setFailureAlert();
ajax.setSuccess(function(){
Z.success("分享成功", shareList_hide());
});
ajax.execute();
}
function doCancelShare()
{// 取消分享
var ajax = new Z.Ajax();
ajax.setClassName("TemplatePresenter");
ajax.setMethodName("doCancelShare");
ajax.addParam("mediaId", '${media.getMediaId()}');
ajax.setFailureAlert();
ajax.setSuccess(function(){
Z.success("取消成功");
});
ajax.execute();
}
function doTemplateLabel()
{//关联标签
var dialog = new Z.Dialog();
dialog.shadow = true;
dialog.title = "关联行业";
dialog.hasTitle = true;
dialog.fixed = true;
var mediaId = '${media.getMediaId()}';
dialog.url = "templateLabel.htm?mediaId=" + mediaId;
dialog.width = 1000;
dialog.height = 600;
dialog.execute();
}
/*悬浮展示分享列表*/
function shareList_show(){ Z(".share-list").show();}
function shareList_hide(){ Z(".share-list").hide();Z("#share-list [index='0']").click();}
/*收藏点击事件*/
var eventId = '${userEventId}';
function doTemplateCollect(ele)
{
Z(ele).toggleClass("active");
//执行操作
if(Z(ele).hasClass("active"))
{
var ajax = new Z.Ajax();
ajax.setClassName("TemplatePresenter");
ajax.setMethodName("doTemplateCollect");
ajax.addParam('${media.getMediaId()}')
ajax.addParam(eventId);
ajax.setFailureAlert();
ajax.setSuccess(function(){
var collect = this.responseText;
var collectNum = collect.split("+");
Z("#collect").text(collectNum[0]);
eventId = collectNum[1];
});
ajax.execute();
}
else
{
var ajax = new Z.Ajax();
ajax.setClassName("TemplatePresenter");
ajax.setMethodName("doTemplateCollect");
ajax.addParam('${media.getMediaId()}')
ajax.addParam(eventId);
ajax.setFailureAlert();
ajax.setSuccess(function(){
var collect = this.responseText;
Z("#collect").text(collect);
eventId = 0;
});
ajax.execute();
}
}
/**/
function selectTag(ele)
{//选中标签
var $active = Z(".tag-edit-list .tab .active");
$active.removeClass("active");
var next = $active.next("span");
$active.next("span").removeClass("zi-hide").addClass("active");
}
function addKeywords(ev)
{//添加关键字
if (ev.type=="keydown" && ev.keyCode != "13"){
return;
}
Z.E.forbidden(ev);
var val = Z("#keywords").val();
if (Z.V.isEmptyBlank(val))
{
Z.alert("请输入添加内容!", function(){ Z("#keywords")[0].focus();});
return;
}
var ajax = new Z.Ajax();
ajax.setClassName("LabelPresenter");
ajax.setMethodName("doTemplateCustomLabelAdd");
ajax.addParam("mediaId", '${media.getMediaId()}')
ajax.addParam("keywordName", val);
ajax.setFailure(function(){Z.alert(ajax.responseText, function(){ Z("#keywords")[0].focus();});});
ajax.setSuccess(function(){
var keywordName = this.responseText;
var $item = Z('<span class="item-diy z-bg-blue"><i class="z-font z-error" onclick="delThisKeyword(this, \'' + keywordName + '\');"></i>' + val + '</span>');
var $wrap = Z(".kwywordItem-list");
$wrap.append($item);
Z("#keywords").val("");
});
ajax.execute();
}
function delThisKeyword(ele, keywordName)
{//删除关键字
Z(ele).parent().remove();
var ajax = new Z.Ajax();
ajax.setClassName("LabelPresenter");
ajax.setMethodName("doTemplateCustomLabelDelete");
ajax.addParam("mediaId", '${media.getMediaId()}');
ajax.addParam("keywordName", keywordName);
ajax.setFailureAlert();
ajax.setSuccess(function(){location.reload();});
ajax.execute();
}
function doTemplateDelete()
{//删除用户模板
var mediaId = '${media.getMediaId()}';
if(Z.V.isEmpty(mediaId))
{
Z.alert("请选择模板");
return;
}
Z.confirm("你确定要删除该模板吗?", function(){
var ajax = new Z.Ajax();
ajax.setClassName("TemplatePresenter");
ajax.setMethodName("doTemplateDelete");
ajax.addParam("mediaId", mediaId);
ajax.setFailureAlert();
ajax.setSuccess(function(){
parent.document.querySelectorAll('.z-red')[0].click();
parent.Z.Dialog.close();
});
ajax.setLoading(document, true);
ajax.execute();
});
}
function doTemplateEdit()
{//编辑
window.open("/zhiqimMediaEditor/mediaDesign.htm?isTemplateEdit=true&mediaId=" + '${media.getMediaId()}' + "&bleedSize=" + '${media.getBleedSize()}');
}
function doTemplateCopy()
{//复制
var mediaId = '${media.getMediaId()}';
var ajax = new Z.Ajax();
ajax.setClassName("TemplatePresenter");
ajax.setMethodName("doTemplateCopy");
ajax.addParam("mediaId", mediaId);
ajax.setFailureAlert();
ajax.setSuccess(function(){
Z.success("复制成功", function(){parent.Z.L.reload();});
});
ajax.setLoading(document, true);
ajax.execute();
}
function doTemplateToSys()
{//申请系统模板
var mediaId = '${media.getMediaId()}';
var ajax = new Z.Ajax();
ajax.setClassName("TemplatePresenter");
ajax.setMethodName("doTemplateToSys");
ajax.addParam("mediaId", mediaId);
ajax.setFailureAlert();
ajax.setSuccess(function(){
Z.success("申请成功", function(){Z.L.reload();});
});
ajax.setLoading(document, true);
ajax.execute();
}
function doTemplateToBest()
{//申请精品模板
var mediaId = '${media.getMediaId()}';
var ajax = new Z.Ajax();
ajax.setClassName("TemplatePresenter");
ajax.setMethodName("doTemplateToBest");
ajax.addParam("mediaId", mediaId);
ajax.setFailureAlert();
ajax.setSuccess(function(){
Z.success("申请成功", function(){Z.L.reload();});
});
ajax.setLoading(document, true);
ajax.execute();
}
function doTemplateToMy()
{//发布模板
var mediaId = '${media.getMediaId()}';
var ajax = new Z.Ajax();
ajax.setClassName("TemplatePresenter");
ajax.setMethodName("doTemplateToMy");
ajax.addParam("mediaId", mediaId);
ajax.setFailureAlert();
ajax.setSuccess(function(){
Z.success("申请成功", function(){Z.L.reload();});
});
ajax.setLoading(document, true);
ajax.execute();
}
function doTemplateCancel(type)
{//取消模板/精品
var mediaId = '${media.getMediaId()}';
var ajax = new Z.Ajax();
ajax.setClassName("TemplatePresenter");
ajax.setMethodName("doTemplateCancel");
ajax.addParam("mediaId", '${media.getMediaId()}');
ajax.addParam("type", type);
ajax.setFailureAlert();
ajax.setSuccess(function(){
Z.success("取消", function(){Z.L.reload();});
});
ajax.setLoading(document, true);
ajax.execute();
}
function doDownloadPdf(mediaId)
{//下载pdf
var ajax = new Z.Ajax();
ajax.setClassName("TemplatePresenter");
ajax.setMethodName("doDownloadPdf");
ajax.addParam("mediaId", mediaId);
ajax.setFailureAlert();
ajax.setSuccess(function()
{
var fileName = mediaId + ".pdf";
var element1 = document.createElement("a");
element1.href = ajax.responseText;
element1.setAttribute("download", fileName);
element1.click();
});
ajax.setLoading(document);
ajax.execute();
}
function doWorksUpload()
{
var dialog = new Z.Dialog();
dialog.shadow = true;
dialog.title = "上传外部稿件";
dialog.fixed = true;
dialog.url = "externalDraftUpload.htm?mediaId="+${media.getMediaId()}+"&templatePage=${urlParam}";
dialog.width = 800;
dialog.height =300;
dialog.execute();
}
function doWorksDownload(mediaId){
var ajax = new Z.Ajax();
ajax.setClassName("TemplatePresenter");
ajax.setMethodName("checkWorksDownload");
ajax.addParam("mediaId", mediaId);
ajax.setFailureAlert();
ajax.setSuccess(function()
{
var dialog = new Z.Dialog();
dialog.shadow = true;
dialog.title = "下载外部稿件";
dialog.fixed = true;
dialog.url = "externalDraftDownload.htm?mediaId="+mediaId;
dialog.width = 800;
dialog.height =500;
dialog.execute();
});
ajax.setLoading(document);
ajax.execute();
}
function doFileDownload(filetype,url){
if(filetype=='pdf'){
var fileName = ${mediaId} + ".pdf";
var element1 = document.createElement("a");
element1.href = url;
element1.setAttribute("download", fileName);
element1.click();
}else{
window.open(url);
var ajax = new Z.Ajax();
ajax.setClassName("TemplatePresenter");
ajax.setMethodName("doTemplateDownload");
ajax.addParam("mediaId", ${mediaId});
ajax.setFailureAlert();
ajax.setSuccess();
ajax.execute();
}
}
Z.onload(function()
{
document.getElementById('share-list').style.display='none';
})
</script>
<style>
body,.mainbody{height:100%}
/*图片展示区*/
.show-thumb{left:0;top:0;bottom:0;right:300px;padding:30px;}
.show-thumb-list{align-items:center;align-content:center;justify-content:center;flex-wrap:wrap;overflow-y: auto;}<!--display:flex;-->
<#if media.getMediaUrl().indexOf(",")==-1>
.show-thumb-list>li{padding:5px;max-width:45%;}
<#else>
.show-thumb-list>li{padding:5px;}
</#if>
/*信息列表区*/
.show-info{top:0;bottom:0;right:0;border-left:1px solid #e1e1e1;}
.show-info-list>li{font-size:14px;padding:15px 0;border-bottom:1px solid #f5f5f5;color:#777;}
/*顶部三要素*/
.show-info-list>li>span.tag{margin-right:28px;float:left;padding:15px 0;}
.show-info-list>li>span.tag:not(.view):hover,.show-info-list>li>span.tag.collect.active{color:#00a2eb;}
.show-info-list>li>span.tag>i{display:inline-block;width:17px;height:15px;vertical-align:middle;margin-right:5px;background:url(http://cdn.tubangzhu.com/static/tbz-main/images/preview-tag_8774a98.png) no-repeat;}
.show-info-list>li>span.tag.share>i{background-position:0 0;margin-right:3px;}
.show-info-list>li>span.tag.share:hover>i{background-position:0 -15px;}
.show-info-list>li>span.tag.view>i{background-position:-17px 0;}
.show-info-list>li>span.tag.view>i{background-position:-17px 0;}
.show-info-list>li>span.tag.collect>i{background-position:-35px 0;}
.show-info-list>li>span.tag.collect:hover>i,.show-info-list>li>span.tag.collect.active>i{background-position: -35px -15px;}
.show-info-list>li .z-button.z-xlarge{height:44px;}
/*分享列表*/
.share-list{position:absolute;top:45px;left:-5px;background:#fff;width:200px;line-height:35px;box-shadow:0 0 5px #aaa;border-radius:4px;padding:8px 15px;/*display:none;*/z-index:1;}
.share-list>span{position:absolute;width:10px;height:10px;background:#fff;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);top:-5px;left:30px;box-shadow:-1px -1px 0 #d4d2d2;}
/*标题图标*/
.list-title>i{background:url(http://cdn.tubangzhu.com/static/tbz-main/images/preview-tag_8774a98.png) no-repeat -187px 0;display:inline-block;width:10px;height:19px;vertical-align:middle;margin-right:5px;}
/*类型添加*/
.type-list{}
.type-list>li{padding:8px 0;border-bottom:1px dashed #f5f5f5;}
/*关键字选择区*/
.kwywords-list>.kwywordItem-list>span{display:inline-block;border-radius:3px;padding:5px 10px;margin:3px;position:relative;}
.kwywords-list>.kwywordItem-list>span>.z-error{display:none;position:absolute;right:-5px;top:-5px;border-radius:50%;margin:0;border:1px solid #777;width:15px;height:15px;line-height:14px;text-align:center;font-size:12px;background:#fff;z-index:9;cursor:pointer;}
.kwywords-list>.kwywordItem-list>span>.z-error:hover{color:#ea4a36;border-color:#ea4a36;}
.kwywords-list>.kwywordItem-list>span:hover .z-error{display:block;}
.kwywords-list>.item-add{position:relative;}
.kwywords-list>.item-add>input{width:100%;}
.kwywords-list>.item-add>button{padding:3px 10px;position:absolute;top:0;right:0;}
.fileDownload:hover{opacity: 0.8;}
/**/
</style>
<div class="z-relative z-w100p z-h100p z-overflow-x-hidden">
<div class="show-thumb z-absolute">
<ul class="show-thumb-list z-w100p z-h100p" style="text-align: center;">
<#if media.getMediaUrl().indexOf(",")==-1>
<li><img src="${media.getMediaUrl()}"/></li>
<#else>
<#for path : Arrays.toStringArray(media.getMediaUrl())>
<li>
<img style="width:400px;" src="${path}"/>
</li></br>
</#for>
</#if>
</ul>
</div>
<div class="show-info z-absolute z-w300 z-pd15">
<ul class="show-info-list z-relative z-h100p">
<li class="zi-px15" style="color:#333;">
<#if media.getTemplateStatus() == 1><button class="z-button z-gray z-mg-r12">审核中</button></#if>
<#if media.getTemplateType() = 100 && media.getTemplateStatus() == 0><button class="z-button z-orange z-mg-r12" onclick="doTemplateToBest();">申请精品</button></#if>
<#if media.getTemplateType() = 20 && media.getTemplateStatus() == 0><button class="z-button z-orange z-mg-r12" onclick="doTemplateToSys();">申请模板</button></#if>
<#if media.getTemplateType() = 10 && Validates.isEqual(media.getDesigner(), sessionUser.getOperatorCode())><button class="z-button z-purple" onclick="doTemplateToMy();">发布模板</button></#if>
<#if ZmrPathRule.check(request, "/templateBestAudit.htm")>
<#if media.getTemplateType() = 100>
<button class="z-button z-red" onclick="doTemplateCancel(1);">取消模板</button>
<#elseif media.getTemplateType() = 110>
<button class="z-button z-red" onclick="doTemplateCancel(0);">取消精品</button>
</#if>
</#if>
</li>
<#if media.getTemplateType()!=0 && media.getTemplateType()!=80>
<#if Validates.isNotEmpty(fileTypeSet)>
<li class="z-clearfix">
<p style="color: #333;font-size: 15px;margin-bottom: 10px;"><i class="z-font z-download"></i>模板下载(点击对应格式下载)</p>
<#for fileType : fileTypeSet>
<span class="fileDownload" style="background-color: #28a3ef;color: #FFF;border-radius: 5px;display: inline-block;font-size: 13px;width: 60px;height: 28px;text-align: center;line-height: 28px;cursor: pointer;" onclick="{Z(this).toggleClass('z-active');doFileDownload('${fileType}','${urlMap.get(fileType)}');}">${fileType.toUpperCase()}</span>
</#for>
</li>
</#if>
</#if>
<li class="z-clearfix z-relative z-color-999 zi-px13 zi-pd0">
<span class="tag share z-pointer z-clearfix" onclick="shareList_show();">
<i></i>分享
</span>
<div id="share-list" class="share-list">
<span class="arr-top"></span>
<select class="z-select z-w150" id="shareOperator" data-role="z-select-search" data-class="${zmr_color_class}">
<option value="">请选择</option>
<#for operator : oplist>
<option value="${operator.getOperatorCode()}">${operator.getOperatorCode()}</option>
</#for>
</select>
<button class="z-button z-blue z-width-40" onclick="doTemplateShare();">确定</button>
<button class="z-button z-white z-width-40" onclick="shareList_hide();">取消</button>
</div>
<span class="tag view"><i></i>浏览(${browseNum})</span>
<span class="tag collect z-pointer zi-mg-r0 <#if userEventId != 0>active</#if>" onclick="doTemplateCollect(this);"><i></i>收藏(<span id="collect" >${collectNum}</span>)</span>
</li>
<li class="z-clearfix" style="display: flex;align-items: center;">
<div style="display:inline-block;width:50%;">设计师:${media.getDesigner()} </div>
<div style="display:inline-block;color:red;"><img src="/zinc/images/fire.png" style="width: 16px;height: 16px;">热度:${score}</div>
</li>
<li class="z-clearfix">
<div class="z-float-left z-w100p z-clearfix">
<!--<div class="z-float-left z-w50p z-pd5 z-pd-t3 z-pd-b3"><button class="z-button z-red zi-w100p" onclick="doTemplateDownload();"><i class="z-font z-download"></i>下载(${downNum})</button></div>-->
<#if Validates.isEmpty(media.getCreateChannel()) || "platform_design" == media.getCreateChannel()>
<div class="z-float-left zi-w50p z-pd5 z-pd-t3 z-pd-b3"><button class="z-button z-blue zi-w100p" onclick="doTemplateCopy();"><i class="z-font z-text"></i>复制</button></div>
</#if>
<#if media.getTemplateType() != 80>
<#if Validates.isEmpty(media.getCreateChannel()) || "platform_design" == media.getCreateChannel()>
<#if Validates.isEqual(media.getDesigner(), sessionUser.getOperatorCode()) || ZmrPathRule.check(request, "/templateBestAudit.htm")>
<div class="z-float-left zi-w50p z-pd5 z-pd-t3 z-pd-b3"><button class="z-button z-blue zi-w100p" onclick="doTemplateEdit();"><i class="z-font z-modify"></i>编辑</button></div>
</#if>
</#if>
<#if ZmrPathRule.check(request, "/templateDelete.htm")><div class="z-float-left zi-w50p z-pd5 z-pd-t3 z-pd-b3"><button class="z-button z-red zi-w100p" onclick="doTemplateDelete();"><i class="z-font z-delete"></i>删除</button></div></#if>
</#if>
<#if urlParam == "SHARE">
<div class="z-float-left zi-w50p z-pd5 z-pd-t3 z-pd-b3"><button class="z-button z-blue zi-w100p" onclick="doCancelShare();"><i class="z-font z-delete"></i>取消分享</button></div>
</#if>
<#if Validates.isEmpty(media.getCreateChannel()) || "out_draft" == media.getCreateChannel()>
<#if media.getTemplateType()!=0 && media.getTemplateType()!=80>
<div class="z-float-left zi-w50p z-pd5 z-pd-t3 z-pd-b3"><button class="z-button z-blue zi-w100p" onclick="doWorksUpload();"><i class="z-font z-add"></i>上传文件</button></div>
</#if>
</#if>
<#if media.getTemplateType() == 80>
<div class="z-float-left zi-w50p z-pd5 z-pd-t3 z-pd-b3"><button class="z-button z-blue zi-w100p" onclick="doDownloadPdf('${media.getMediaId()}');">下载PDF</button></div>
</#if>
</div>
</li>
<li class="tag-edit z-relative" data-value="一级 类型 二级 行业 三级 属性">
<div class="z-h25 z-mg-t5 z-mg-b15">
<span class="z-float-right">
<#if ZmrPathRule.check(request, "/templateBestAudit.htm")>
<button class="z-button z-blue z-small" onclick="doTemplateLabel()"><i class="z-font z-modify"></i>修改</button>
<#elseif ZmrPathRule.check(request, "/templateAudit.htm") && media.getTemplateType() == 100>
<button class="z-button z-blue z-small" onclick="doTemplateLabel()"><i class="z-font z-modify"></i>修改</button>
<#else>
<#if media.getTemplateType() lt 100>
<button class="z-button z-blue z-small" onclick="doTemplateLabel()"><i class="z-font z-modify"></i>修改</button>
</#if>
</#if>
</span>
<span class="list-title z-lh25"><i></i>行业属性</span>
</div>
<ul class="type-list">
<li>
${DesignTypeDao.name(media.getTypeId())}&nbsp;
${Global.get(DesignIndustryCache.class).getIndustryName(media.getIndustryId())}&nbsp;
<#for subsName : Arrays.toStringArray(media.getIndustrySubName())>
${subsName}&nbsp;
</#for>
<#for attar : Arrays.toStringArray(media.getAttributeName())>
${attar}&nbsp;
</#for>
</li>
</ul>
</li>
<li class="keyword-edit">
<div class="list-title z-mg-t5 z-mg-b15"><i></i>自定义标签</div>
<div class="kwywords-list">
<div class="kwywordItem-list">
<#for keyword : DesignerPresenter.updateKeywordArr(media.getKeywordName(), "template", media.getMediaId())>
<span class="z-bg-blue"><i class="z-font z-error" onclick="delThisKeyword(this, '${keyword}');"></i>${keyword}</span>
</#for>
</div>
<#if ZmrPathRule.check(request, "/templateBestAudit.htm")>
<div class="item-add z-w100p z-mg-t10"><input id="keywords" class="z-input z-small" type="text" onkeydown="addKeywords(event);">&nbsp;&nbsp;<button class="z-button z-small z-blue" onclick="addKeywords(event);">添加</button></div>
<#elseif ZmrPathRule.check(request, "/templateAudit.htm") && media.getTemplateType() == 100>
<div class="item-add z-w100p z-mg-t10"><input id="keywords" class="z-input z-small" type="text" onkeydown="addKeywords(event);">&nbsp;&nbsp;<button class="z-button z-small z-blue" onclick="addKeywords(event);">添加</button></div>
<#else>
<#if media.getTemplateType() lt 100>
<div class="item-add z-w100p z-mg-t10"><input id="keywords" class="z-input z-small" type="text" onkeydown="addKeywords(event);">&nbsp;&nbsp;<button class="z-button z-small z-blue" onclick="addKeywords(event);">添加</button></div>
</#if>
</#if>
</div>
</li>
<li class="keyword-edit">
<div class="list-title z-mg-t5 z-mg-b15"><i></i>参数</div>
<ul class="type-list">
<li>名称:${media.getMediaName()}</li>
<li>类型:${DesignTypeDao.name(media.getTypeId())}</li>
<#if media.getTypeId()==3>
<li>P 数:${media.getPageValue()}P</li>
<#else>
<li>面数:${media.getPageValue()}</li>
</#if>
<li>版式:<#if oddEven == 0>横版<#elseif oddEven == 1>竖版</#if></li>
<li>大小(px)${media.getWidth()}X${media.getHeight()}</li>
<li>DPI${media.getDpi()}</li>
<li>模板ID${media.getMediaId()}</li>
<li>创建时间:${media.getCreateTime()}</li>
<li>更新时间:${media.getUpdateTime()}</li>
</ul>
</li>
</ul>
</div>
</div>
@@ -0,0 +1,74 @@
<#def designatedPath="/zhiqimMediaEditor/materialCatList.htm"/>
<script language="javascript">
<!--
${Scripts.doSelectBox()}
${Scripts.doClearForm()}
function doAddSysMaterial()
{//打标签
var svgId = Z.FM.getChecked("svgId");
var dialog = new Z.Dialog();
dialog.title = "添加系统素材";
dialog.url = "/addSysMaterial.htm?svgId=" + svgId;
dialog.width = 800;
dialog.height = 400;
dialog.fixed = true;
dialog.execute();
}
//-->
</script>
${zhiqim_manager_breadcrumb("用户素材列表")}
<div class="content">
<#-- 导航栏 -->
<div data-role="z-tabnav" class="z-tabnav-main z-mg-b20 z-blue">
<nav>
<ul>
<li onclick="Z.Location.href('/zhiqimMediaEditor/materialCatList.htm');">素材分类管理</li>
<li onclick="Z.Location.href('/zhiqimMediaEditor/materialSvgList.htm');">素材资源管理</li>
<li class="z-active">用户素材管理</li>
</ul>
<div class="z-float-left z-mg10">
<form name="theForm" method="post" action="/userMaterialList.htm">
<input name="designer" class="z-float-left ${zmr_color_class} z-input z-w150 z-mg-l4" value="${designer}" maxlength="16" placeholder="设计师">
<button class="z-float-left z-button z-w80 zi-bd-rd0 z-blue"><i class="z-font z-query"></i>查询</button>
</form>
</div>
<div class="z-text-right z-mg-t10 z-mg-r5">
<button class="z-button z-h30 ${zmr_color_class}" onclick="doAddSysMaterial();"><i class="z-font z-add"></i> 选为系统素材</button>
</div>
</nav>
</div>
<table class="z-table z-bordered z-bg-white z-pd6">
<tr class="z-text-center z-h40 z-bg-gray">
<td width=8%>选择</td>
<td width="10%">类型</td>
<td width="10%">分类</td>
<td width="10%">设计师</td>
<td width="10%">序号</td>
<td width="15%">关键字</td>
<td width="15%">预览图</td>
<td width="*">代码</td>
</tr>
<#if pageResult.size() == 0>
${zhiqim_manager_no_record (10, "暂时没有素材资源信息")}
</#if>
<#for item : pageResult.list()>
<tr valign="middle" bgcolor=<#if item_index % 2 == 0>${zmr_tr_odd_bgcolor}<#else>${zmr_tr_even_bgcolor}</#if> class="z-text-center z-h60">
<td><input name="svgId" type="radio" data-role="z-radio" data-class="${zmr_color_class}" value="${item.getSvgId()}"></td>
<td>${MaterialConstants.getMaterialTypeName(item.getTypeCode())}</td>
<td>${Global.get(MaterialCatCache.class).getName(item.getCatCode())}</td>
<td>${item.getDesigner()}</td>
<td>${item.getSvgSeq()}</td>
<td>${item.getKeywords()}</td>
<td></td>
<td><textarea class="z-w100p z-h100">#{item.getSvgCode()}</textarea></td>
</tr>
</#for>
</table>
${zhiqim_manager_paging (pageResult, "userMaterialList.htm")}
</div>