Files
2025-02-20 14:59:35 +08:00

124 lines
5.0 KiB
Plaintext

<script>
Z.onload(function(){
var lastHangups = Z("input[name^=lastHangup_]")
Z.each(lastHangups, function(item, i)
{
var designer = item.name.split("_")[1];
var lastHangup = item.value;
var dayHangup = Z("input[name=dayHangup_"+designer+"]")[0].value;
Z("#lastHangup_desc_"+designer).text(getHangUpDuration(lastHangup));
Z("#dayHangup_desc_"+designer).text(getHangUpDuration(dayHangup));
});
});
function getHangUpDuration(hangUpSecond)
{
if(hangUpSecond == "" || hangUpSecond == null)
return "";
hangUpSecond = hangUpSecond*1;
var day = 0;
var hour = 0;
var minut = 0;
var second = 0;
if(hangUpSecond >= 86400)
{
day = parseInt(hangUpSecond/86400);
hangUpSecond -= 86400*day;
}
if(hangUpSecond >= 3600)
{
hour = parseInt(hangUpSecond/3600);
hangUpSecond -= 3600*hour;
}
if(hangUpSecond >= 60)
{
minut = parseInt(hangUpSecond/60);
hangUpSecond -= 60*minut;
}
second = hangUpSecond;
var s = ""+(day == 0 ? "" : day + "天")+(hour == 0 ? "" : hour + "小时")+(minut == 0 ? "" : minut + "分钟")+(second == 0 ? "" : second + "秒");
return s;
}
</script>
${zhiqim_manager_breadcrumb("设计师工作状态")}
${zhiqim_manager_content()}
<form name="theForm" action="/workingStatus.htm">
<!--<input name="search" value="0001" type="hidden">-->
<table class="z-table z-bordered z-pd6 zi-bd-b-none">
<tr class="z-h40" bgcolor="${trColor}">
<td class="z-text-left z-bold z-px14 ">&nbsp;查询条件:</td>
</tr>
</table>
<table class="z-table z-bordered z-pd6">
<tr class="z-h40" bgcolor="${oddColor}">
<td width="25%">设计师:&nbsp;<input class="z-input ${zmr_color_class} z-w160" name="operatorCode" value="${operatorCode}"/></td>
<td width="25%">上班时间:
<input id="onDutyStartDate" name="onDutyStartDate" class="z-input z-w150 ${zmr_color_class}" readonly="true" onfocus="Z.datetime(this);" value="${onDutyStartDate}">&nbsp;-&nbsp;
<input id="onDutyEndDate" name="onDutyEndDate" class="z-input z-mg-l3 z-w150 ${zmr_color_class}" readonly="true" onfocus="Z.datetime(this);" value="${onDutyEndDate}">
</td>
<td width="25%">挂起时间:
<input id="hangUpStartDate" name="hangUpStartDate" class="z-input z-w150 ${zmr_color_class}" readonly="true" onfocus="Z.datetime(this);" value="${hangUpStartDate}">&nbsp;-&nbsp;
<input id="hangUpEndDate" name="hangUpEndDate" class="z-input z-mg-l3 z-w150 ${zmr_color_class}" readonly="true" onfocus="Z.datetime(this);" value="${hangUpEndDate}">
</td>
</tr>
<tr class="z-h40" bgcolor="#ffffff">
<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>
</tr>
</table>
</form>
<br>
<table class="z-table z-bordered z-bg-white z-pd6">
<tr>
<td class="z-h40 z-text-left z-bold z-px14 z-bg-white" colspan="8">&nbsp;上班中的设计师信息</td>
</tr>
<tr class="z-text-center z-h40" bgcolor="${zmr_thead_bgcolor}">
<td width="10%">设计师</td>
<td width="10%">状态</td>
<td width="10%">上班时间</td>
<td width="10%">当前订单数量</td>
<td width="10%">最近完成初稿类型</td>
<td width="10%">上次初稿提交时间</td>
<td width="10%">上次挂起时间</td>
<td width="10%">上次挂起时长</td>
<td width="*">当天挂起时长</td>
</tr>
<#if pageResult.total() == 0>
${zhiqim_manager_no_record(10, "暂时没有上班的设计师信息")}
</#if>
<#for item : pageResult.list()>
<tr align="center" class="z-h40" bgcolor="${zhiqim_manager_tr_bg(item_index)}">
<td>${item.getOperatorCode()}</td>
<td>
<#if item.getStatus()== 0>下班</#if>
<#if item.getStatus()== 1>上班中</#if>
<#if item.getStatus()== 2>挂起</#if>
</td>
<td>${Sqls.toDateTimeString(item.getOnDutyTime())}</td>
<td>${item.getOrderNumber()}</td>
<td>
<#if item.getLastDraftType().equals("card")>名片</#if>
<#if item.getLastDraftType().equals("colorPage")>彩页</#if>
</td>
<td><#if item.getLastDraftTime() != null>${Sqls.toDateTimeString(item.getLastDraftTime())}</#if></td>
<#var lastHangUpLog=designerPreHangUpMap.get(item.getOperatorCode())/>
<td><#if lastHangUpLog != null>${Sqls.toDateTimeString(lastHangUpLog.getHangUpTime())}</#if></td>
<td>
<input name="lastHangup_${item.getOperatorCode()}" type="hidden" value="<#if lastHangUpLog != null>${lastHangUpLog.getHangUpSeconds()}</#if>">
<span id="lastHangup_desc_${item.getOperatorCode()}"></span>
</td>
<td>
<input name="dayHangup_${item.getOperatorCode()}" type="hidden" value="${designerPreHangUpSecondMap.get(item.getOperatorCode())}">
<span id="dayHangup_desc_${item.getOperatorCode()}"></span>
</td>
</tr>
</#for>
</table>
${zhiqim_manager_paging(pageResult, "/workingStatus.htm")}
${zhiqim_manager_content_end()}