workingStatus.zml 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <script>
  2. Z.onload(function(){
  3. var lastHangups = Z("input[name^=lastHangup_]")
  4. Z.each(lastHangups, function(item, i)
  5. {
  6. var designer = item.name.split("_")[1];
  7. var lastHangup = item.value;
  8. var dayHangup = Z("input[name=dayHangup_"+designer+"]")[0].value;
  9. Z("#lastHangup_desc_"+designer).text(getHangUpDuration(lastHangup));
  10. Z("#dayHangup_desc_"+designer).text(getHangUpDuration(dayHangup));
  11. });
  12. });
  13. function getHangUpDuration(hangUpSecond)
  14. {
  15. if(hangUpSecond == "" || hangUpSecond == null)
  16. return "";
  17. hangUpSecond = hangUpSecond*1;
  18. var day = 0;
  19. var hour = 0;
  20. var minut = 0;
  21. var second = 0;
  22. if(hangUpSecond >= 86400)
  23. {
  24. day = parseInt(hangUpSecond/86400);
  25. hangUpSecond -= 86400*day;
  26. }
  27. if(hangUpSecond >= 3600)
  28. {
  29. hour = parseInt(hangUpSecond/3600);
  30. hangUpSecond -= 3600*hour;
  31. }
  32. if(hangUpSecond >= 60)
  33. {
  34. minut = parseInt(hangUpSecond/60);
  35. hangUpSecond -= 60*minut;
  36. }
  37. second = hangUpSecond;
  38. var s = ""+(day == 0 ? "" : day + "天")+(hour == 0 ? "" : hour + "小时")+(minut == 0 ? "" : minut + "分钟")+(second == 0 ? "" : second + "秒");
  39. return s;
  40. }
  41. </script>
  42. ${zhiqim_manager_breadcrumb("设计师工作状态")}
  43. ${zhiqim_manager_content()}
  44. <form name="theForm" action="/workingStatus.htm">
  45. <!--<input name="search" value="0001" type="hidden">-->
  46. <table class="z-table z-bordered z-pd6 zi-bd-b-none">
  47. <tr class="z-h40" bgcolor="${trColor}">
  48. <td class="z-text-left z-bold z-px14 ">&nbsp;查询条件:</td>
  49. </tr>
  50. </table>
  51. <table class="z-table z-bordered z-pd6">
  52. <tr class="z-h40" bgcolor="${oddColor}">
  53. <td width="25%">设计师:&nbsp;<input class="z-input ${zmr_color_class} z-w160" name="operatorCode" value="${operatorCode}"/></td>
  54. <td width="25%">上班时间:
  55. <input id="onDutyStartDate" name="onDutyStartDate" class="z-input z-w150 ${zmr_color_class}" readonly="true" onfocus="Z.datetime(this);" value="${onDutyStartDate}">&nbsp;-&nbsp;
  56. <input id="onDutyEndDate" name="onDutyEndDate" class="z-input z-mg-l3 z-w150 ${zmr_color_class}" readonly="true" onfocus="Z.datetime(this);" value="${onDutyEndDate}">
  57. </td>
  58. <td width="25%">挂起时间:
  59. <input id="hangUpStartDate" name="hangUpStartDate" class="z-input z-w150 ${zmr_color_class}" readonly="true" onfocus="Z.datetime(this);" value="${hangUpStartDate}">&nbsp;-&nbsp;
  60. <input id="hangUpEndDate" name="hangUpEndDate" class="z-input z-mg-l3 z-w150 ${zmr_color_class}" readonly="true" onfocus="Z.datetime(this);" value="${hangUpEndDate}">
  61. </td>
  62. </tr>
  63. <tr class="z-h40" bgcolor="#ffffff">
  64. <td colspan="4" align="center"><button class="z-button z-large z-w100 ${zmr_color_class}">查询</button>&nbsp;&nbsp;&nbsp;&nbsp;<button class="z-button z-large" type="button" onclick="Z.Forms.clearForm(this.form);">清空</button></td>
  65. </tr>
  66. </table>
  67. </form>
  68. <br>
  69. <table class="z-table z-bordered z-bg-white z-pd6">
  70. <tr>
  71. <td class="z-h40 z-text-left z-bold z-px14 z-bg-white" colspan="8">&nbsp;上班中的设计师信息</td>
  72. </tr>
  73. <tr class="z-text-center z-h40" bgcolor="${zmr_thead_bgcolor}">
  74. <td width="10%">设计师</td>
  75. <td width="10%">状态</td>
  76. <td width="10%">上班时间</td>
  77. <td width="10%">当前订单数量</td>
  78. <td width="10%">最近完成初稿类型</td>
  79. <td width="10%">上次初稿提交时间</td>
  80. <td width="10%">上次挂起时间</td>
  81. <td width="10%">上次挂起时长</td>
  82. <td width="*">当天挂起时长</td>
  83. </tr>
  84. <#if pageResult.total() == 0>
  85. ${zhiqim_manager_no_record(10, "暂时没有上班的设计师信息")}
  86. </#if>
  87. <#for item : pageResult.list()>
  88. <tr align="center" class="z-h40" bgcolor="${zhiqim_manager_tr_bg(item_index)}">
  89. <td>${item.getOperatorCode()}</td>
  90. <td>
  91. <#if item.getStatus()== 0>下班</#if>
  92. <#if item.getStatus()== 1>上班中</#if>
  93. <#if item.getStatus()== 2>挂起</#if>
  94. </td>
  95. <td>${Sqls.toDateTimeString(item.getOnDutyTime())}</td>
  96. <td>${item.getOrderNumber()}</td>
  97. <td>
  98. <#if item.getLastDraftType().equals("card")>名片</#if>
  99. <#if item.getLastDraftType().equals("colorPage")>彩页</#if>
  100. </td>
  101. <td><#if item.getLastDraftTime() != null>${Sqls.toDateTimeString(item.getLastDraftTime())}</#if></td>
  102. <#var lastHangUpLog=designerPreHangUpMap.get(item.getOperatorCode())/>
  103. <td><#if lastHangUpLog != null>${Sqls.toDateTimeString(lastHangUpLog.getHangUpTime())}</#if></td>
  104. <td>
  105. <input name="lastHangup_${item.getOperatorCode()}" type="hidden" value="<#if lastHangUpLog != null>${lastHangUpLog.getHangUpSeconds()}</#if>">
  106. <span id="lastHangup_desc_${item.getOperatorCode()}"></span>
  107. </td>
  108. <td>
  109. <input name="dayHangup_${item.getOperatorCode()}" type="hidden" value="${designerPreHangUpSecondMap.get(item.getOperatorCode())}">
  110. <span id="dayHangup_desc_${item.getOperatorCode()}"></span>
  111. </td>
  112. </tr>
  113. </#for>
  114. </table>
  115. ${zhiqim_manager_paging(pageResult, "/workingStatus.htm")}
  116. ${zhiqim_manager_content_end()}