templateOrderLabel.zml 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <script>
  2. Z.onload(function(){
  3. var consumerType=${Jsons.toString(order.getConsumerType())};
  4. var labelIds=${Jsons.toString(order.getLabelIds())};
  5. var industryId=${Jsons.toString(order.getIndustryId())};
  6. var defaultLabel=${Jsons.toString(order.isDefaultLabel())};
  7. var htmlstr="";
  8. if(Z.V.isNotEmpty(consumerType)&&consumerType>0){
  9. Z("#consumerType_"+consumerType).addClass("z-blue").siblings("button").removeClass("z-blue");
  10. }
  11. if(Z.V.isNotEmpty(industryId)&&defaultLabel==false){
  12. 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>';
  13. Z("#mainIndustry").html(htmlstr);
  14. doQueryIndustryLabel(industryId);
  15. }
  16. if(Z.V.isNotEmpty(labelIds)){
  17. setTimeout(function(){
  18. var array = labelIds.split(",");
  19. for (var i in array) {
  20. Z("#label_"+array[i]).addClass("z-blue").siblings("button").removeClass("z-blue");
  21. }
  22. },500);
  23. }
  24. });
  25. </script>
  26. <input id="labelOid" type="hidden" value="${order.getDesignId()}">
  27. <input id="unmatchkey" type="hidden" value="">
  28. <div>
  29. <p class="list-title z-mg-b10">客户类型</p>
  30. <div class="z-show-ib z-w100p">
  31. <#for item : Global.get(CustomerTypeCache.class).getCustomerTypeCacheAll()>
  32. <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>
  33. </#for>
  34. </div>
  35. </div>
  36. <div>
  37. <p class="list-title z-mg-b10">行业关键词</p>
  38. <div class="z-show-ib z-w100p">
  39. <input id="industryKey" class="z-input z-w150"><button id="queryIndustryByKey" type="button" class="z-button z-blue" onclick="doQueryIndustryByKey()">匹配</button>
  40. </div>
  41. </div>
  42. <div>
  43. <p class="list-title z-mg-b10">主行业</p>
  44. <div id="mainIndustry" class="z-show-ib z-w100p"></div>
  45. </div>
  46. <div>
  47. <p class="list-title z-mg-b10">推荐行业</p>
  48. <div id="recommendIndustry" class="z-show-ib z-w100p"></div>
  49. </div>
  50. <div>
  51. <p class="list-title z-mg-b10">子行业</p>
  52. <div id="subIndustry" class="z-show-ib z-w100p"></div>
  53. </div>
  54. <div>
  55. <p class="list-title z-mg-b10">应用场景</p>
  56. <div id="applicationScenario" class="z-show-ib z-w100p"></div>
  57. </div>
  58. <div>
  59. <p class="list-title z-mg-b10">设计风格</p>
  60. <div id="designStyle" class="z-show-ib z-w100p"></div>
  61. </div>
  62. <div class="z-mg10" style="text-align:center;">
  63. <button id="saveLabel" type="button" class="z-button z-blue" onclick="doSaveLabel()">保存</button>
  64. <button type="button" class="z-button" onclick="doCancelLabel()">取消</button>
  65. </div>