designerSubscribe.zml 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <script>
  2. function showToggle(dutyTime,subscribeNum = 0,recordId = 0)
  3. {//修改
  4. var addreasonTile = '';
  5. var content = '<form name="addForm" action="javascript:void(0)" style="text-align: center;">';
  6. content += '<input name="recordId" type="hidden" value="'+recordId+'">';
  7. content += '<input name="dutyTime" type="hidden" value="'+dutyTime+'">';
  8. content += '<input name="maxQuota" type="hidden" value="'+${maxQuota}+'">';
  9. content += '<table class="z-table z-bordered z-h40-tr z-pd6 z-bg-white z-text-center">';
  10. var height = 200;
  11. content += ' <tr>';
  12. content += ' <td>预约数量:</td>';
  13. content += ' <td><input value="' + (subscribeNum?subscribeNum:"") + '" name="subscribeNum" class="z-input z-w200"></td>';
  14. content += ' </tr>';
  15. content += '</table>';
  16. content += '<span style="color:#ea4a36;">注:未达成预约目标将会降低预约达成率,从而影响订单预约上限,请认真对待!</span>';
  17. content += '<div class="z-absolute z-b0 z-l0 z-w100p z-h60 z-pd10 z-bg-gray z-text-center">';
  18. content += ' <button id="addSubcribeBtn" class="z-button z-large z-w150 z-blue" onclick="doToggle(this.form)">保存</button>';
  19. content += ' <button class="z-button z-large z-w70 z-mg-l10" onclick="Z.Dialog.close(location.hash);">取消</button>';
  20. content += '</div>';
  21. content += '</form>';
  22. var dialog = Z.dialog({id:'modifyreason', title:'<span id="addSubcribeTile"></span>', text:'<div id="addSubcribeContent"></div>',width:460,height:height, shadow:true});
  23. Z("#addSubcribeContent").htmlc(content);
  24. Z("#addSubcribeTile").htmlc("订单预约");
  25. }
  26. function doToggle(form)
  27. {
  28. var ajax = new Z.Ajax();
  29. ajax.setClassName("DesignerSubscribePresenter");
  30. ajax.setMethodName("doToggle");
  31. ajax.setParamForm(form);
  32. ajax.setFailureAlert();
  33. ajax.setSuccess(function(){
  34. location.reload();
  35. parent.Z.success('预约成功');
  36. });
  37. ajax.setLoading("addSubcribeBtn", "正在预约", {disabled:true})
  38. ajax.execute();
  39. }
  40. </script>
  41. ${zhiqim_manager_breadcrumb("订单预约")}
  42. ${zhiqim_manager_content()}
  43. <#-- 列表 -->
  44. <table class="z-table zi-bd zi-bd-b-none z-pd5 z-bg-white">
  45. <tr class="z-h40">
  46. <td width="*" class="z-bold z-px15 z-text-left">设计师:${operatorCode}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 等级:${designerLever}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 最大预约单量:${maxQuota} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;近20次预约总接单:${sumFinishedNum20}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 近20次预约平均接单量:${avgFinishedNum20} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 近20次预约达成率:${okRate20}</td>
  47. <td width="300" class="z-text-right">
  48. <a href="?curr=true" style="padding:4px 10px;background-color:#00a2eb;border-radius:3px;color:#ffffff;">今</a>
  49. <a href="?prev=true&type=year&year=${year}&month=${month}" style="padding:4px;"><</a>
  50. ${year}年
  51. <a href="?next=true&type=year&year=${year}&month=${month}" style="padding:4px;">></a>
  52. <a href="?prev=true&type=month&year=${year}&month=${month}" style="padding:4px;"><</a>
  53. ${month}月
  54. <a href="?next=true&type=month&year=${year}&month=${month}" style="padding:4px;">></a>
  55. </td>
  56. </tr>
  57. </table>
  58. <#-- 列表 -->
  59. <table class="z-table z-bordered z-bg-white z-text-center">
  60. <tr class="z-h40" bgcolor="${zmr_thead_bgcolor}">
  61. <td width="14%">周日</td>
  62. <td width="14%">周一</td>
  63. <td width="14%">周二</td>
  64. <td width="14%">周三</td>
  65. <td width="14%">周四</td>
  66. <td width="14%">周五</td>
  67. <td width="14%">周六</td>
  68. </tr>
  69. <#for item : list>
  70. <#if item_index % 7 == 0>
  71. <tr class="z-h100">
  72. </#if>
  73. <td class="" <#if item.getDutyTime() == today>style="background-color:#f5f5f5;"</#if>>
  74. <div class="z-pd3" style="line-height:2;text-align:left;">
  75. <span style="margin:0px 0px 0px 10px; color:#bbbbbb;">${item.getDay()}号 ${item.getLunarDay()}</span>
  76. <#if item.getSubscribeState() == 1>
  77. <span class="z-float-right" style="width:8px;height:8px;border-radius:50%;background-color:#bbbbbb;margin:0px 10px 0px 0px"></span>
  78. <#elseif item.getSubscribeState() == 2 && (item.getFinishedNum() lt item.getSubscribeNum())>
  79. <span class="z-float-right" style="width:8px;height:8px;border-radius:50%;background-color:#FF5722;margin:0px 10px 0px 0px"></span>
  80. <#elseif item.getSubscribeState() == 2>
  81. <span class="z-float-right" style="width:8px;height:8px;border-radius:50%;background-color:#14DE00;margin:0px 10px 0px 0px"></span>
  82. <#else>
  83. </#if>
  84. </div>
  85. <div class="z-pd6" style="line-height:1;vertical-align:middle;">
  86. <#if item.getSubscribeState() == 1 && item.getDutyTime() lt today>
  87. </br><span>未预约</span></br></br>
  88. <#elseif item.getSubscribeState() == 1 && item.getDutyTime() == today && hour gt 7 >
  89. </br><span>未预约</span></br></br>
  90. <#elseif item.getSubscribeState() == 1 && item.getDutyTime() == today && hour lt 8 >
  91. </br><span style="cursor: pointer;color:#00a2eb" onclick="showToggle(${item.getDutyTime()},${item.getSubscribeNum()},'${item.getRecordId()}');">点击预约订单>></span></br></br>
  92. <#elseif item.getSubscribeState() == 1 && item.getCanSubscribe()==1 >
  93. </br><span style="cursor: pointer;color:#00a2eb" onclick="showToggle(${item.getDutyTime()},${item.getSubscribeNum()},'${item.getRecordId()}');">点击预约订单>></span></br></br>
  94. <#elseif item.getSubscribeState() == 2>
  95. <span style="cursor: pointer;" <#if item.getDutyTime() gt today-1> onclick="showToggle(${item.getDutyTime()},${item.getSubscribeNum()},'${item.getRecordId()}');" </#if>>预约单数:${item.getSubscribeNum()}单</br>接单数:${item.getFinishedNum()}单
  96. </#if>
  97. </div>
  98. </td>
  99. <#if item_index % 7 == 6>
  100. </tr>
  101. </#if>
  102. </#for>
  103. </table>
  104. ${zhiqim_manager_content_end()}