first commit

This commit is contained in:
2025-02-20 14:58:55 +08:00
parent 687bda5ead
commit d7be84fac6
1158 changed files with 127232 additions and 0 deletions
@@ -0,0 +1,244 @@
<script>
Z.onload(function(){
var consumerType=${Jsons.toString(order.getConsumerType())};
var labelIds=${Jsons.toString(order.getLabelIds())};
var industryId=${Jsons.toString(order.getIndustryId())};
var defaultLabel=${Jsons.toString(order.isDefaultLabel())};
var htmlstr="";
if(Z.V.isNotEmpty(consumerType)&&consumerType>0){
Z("#consumerType_"+consumerType).addClass("z-blue").siblings("button").removeClass("z-blue");
}
if(Z.V.isNotEmpty(industryId)&&defaultLabel==false){
htmlstr+='<button id="industry_'+industryId+'" type="button" class="z-button z-mg3" value="'+industryId+'" onclick="doQueryIndustryLabel('+industryId+')">'+${Jsons.toString(Global.get(DesignIndustryCache.class).getIndustryName(order.getIndustryId()))}+'</button>';
Z("#mainIndustry").html(htmlstr);
doQueryIndustryLabel(industryId);
}
if(Z.V.isNotEmpty(labelIds)){
setTimeout(function(){
var array = labelIds.split(",");
for (var i in array) {
Z("#label_"+array[i]).addClass("z-blue").siblings("button").removeClass("z-blue");
}
},500);
}
});
//标签选择客户类型
function doSelectConsumerType(flag){
Z("#consumerType_"+flag).addClass("z-blue").siblings("button").removeClass("z-blue");
}
//通过关键词查主行业
function doQueryIndustryByKey(){
var industryKey=Z("#industryKey").val();
var labelOid = Z("#labelOid").val();
var unmatchkey=Z("#unmatchkey").val();
var ajax = new Z.Ajax();
ajax.setClassName("TemplateOrderPresenter");
ajax.setMethodName("doQueryIndustryByKey");
ajax.addParam("industryKey",industryKey);
ajax.addParam("labelOid",labelOid);
ajax.addParam("unmatchkey",unmatchkey);
ajax.setFailureAlert();
ajax.setSuccess(function(){
var map=Z.J.toObject(this.responseText);
var industrys=map.industrys;
var newUnmatchkey=map.unmatchkey;
var htmlstr="";
Z.each(industrys, function(industry, i){
htmlstr+='<button id="industry_'+industry.industryId+'" type="button" class="z-button z-mg3 main-industry" value="'+industry.industryId+'" onclick="doQueryIndustryLabel('+industry.industryId+')">'+industry.industryName+'</button>';
});
Z("#mainIndustry").html(htmlstr);
Z("#subIndustry").html("");
Z("#applicationScenario").html("");
Z("#designStyle").html("");
Z("#unmatchkey").val(newUnmatchkey);
// 推荐行业页面元素遍历拼接
var recommendIndHtml = "";
var recommendIndustrys = map.recommendIndustryList;
Z.each(recommendIndustrys, function(industry, i){
recommendIndHtml += '<button id="recommend_industry_'+industry.industryId+'" type="button" class="z-button z-mg3 recommend-industry" value="'+industry.industryId+'" onclick="doQueryIndustryLabel('+industry.industryId+', 1)">'+industry.industryName+'</button>';
});
Z("#recommendIndustry").html(recommendIndHtml);
});
ajax.setLoading("queryIndustryByKey", '<i class="z-font z-return"></i>正在处理',{disabled:true});
ajax.execute();
}
function doQueryOrderLabel(mediaId){
var ajax = new Z.Ajax();
ajax.setClassName("TemplateOrderPresenter");
ajax.setMethodName("doTemplateOrderLabelQuery");
ajax.addParam("mediaId", mediaId);
ajax.setCallback("side_label");
ajax.setLoading("side_label");
ajax.execute();
}
//查询标签
function doQueryIndustryLabel(industryId, isRecommend){
if(isRecommend)
{
Z("#recommend_industry_"+industryId).addClass("z-blue").siblings("button").removeClass("z-blue");
Z(".main-industry").removeClass("z-blue");
}
else
{
Z("#industry_"+industryId).addClass("z-blue").siblings("button").removeClass("z-blue");
Z(".recommend-industry").removeClass("z-blue");
}
var ajax = new Z.Ajax();
ajax.setClassName("TemplateOrderPresenter");
ajax.setMethodName("doQueryIndustryLabel");
ajax.addParam("industryId",industryId);
ajax.setFailureAlert();
ajax.setSuccess(function(){
var map=Z.J.toObject(this.responseText);
var htmlSI="";
var htmlAS="";
var htmlDS="";
var labelList=map.labelList;
var dimensionList=map.dimensionList;
var dimensionMap=new Map();
for (var i in dimensionList) {
dimensionMap.set(dimensionList[i].dimensionId,dimensionList[i].dimensionName);
}
Z.each(labelList, function(label, i){
if("子行业"==dimensionMap.get(label.dimensionId)){
htmlSI+='<button id="label_'+label.id+'" type="button" class="z-button z-mg3" value="'+label.id+'" onclick="doLabelSelected('+label.id+')">'+label.labelName+'</button>';
}
if("应用场景"==dimensionMap.get(label.dimensionId)){
htmlAS+='<button id="label_'+label.id+'" type="button" class="z-button z-mg3" value="'+label.id+'" onclick="doLabelSelected('+label.id+')">'+label.labelName+'</button>';
}
if("设计风格"==dimensionMap.get(label.dimensionId)){
htmlDS+='<button id="label_'+label.id+'" type="button" class="z-button z-mg3" value="'+label.id+'" onclick="doLabelSelected('+label.id+')">'+label.labelName+'</button>';
}
});
Z("#subIndustry").html(htmlSI);
Z("#applicationScenario").html(htmlAS);
Z("#designStyle").html(htmlDS);
});
ajax.execute();
}
//选择标签
function doLabelSelected(id){
Z("#label_"+id).addClass("z-blue").siblings("button").removeClass("z-blue");
}
//提交
function doSaveLabel(){
var unmatchkey=Z("#unmatchkey").val();
var mark=Z("#mark").val();
var labelOid = Z("#labelOid").val();
var mediaId=Z("#mediaId").val();
var consumerType=Z("button[id^='consumerType'][class*='z-blue']").val();//客户类型
var industryId=Z("div[id='mainIndustry'] button[class*='z-blue']").val();//主行业
// 如果选择了推荐行业则保存时替换为主行业id
var recommendIndustryId = Z("div[id='recommendIndustry'] button[class*='z-blue']").val();// 推荐行业
if (!industryId)
{
if (Z.V.isEmpty(recommendIndustryId))
{
Z.alert("请选择主行业或者推荐行业");
return;
}
industryId = recommendIndustryId;
}
var subIndustryId=Z("div[id='subIndustry'] button[class*='z-blue']").val();//子行业
var applicationScenarioId=Z("div[id='applicationScenario'] button[class*='z-blue']").val();//应用场景
var designStyleId=Z("div[id='designStyle'] button[class*='z-blue']").val();//设计风格
var ajax = new Z.Ajax();
ajax.setClassName("TemplateOrderPresenter");
ajax.setMethodName("doSaveIndustryLabel");
ajax.addParam("labelOid",labelOid);
ajax.addParam("consumerType",consumerType);
ajax.addParam("industryId",industryId);
ajax.addParam("subIndustryId",subIndustryId);
ajax.addParam("applicationScenarioId",applicationScenarioId);
ajax.addParam("designStyleId",designStyleId);
ajax.addParam("unmatchkey",unmatchkey);
ajax.addParam("flag",1);
ajax.setFailureAlert();
ajax.setSuccess(function(){
Z("#unmatchkey").val("");
if(mark==1){
window.parent.doDraftOrderToComplete(labelOid);
parent.Z.Dialog.close();
}else if(mark!=1&&mediaId>0){
window.parent.doPreviewFinalOrderTempalte(mediaId);
parent.Z.Dialog.close();
}else{
Z.alert("模板不存在!")
}
});
ajax.setLoading("saveLabel", '<i class="z-font z-return"></i>正在处理',{disabled:true});
ajax.execute();
}
</script>
<input id="mark" type="hidden" value="${mark}">
<input id="labelOid" type="hidden" value="${order.getDesignId()}">
<input id="mediaId" type="hidden" value="${mediaId}">
<input id="unmatchkey" type="hidden" value="">
<table class="z-table z-bordered z-bg-white">
<tr class="z-h40">
<td align="center" colspan="2">行业关键词:</td>
<td colspan="4">
<input id="industryKey" name="industryKey" class="z-input z-w400" placeholder="请输入行业关键词" >
<button id="queryIndustryByKey" type="button" class="z-button z-blue" onclick="doQueryIndustryByKey()">匹配</button>
</td>
</tr>
<tr class="z-h40">
<td align="center" colspan="2">主行业:</td>
<td colspan="4">
<div id="mainIndustry" class="z-show-ib z-w100p"></div>
</td>
</tr>
<tr class="z-h40">
<td align="center" colspan="2">推荐行业:</td>
<td colspan="4">
<div id="recommendIndustry" class="z-show-ib z-w100p"></div>
</td>
</tr>
<tr class="z-h40">
<td align="center" colspan="2">子行业:</td>
<td colspan="4">
<div id="subIndustry" class="z-show-ib z-w100p"></div>
</td>
</tr>
<tr class="z-h40">
<td align="center" colspan="2">应用场景:</td>
<td colspan="4">
<div id="applicationScenario" class="z-show-ib z-w100p"></div>
</td>
</tr>
<tr class="z-h40">
<td align="center" colspan="2">设计风格:</td>
<td colspan="4">
<div id="designStyle" class="z-show-ib z-w100p"></div>
</td>
</tr>
<tr class="z-h40">
<td align="center" colspan="2">客户类型:</td>
<td colspan="4">
<div class="z-show-ib z-w100p">
<#for item : Global.get(CustomerTypeCache.class).getCustomerTypeCacheAll()>
<button id="consumerType_${item.getCustomerTypeId()}" name="consumerType" type="button" class="z-button <#if order.getConsumerType()==item.getCustomerTypeId()>z-blue</#if>" value="${item.getCustomerTypeId()}" onclick="doSelectConsumerType(${item.getCustomerTypeId()})">${item.getCustomerTypeName()}</button>
</#for>
</div>
</td>
</tr>
</table>
<#-- 操作 -->
<div class="z-relative z-w100p z-h60 z-text-center z-bg-gray z-pd10" style="bottom:0;left:0">
<button type="button" id="saveLabel" class="z-button ${zmr_color_class} z-large z-w150" onclick="doSaveLabel();" >确认</button>&nbsp;&nbsp;
<button type="button" class="z-button z-large z-mg-l10 z-w100" onclick="parent.Z.Dialog.close();">关闭</button>
</div>
@@ -0,0 +1,120 @@
<div class="z-tabnav z-bordered z-pd-t20" style="position:static;">
<nav>
<ul>
<li id="tabnav_user" class="z-active" onclick="doTabnavCss('1')">客户资料</li>
<li id="tabnav_template" onclick="doTabnavCss('2')">已选模板</li>
</ul>
</nav>
<section style="position:static;">
<div id="tabnav_user_content" class="z-active z-pd10" style="position:static;">
<div class="z-color-666 z-lh25 z-mg-t10 z-mg-b10">
<#if ZmrPathRule.check(request, "openWangWang")><button class="z-button z-mg-r3 ${zmr_color_class}" onclick="openWangWang('${order.getBuyerNick()}');"><img src="/zinc/images/wangwang.png">旺旺联系</button></#if>
<#if ZmrPathRule.check(request, "openQQ")><button class="z-button z-mg-r3 ${zmr_color_class}" onclick="openQQ('${order.getUserQq()}');"><img src="/zinc/images/qq.png">QQ联系</button></#if>
</div>
<div class="z-color-666 z-lh25"><b>订单号</b>${order.getDesignId()}</div>
<div class="z-color-666 z-lh25"><b>产品名</b>${order.getOrderText()}</div>
<#-- 客户素材 -->
<div class="z-color-666 z-lh25 z-mg-t10 z-mg-b10">
<table class="z-table">
<tr>
<td>
<div class="z-tabnav">
<nav>
<ul>
<li id="tabnav_userText" class="z-active" onclick="doTabnavCss('3')">客户文本</li>
<li id="tabnav_paramText" onclick="doTabnavCss('4')">参数文本</li>
</ul>
</nav>
<section>
<div id="tabnav_userText_content" class="z-active z-pd10" style="position:static;">
<textarea class="z-textarea z-w100p z-h150" placeholder="客户文本">${order.getUserText()}
${desOrder.getOcrText()}</textarea>
</div>
<div id="tabnav_paramText_content" class="z-pd10" style="position:static;">
<textarea class="z-textarea z-w100p z-h150" placeholder="参数文本">${desOrder.getParamText()}</textarea>
</div>
</section>
</div>
</td>
</tr>
<tr class="z-h30">
<td><b>客户素材</b></td>
</tr>
<#for atta : attaList>
<tr class="z-h30">
<td><a onclick="doDownFile('${atta.getAttaId()}')">${atta.getFileName()}</a></td>
</tr>
</#for>
</table>
</div>
<#-- 联系旺旺&联系QQ弹窗框 -->
<iframe id="openFrm" class="z-hide" src="about:blank"></iframe>
</div>
<!--模板信息-->
<div id="tabnav_template_content" class="z-pd10 z-text-left" style="position:static;">
<div class="bjbox">
<div class="zi-w100p z-pd-b10 z-text-center z-bg-white bjimg materialListShow" id="order_result">
<#for key : svgMap.keySet()>
<#var item = svgMap.get(key)/>
<div class="itemWrap zi-w50p z-pd5 z-float-left z-clearfix z-pd5 z-relative z-pointer <#if mediaId == item.getMediaId()>selected</#if>" style="height:25%;margin:0;">
<div class="z-w100p z-relative z-pd5 z-h100p z-bd svgLength_${item.getTotalPage()}">
<#for bg : item.getBgList()>
<#if bg_index lt 2>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 ${item.getWidth()} ${item.getHeight()}">${bg.getSvgCode()}</svg>
</#if>
<#if mediaId != item.getMediaId()>
<#if bg_index == 0>
<span class="z-absolute z-l0 z-text-center z-w100p z-mg-t-10"><a onclick="doCopyOtherPage('${item.getMediaId()}', ${bg.getBid()}, '${mediaId}');">复制正面</a></span>
</#if>
<#if bg_index == 1>
<span class="z-absolute z-l0 z-text-center z-w100p z-mg-t-15"><a onclick="doCopyOtherPage('${item.getMediaId()}', ${bg.getBid()}, '${mediaId}');">复制反面</a></span>
</#if>
</#if>
</#for>
</div>
<#if mediaId != item.getMediaId()>
<span class="itemCtrBar z-absolute z-w100p z-pd10">
<a class="z-float-left" onclick="doTemplateOrderEdit('${key}')">编辑</a>
<a class="z-float-right" onclick="doTemplateOrderDelete('${key}', '${order.getDesignId()}')">删除</a>
</span>
</#if>
</div>
</#for>
</div>
</div>
</div>
</section>
</div>
<style>
#side_order{text-align:left;}
#side_order .z-button{color:#ffffff;background-color:#28a3ef;border:1px solid #1299ec;}
#side_order .materialListShow > .itemWrap.selected > div{border-color:#00a2eb;}
#side_order .materialListShow > .itemWrap > div > svg{display:block;max-width:100%;max-height:100%;min-height:50%;margin:0 auto;}
#side_order .materialListShow > .itemWrap > div > svg:nth-child(2){margin-top:1px;}
#side_order .materialListShow > .itemWrap > .svgLength_1::before{display:inline-block;height:100%;width:0;vertical-align:middle;}
#side_order .materialListShow > .itemWrap > .svgLength_1 > svg{display:inline-block;vertical-align:middle;}
#side_order .materialListShow > .itemWrap > .svgLength_2 > svg{height:50%;}
#side_order .materialListShow > .itemWrap .itemCtrBar{left:0;top:0;}
#side_order .materialListShow > .itemWrap .itemCtrBar > a{position:absolute;padding:2px 5px;background:rgba(0,0,0,.2);color:#ffffff;font-size:12px;display:none;top:10px;}
#side_order .materialListShow > .itemWrap .itemCtrBar > a:first-child{left:10px;}
#side_order .materialListShow > .itemWrap .itemCtrBar > a:last-child{right:10px;}
#side_order .materialListShow > .itemWrap .itemCtrBar > a:hover{background:rgba(0,0,0,.5);}
#side_order .materialListShow > .itemWrap:hover .itemCtrBar > a{display:block;}
</style>
<script>
var $thisSider = Z("#side_order");
var outerWrapHeight = parseFloat(Z("#sidebar>.sidebar-child").css("height"));
var thisSiderTop = $thisSider.offsetTop();
var innerWrapTop = $thisSider.find(".bjbox").offsetTop();
var $materialList = $thisSider.find(".materialListShow");
var materialListTop = $materialList.offsetTop();
var setHeight = outerWrapHeight - thisSiderTop - innerWrapTop - materialListTop - 15;
$materialList.css("height", setHeight);
</script>
@@ -0,0 +1,65 @@
<script>
Z.onload(function(){
var consumerType=${Jsons.toString(order.getConsumerType())};
var labelIds=${Jsons.toString(order.getLabelIds())};
var industryId=${Jsons.toString(order.getIndustryId())};
var defaultLabel=${Jsons.toString(order.isDefaultLabel())};
var htmlstr="";
if(Z.V.isNotEmpty(consumerType)&&consumerType>0){
Z("#consumerType_"+consumerType).addClass("z-blue").siblings("button").removeClass("z-blue");
}
if(Z.V.isNotEmpty(industryId)&&defaultLabel==false){
htmlstr+='<button id="industry_'+industryId+'" type="button" class="z-button z-mg3" value="'+industryId+'" onclick="doQueryIndustryLabel('+industryId+')">'+${Jsons.toString(Global.get(DesignIndustryCache.class).getIndustryName(order.getIndustryId()))}+'</button>';
Z("#mainIndustry").html(htmlstr);
doQueryIndustryLabel(industryId);
}
if(Z.V.isNotEmpty(labelIds)){
setTimeout(function(){
var array = labelIds.split(",");
for (var i in array) {
Z("#label_"+array[i]).addClass("z-blue").siblings("button").removeClass("z-blue");
}
},500);
}
});
</script>
<input id="labelOid" type="hidden" value="${order.getDesignId()}">
<input id="unmatchkey" type="hidden" value="">
<div>
<p class="list-title z-mg-b10">客户类型</p>
<div class="z-show-ib z-w100p">
<#for item : Global.get(CustomerTypeCache.class).getCustomerTypeCacheAll()>
<button id="consumerType_${item.getCustomerTypeId()}" name="consumerType" type="button" class="z-button <#if order.getConsumerType()==item.getCustomerTypeId()>z-blue</#if>" value="${item.getCustomerTypeId()}" onclick="doSelectConsumerType(${item.getCustomerTypeId()})">${item.getCustomerTypeName()}</button>
</#for>
</div>
</div>
<div>
<p class="list-title z-mg-b10">行业关键词</p>
<div class="z-show-ib z-w100p">
<input id="industryKey" class="z-input z-w150"><button id="queryIndustryByKey" type="button" class="z-button z-blue" onclick="doQueryIndustryByKey()">匹配</button>
</div>
</div>
<div>
<p class="list-title z-mg-b10">主行业</p>
<div id="mainIndustry" class="z-show-ib z-w100p"></div>
</div>
<div>
<p class="list-title z-mg-b10">推荐行业</p>
<div id="recommendIndustry" class="z-show-ib z-w100p"></div>
</div>
<div>
<p class="list-title z-mg-b10">子行业</p>
<div id="subIndustry" class="z-show-ib z-w100p"></div>
</div>
<div>
<p class="list-title z-mg-b10">应用场景</p>
<div id="applicationScenario" class="z-show-ib z-w100p"></div>
</div>
<div>
<p class="list-title z-mg-b10">设计风格</p>
<div id="designStyle" class="z-show-ib z-w100p"></div>
</div>
<div class="z-mg10" style="text-align:center;">
<button id="saveLabel" type="button" class="z-button z-blue" onclick="doSaveLabel()">保存</button>
<button type="button" class="z-button" onclick="doCancelLabel()">取消</button>
</div>