first commit
This commit is contained in:
@@ -0,0 +1,318 @@
|
||||
<!--电子名片 -->
|
||||
${request.getValidateScript()}
|
||||
${Mydome()}
|
||||
<script>
|
||||
Z.onload(function()
|
||||
{
|
||||
doDzmpListQuery();
|
||||
});
|
||||
|
||||
/**
|
||||
* 根据设计平台订单id创建默认名片
|
||||
*/
|
||||
function doCreateDefaultCard(designId)
|
||||
{
|
||||
// 给电子名片订单创建模板信息
|
||||
var ajax = new Z.Ajax();
|
||||
ajax.setClassName("TemplatePreviewPresenter");
|
||||
ajax.setMethodName("doCreateOrderTemplate");
|
||||
ajax.addParam("designId", '${designId}');
|
||||
ajax.setFailureAlert();
|
||||
ajax.setSuccess(function()
|
||||
{
|
||||
var obj = Z.J.toObject(this.responseText);
|
||||
var mediaId = obj.mediaId;
|
||||
var designWidth = obj.designWidth;
|
||||
var designHeight = obj.designHeight;
|
||||
var printWidth = obj.printWidth;
|
||||
var printHeight = obj.printHeight;
|
||||
var printKs = obj.printKs;
|
||||
var printMs = obj.printMs;
|
||||
var bleedSize = obj.bleedSize;
|
||||
var orderIsCardType = obj.orderIsCardType;
|
||||
|
||||
// 在设计平台创建默认名片【并保存mediaId】
|
||||
var _ajax = new Z.Ajax();
|
||||
_ajax.setClassName("DzmpEditorSupportPresenter");
|
||||
_ajax.setMethodName("createDefaultCard");
|
||||
_ajax.addParam("designId", '${designId}');
|
||||
_ajax.addParam("mediaId", mediaId);
|
||||
_ajax.setFailureAlert();
|
||||
_ajax.setSuccess(function()
|
||||
{
|
||||
var rsltObj = Z.J.toObject(this.responseText);
|
||||
var cardId = rsltObj.cardId;
|
||||
|
||||
// 跳转电子名片编辑器逻辑
|
||||
if (cardId)
|
||||
{
|
||||
var newLink = "/zhiqimMediaEditor/mediaDesign.htm?";
|
||||
newLink += "mediaId=" + mediaId + "&";
|
||||
newLink += "designWidth=" + designWidth + "&";
|
||||
newLink += "designHeight=" + designHeight + "&";
|
||||
newLink += "printWidth=" + printWidth + "&";
|
||||
newLink += "printHeight=" + printHeight + "&";
|
||||
newLink += "bleedSize=" + bleedSize + "&";
|
||||
newLink += "orderIsCardType=" + orderIsCardType + "&";
|
||||
newLink += "cardId=" + cardId + "&";
|
||||
newLink += "designId=" + '${designId}';
|
||||
window.open(newLink);
|
||||
window.location.reload();
|
||||
}
|
||||
});
|
||||
_ajax.execute();
|
||||
|
||||
});
|
||||
ajax.execute();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询名片列表
|
||||
*/
|
||||
function doDzmpListQuery()
|
||||
{
|
||||
var ajax = new Z.Ajax();
|
||||
ajax.setClassName("DzmpEditorSupportPresenter");
|
||||
ajax.setMethodName("queryCardList");
|
||||
ajax.addParam("designId", "${designId}");
|
||||
ajax.setCallback("templateResult");
|
||||
ajax.setLoading("templateResult");
|
||||
ajax.execute();
|
||||
}
|
||||
|
||||
function doHistoryTemplateQuery()
|
||||
{
|
||||
var _ajax = new Z.Ajax();
|
||||
_ajax.setClassName("DzmpEditorSupportPresenter");
|
||||
_ajax.setMethodName("doHistoryTemplateQuery");
|
||||
_ajax.addParam("buyerNick", '${order.getBuyerNick()}');
|
||||
_ajax.setCallback("templateResult");
|
||||
_ajax.setLoading("templateResult");
|
||||
_ajax.execute();
|
||||
}
|
||||
|
||||
function doSelectHistoryTemplate(id)
|
||||
{
|
||||
var ajax = new Z.Ajax();
|
||||
ajax.setClassName("DzmpEditorSupportPresenter");
|
||||
ajax.setMethodName("doSelectHistoryTemplate");
|
||||
ajax.addParam("id", id);
|
||||
ajax.addParam("designId", ${order.getDesignId()});
|
||||
ajax.setFailureAlert();
|
||||
ajax.setSuccess(function(){
|
||||
Z.success("复制成功!",function(){
|
||||
Z("#cardList").click();
|
||||
});
|
||||
});
|
||||
ajax.setLoading("sel_"+id);
|
||||
ajax.execute();
|
||||
}
|
||||
|
||||
// 前往编辑电子名片
|
||||
function goDzmpCardEdit(cardId, mediaId)
|
||||
{
|
||||
if(Z.V.isEmpty(cardId))
|
||||
{
|
||||
Z.alert("未获取到名片id");
|
||||
return;
|
||||
}
|
||||
if(Z.V.isEmpty(mediaId))
|
||||
{
|
||||
Z.alert("未获取到mediaId");
|
||||
return;
|
||||
}
|
||||
|
||||
// 跳转电子名片编辑器逻辑
|
||||
var newLink = "/zhiqimMediaEditor/mediaDesign.htm?";
|
||||
newLink += "mediaId=" + mediaId + "&";
|
||||
newLink += "designWidth=" + ${typeItem.getSizeMWidth()} + "&";
|
||||
newLink += "designHeight=" + ${typeItem.getSizeMHeight()} + "&";
|
||||
newLink += "printWidth=" + ${order.getPrintWidth()} + "&";
|
||||
newLink += "printHeight=" + ${order.getPrintHeight()} + "&";
|
||||
newLink += "bleedSize=" + ${typeItem.getBleeding()} + "&";
|
||||
newLink += "cardId=" + cardId + "&";
|
||||
newLink += "designId=" + '${designId}' + "&";
|
||||
newLink += "orderIsCardType=" + '${orderIsCardType}';
|
||||
window.open(newLink);
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
// 删除电子名片【同时删除对应的模板信息】
|
||||
function doDzmpCardDelete(cardId, mediaId)
|
||||
{
|
||||
if(Z.V.isEmpty(cardId))
|
||||
{
|
||||
Z.alert("未获取到名片id");
|
||||
return;
|
||||
}
|
||||
|
||||
Z.confirm("你确定要删除该名片吗?", function(){
|
||||
var ajax = new Z.Ajax();
|
||||
ajax.setClassName("DzmpEditorSupportPresenter");
|
||||
ajax.setMethodName("deleteCardById");
|
||||
ajax.addParam("cardId", cardId);
|
||||
ajax.setFailureAlert();
|
||||
ajax.setSuccess(function(){
|
||||
Z("#sel_" + cardId).remove();
|
||||
Z.tips("删除成功");
|
||||
|
||||
// 删除模板信息
|
||||
if(!Z.V.isEmpty(mediaId))
|
||||
{
|
||||
var _ajax = new Z.Ajax();
|
||||
_ajax.setClassName("TemplatePresenter");
|
||||
_ajax.setMethodName("doTemplateDelete");
|
||||
_ajax.addParam("mediaId", mediaId);
|
||||
_ajax.addParam("designId", '${designId}');
|
||||
_ajax.setFailureAlert();
|
||||
_ajax.setSuccess(function(){});
|
||||
_ajax.execute();
|
||||
}
|
||||
});
|
||||
ajax.execute();
|
||||
});
|
||||
}
|
||||
|
||||
function doDzmpCardCopy(cardId, mediaId)
|
||||
{//复制电子名片模板
|
||||
var ajax = new Z.Ajax();
|
||||
ajax.setClassName("DzmpEditorSupportPresenter");
|
||||
ajax.setMethodName("doSelectHistoryTemplate");
|
||||
ajax.addParam("id", cardId);
|
||||
ajax.addParam("designId", ${order.getDesignId()});
|
||||
ajax.setFailureAlert();
|
||||
ajax.setSuccess(function(){
|
||||
Z.success("复制成功!",function(){
|
||||
Z("#cardList").click();
|
||||
});
|
||||
});
|
||||
ajax.setLoading("sel_"+cardId);
|
||||
ajax.execute();
|
||||
}
|
||||
|
||||
|
||||
//修改行业
|
||||
function doModifyIndustry()
|
||||
{
|
||||
var designId = Z("#designId").text();
|
||||
if(Z.V.isEmpty(designId))
|
||||
{
|
||||
Z.alert("请选择一条订单");
|
||||
return;
|
||||
}
|
||||
var dialog = new Z.Dialog();
|
||||
dialog.title = "修改行业";
|
||||
dialog.url = "/modifyIndustry.htm?designId="+designId+"&flag=1";
|
||||
dialog.width = 500;
|
||||
dialog.height = 300;
|
||||
dialog.execute();
|
||||
}
|
||||
|
||||
//修改刷新行业信息
|
||||
function doReFreshIndustryInfo()
|
||||
{
|
||||
var ajax = new Z.Ajax();
|
||||
ajax.setClassName("TemplatePreviewPresenter");
|
||||
ajax.setMethodName("doReFreshIndustryInfo");
|
||||
ajax.addParam("designId", "${designId}");
|
||||
ajax.setFailureAlert();
|
||||
ajax.setSuccess(function(){
|
||||
var obj = Z.J.toObject(this.responseText);
|
||||
Z("#industryName").html(obj);
|
||||
});
|
||||
ajax.execute();
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
body{height:100%;}
|
||||
/*图片展示区*/
|
||||
.container{min-height:auto;background-color:#ffffff;}
|
||||
.mainbody{height:100%;}
|
||||
.content{height:calc(100% - 40px);overflow-y:auto;}
|
||||
form[name="theForm"]{float:left;width:100%;}
|
||||
/* tab标签 */
|
||||
.svgTemplateList .itemCtrBar{left:0;top:0;}
|
||||
#svgTemplateWrap{height:calc(100% - 176px)}
|
||||
#templateTab{float:none;}
|
||||
|
||||
/*内容盒子*/
|
||||
#svgTemplateWrap > section{height:calc(100% - 50px);background:#ffffff;border:1px solid #dcdcdc;border-top:none;}
|
||||
/*模板列表*/
|
||||
.svgTemplateList{width:100%;height:100%;column-count:4;}
|
||||
.svgTemplateList .svgTemplateItem{width:100%;height:100%;text-align:center;padding:5px;background:#fff;border:1px solid #ccc;overflow:auto; position: relative;margin-bottom: 15px;}
|
||||
|
||||
.svgTemplateItem > .templateItemBtn{padding:10%;left:0;top:0;display:flex;justify-content:space-around;align-items:center;align-content:center;}
|
||||
.svgTemplateItem > .templateItemBtn .z-button{display:none;}
|
||||
.svgTemplateItem > .templateItemBtn:hover{background:rgba(0,0,0,.2);}
|
||||
.svgTemplateItem > .templateItemBtn:hover .z-button{display:inline-block;}
|
||||
.svgTemplateItem .itemSelectedSign{display:none;width:0;height:0;right:5px;bottom:5px;border-width:30px;border-style:solid;border-color:transparent #28a3ef #28a3ef transparent;}
|
||||
.svgTemplateItem .itemSelectedSign > span{white-space:nowrap;left:-5px;color:#fff;top:5px;}
|
||||
.svgTemplateItem.selected .itemSelectedSign{display:block;}
|
||||
|
||||
.showSvg {pointer-events:none;display: block;margin-top:2px;}
|
||||
.showSvg:first-child{margin-top:0;}
|
||||
.showSvg > svg {width:100%;height: auto;}
|
||||
|
||||
/** 选中样式 **/
|
||||
.svgTemplateItem.selected{}
|
||||
</style>
|
||||
|
||||
${zhiqim_manager_breadcrumb_parent("/designOrder.htm", "设计订单", "订单模板设计")}
|
||||
<div class="content">
|
||||
${Scripts.src("/zinc/js/global_2019010801.js")}
|
||||
${Scripts.src("/zinc/js/zhiqim_search_auto_list.js")}
|
||||
|
||||
<div class="z-tabnav-main z-blue z-mg-b10" style=" width: 478px;height: 44px; float:none">
|
||||
<nav>
|
||||
<div class="z-float-left z-mg10">
|
||||
<button name="button" class="z-button z-mg-r20" onclick="Z.Location.href('${srcUrl}');"><i class="z-font z-return"></i>返回列表</button>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<#-- 导航栏 -->
|
||||
<div class="boxs">
|
||||
<div class="bos z-blue">
|
||||
<nav>
|
||||
<div class="bos_son z-mg10 z-lh30">
|
||||
<span class="my_spans z-mg-r10">订单号:<span id="designId" >${order.getDesignId()}</span><br/>
|
||||
<span class=" z-mg-r10">产品信息:${order.getOrderText()}</span>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<#-- 替换参数 -->
|
||||
<div class="bos_two">
|
||||
<div class="bos_two_one">
|
||||
<p class="text"> 客户文本</p>
|
||||
<textarea name="userText" id="userText" class="my-textarea">${order.getUserText()}</textarea>
|
||||
</div>
|
||||
<div class="bos_two_one" style="margin-top: 170px;">
|
||||
<p class="text">注意事项</p>
|
||||
<textarea name="userNotice" id="userNotice" class="my-textarea">${order.getUserNotice()}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<#-- 导航栏 -->
|
||||
<div class="boxs_two">
|
||||
<div id="svgTemplateWrap" style="height: 45px;" >
|
||||
<div id="templateTab" style="height: 45px;" class="boxs_sons z-tabnav-main z-blue">
|
||||
<nav>
|
||||
<ul style="border: 1px solid #dcdcdc; height: 45px;border-right:none;">
|
||||
<li data-type="" style="width: 130px;" class="z-active" id="cardList" onclick="Z(this).addClass('z-active').siblings('li').removeClass('z-active');doDzmpListQuery();">名片列表</li>
|
||||
<li data-type="historyTemplate" style="width: 160px;" onclick="Z(this).addClass('z-active').siblings('li').removeClass('z-active');doHistoryTemplateQuery();">客户历史模板</li>
|
||||
</ul>
|
||||
|
||||
<span style="margin:0; height: 35px" id="createCardSpan" class="my_z-float-rights">
|
||||
<button style="margin-left: 16px;" name="button" class="z-button ${zmr_color_class} mystyle" onclick="doCreateDefaultCard('${order.getDesignId()}')" ><i class="z-font z-add"></i>创建名片</button>
|
||||
</span>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top: 20px;" id="templateResult" class="mystyle_svg z-active z-text-center"></div>
|
||||
</div>
|
||||
|
||||
${zhiqim_manager_content_end()}
|
||||
<#-- 联系旺旺&联系QQ弹窗框 -->
|
||||
<iframe id="openFrm" class="z-hide" src="about:blank"></iframe>
|
||||
Reference in New Issue
Block a user