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

111 lines
6.1 KiB
Plaintext

<script>
function showToggle(dutyTime,subscribeNum = 0,recordId = 0)
{//修改
var addreasonTile = '';
var content = '<form name="addForm" action="javascript:void(0)" style="text-align: center;">';
content += '<input name="recordId" type="hidden" value="'+recordId+'">';
content += '<input name="dutyTime" type="hidden" value="'+dutyTime+'">';
content += '<input name="maxQuota" type="hidden" value="'+${maxQuota}+'">';
content += '<table class="z-table z-bordered z-h40-tr z-pd6 z-bg-white z-text-center">';
var height = 200;
content += ' <tr>';
content += ' <td>预约数量:</td>';
content += ' <td><input value="' + (subscribeNum?subscribeNum:"") + '" name="subscribeNum" class="z-input z-w200"></td>';
content += ' </tr>';
content += '</table>';
content += '<span style="color:#ea4a36;">注:未达成预约目标将会降低预约达成率,从而影响订单预约上限,请认真对待!</span>';
content += '<div class="z-absolute z-b0 z-l0 z-w100p z-h60 z-pd10 z-bg-gray z-text-center">';
content += ' <button id="addSubcribeBtn" class="z-button z-large z-w150 z-blue" onclick="doToggle(this.form)">保存</button>';
content += ' <button class="z-button z-large z-w70 z-mg-l10" onclick="Z.Dialog.close(location.hash);">取消</button>';
content += '</div>';
content += '</form>';
var dialog = Z.dialog({id:'modifyreason', title:'<span id="addSubcribeTile"></span>', text:'<div id="addSubcribeContent"></div>',width:460,height:height, shadow:true});
Z("#addSubcribeContent").htmlc(content);
Z("#addSubcribeTile").htmlc("订单预约");
}
function doToggle(form)
{
var ajax = new Z.Ajax();
ajax.setClassName("DesignerSubscribePresenter");
ajax.setMethodName("doToggle");
ajax.setParamForm(form);
ajax.setFailureAlert();
ajax.setSuccess(function(){
location.reload();
parent.Z.success('预约成功');
});
ajax.setLoading("addSubcribeBtn", "正在预约", {disabled:true})
ajax.execute();
}
</script>
${zhiqim_manager_breadcrumb("订单预约")}
${zhiqim_manager_content()}
<#-- 列表 -->
<table class="z-table zi-bd zi-bd-b-none z-pd5 z-bg-white">
<tr class="z-h40">
<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>
<td width="300" class="z-text-right">
<a href="?curr=true" style="padding:4px 10px;background-color:#00a2eb;border-radius:3px;color:#ffffff;">今</a>
<a href="?prev=true&type=year&year=${year}&month=${month}" style="padding:4px;"><</a>
${year}年
<a href="?next=true&type=year&year=${year}&month=${month}" style="padding:4px;">></a>
<a href="?prev=true&type=month&year=${year}&month=${month}" style="padding:4px;"><</a>
${month}月
<a href="?next=true&type=month&year=${year}&month=${month}" style="padding:4px;">></a>
</td>
</tr>
</table>
<#-- 列表 -->
<table class="z-table z-bordered z-bg-white z-text-center">
<tr class="z-h40" bgcolor="${zmr_thead_bgcolor}">
<td width="14%">周日</td>
<td width="14%">周一</td>
<td width="14%">周二</td>
<td width="14%">周三</td>
<td width="14%">周四</td>
<td width="14%">周五</td>
<td width="14%">周六</td>
</tr>
<#for item : list>
<#if item_index % 7 == 0>
<tr class="z-h100">
</#if>
<td class="" <#if item.getDutyTime() == today>style="background-color:#f5f5f5;"</#if>>
<div class="z-pd3" style="line-height:2;text-align:left;">
<span style="margin:0px 0px 0px 10px; color:#bbbbbb;">${item.getDay()}号 ${item.getLunarDay()}</span>
<#if item.getSubscribeState() == 1>
<span class="z-float-right" style="width:8px;height:8px;border-radius:50%;background-color:#bbbbbb;margin:0px 10px 0px 0px"></span>
<#elseif item.getSubscribeState() == 2 && (item.getFinishedNum() lt item.getSubscribeNum())>
<span class="z-float-right" style="width:8px;height:8px;border-radius:50%;background-color:#FF5722;margin:0px 10px 0px 0px"></span>
<#elseif item.getSubscribeState() == 2>
<span class="z-float-right" style="width:8px;height:8px;border-radius:50%;background-color:#14DE00;margin:0px 10px 0px 0px"></span>
<#else>
</#if>
</div>
<div class="z-pd6" style="line-height:1;vertical-align:middle;">
<#if item.getSubscribeState() == 1 && item.getDutyTime() lt today>
</br><span>未预约</span></br></br>
<#elseif item.getSubscribeState() == 1 && item.getDutyTime() == today && hour gt 7 >
</br><span>未预约</span></br></br>
<#elseif item.getSubscribeState() == 1 && item.getDutyTime() == today && hour lt 8 >
</br><span style="cursor: pointer;color:#00a2eb" onclick="showToggle(${item.getDutyTime()},${item.getSubscribeNum()},'${item.getRecordId()}');">点击预约订单>></span></br></br>
<#elseif item.getSubscribeState() == 1 && item.getCanSubscribe()==1 >
</br><span style="cursor: pointer;color:#00a2eb" onclick="showToggle(${item.getDutyTime()},${item.getSubscribeNum()},'${item.getRecordId()}');">点击预约订单>></span></br></br>
<#elseif item.getSubscribeState() == 2>
<span style="cursor: pointer;" <#if item.getDutyTime() gt today-1> onclick="showToggle(${item.getDutyTime()},${item.getSubscribeNum()},'${item.getRecordId()}');" </#if>>预约单数:${item.getSubscribeNum()}单</br>接单数:${item.getFinishedNum()}单
</#if>
</div>
</td>
<#if item_index % 7 == 6>
</tr>
</#if>
</#for>
</table>
${zhiqim_manager_content_end()}