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

293 lines
10 KiB
Plaintext

${zhiqim_manager_breadcrumb("接单条件组接单管理")}
${zhiqim_manager_content()}
<style>
.switch {
position: relative;
display: inline-block;
width: 80px;
height: 30px;
}
.slider {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
transition: .4s;
border-radius:20%;
}
.slider:before {
position: absolute;
content: "";
height: 26px;
width: 26px;
left: 2px;
bottom: 2px;
border-radius:50%;
background-color: white;
transition: .4s;
}
.labelOn {
position: absolute;
top: 50%;
transform: translateY(-50%);
left: 10px;
font-size: 14px;
color: white;
z-index:999;
}
.labelOff {
position: absolute;
top: 50%;
transform: translateY(-50%);
left: 30px;
font-size: 14px;
color: #333;
z-index:999;
}
input[type="checkbox"] {
display: none;
}
input[type="checkbox"]:checked + .slider {
background-color: #2196F3;
}
input[type="checkbox"]:checked + .slider:before {
transform: translateX(50px);
}
</style>
<#-- 导航 -->
<div class="z-tabnav-main z-mg-b20 ${zmr_color_class}">
<nav>
<ul>
<li onclick="Z.L.href('receiveMerManage.htm');">组织接单</li>
<li onclick="Z.L.href('designerGroup.htm');">接单条件组</li>
<li class="z-active">设计师接单</li>
<li onclick="Z.L.href('dispatchStat.htm');">派单统计</li>
</ul>
<div class="z-float-left z-mg10 z-lh30">
<form name="theForm">
<select name="designerGroupId" class="z-float-left z-select z-mg-r-1 zi-bd-r-none" data-role="z-select" data-class="${zmr_color_class}">
<option value="">选择条件组</option>
<#for item : designerGroupList>
<option value="${item.getDesignerGroupId()}" <#if item.getDesignerGroupId() == designerGroupId>selected</#if>>${item.getDesignerGroupName()}</option>
</#for>
</select>
<select name="orgId" class="z-float-left z-select z-mg-r-1 zi-bd-r-none" data-role="z-select" data-class="${zmr_color_class}">
<option value="">选择组织</option>
<#for item : orgList>
<option value="${item.getOrgId()}" <#if orgId == item.getOrgId()>selected</#if>>${item.getOrgName()}</option>
</#for>
</select>
<input class="z-float-left z-input ${zmr_color_class} z-w150 zi-bd-r-none" name="operatorCode" value="${operatorCode}" placeholder="操作员"/>
<button class="z-float-left z-button z-w80 zi-bd-rd0 z-blue"><i class="z-font z-query"></i>查询</button>&nbsp;&nbsp;
<button class="z-float-left z-button z-mg-l10" type="button" onclick="Z.Forms.clearForm(this.form);">清空</button>
</form>
</div>
<div class="z-float-right z-mg-t10 z-mg-r5">
<button class="z-button ${zmr_color_class}" onclick="Z.L.href('designerGroupDispatchAdd.htm');"><i class="z-font z-add"></i>增加设计师配置</button>
<button class="z-button ${zmr_color_class}" onclick="Z.L.check('designerGroupDispatchModify.htm', 'operatorCode');"><i class="z-font z-modify"></i>修改设计师配置</button>
<button class="z-button z-red" onclick="Z.Location.confirm('/designerGroupDispatchDelete.htm', '确认要删除该配置信息?','operatorCode');"><i class="z-font z-delete"></i>删除设计师配置</button>
</div>
</nav>
</div>
<#-- 列表 -->
<table id="tableDispatch" class="z-table z-bordered z-h40-tr z-text-center z-bg-white">
<tr bgcolor="${zmr_thead_bgcolor}">
<td width="50">选择</td>
<td width="120">设计师</td>
<td width="150">接单条件组</td>
<td width="150">独立特殊标识</td>
<td width="150">独立接单金额</td>
<td width="450">独立稿件类型</td>
<td width="50">独立最大接单量</td>
<td width="80">是否显示佣金</td>
<td width="80">是否显示抢单大厅</td>
<td width="10%">操作时间</td>
<td width="5%">操作人</td>
<td width="80">状态</td>
</tr>
${zhiqim_manager_tr_no_record(pageResult, 10, "暂时没有设计师配置")}
<#for item : pageResult.list()>
<tr class="z-pointer" ${zhiqim_manager_tr_onmouse()} ${zhiqim_manager_tr_click_radio()}>
<td><input name="operatorCode" type="radio" data-role="z-radio" data-class="${zmr_color_class}" value="${item.getOperatorCode()}"></td>
<td>${item.getOperatorCode()}</td>
<td>${designerGroupMap.get(item.getDesignerGroupId())}</td>
<td>
<#if item.isHighQualityOrder()><span style="font-size:16px;font-weight: bold"> 优 </span></#if>
<#if item.isLargeAmount()><span style="font-size:16px;font-weight: bold"> 大 </span></#if>
<#if item.isUrgent()><span style="font-size:16px;font-weight: bold"> 急 </span></#if>
<#if item.isDesign()><span style="font-size:16px;font-weight: bold"> 仅设计 </span></#if>
<#if item.isSpecial()><span style="font-size:16px;font-weight: bold"> 异 </span></#if>
</td>
<td>
<#if item.getMinOrderAmount() gt 0 || item.getMaxOrderAmount() gt 0>
${Amounts.toYuanMustRadix(item.getMinOrderAmount())}元 - ${Amounts.toYuanMustRadix(item.getMaxOrderAmount())}元
</#if>
</td>
<td>
<#var designerGroupDispatchValue = ORM.get(ZTable.class).list(DesignerGroupDispatchValue.class, new Selector("operatorCode", item.getOperatorCode()))/>
<table class="z-table z-bordered-line zi-bd-t-none z-pd3 z-lh150p">
<tr>
<td width="120" class="z-text-left zi-bd-b-none">标准自来稿:</td>
<td class="z-text-left zi-bd-b-none">
<#for value : designerGroupDispatchValue>
<#if value.getRelatedType()==0>${typeMap.get(value.getRelatedValue())},</#if>
</#for>
</td>
</tr>
<tr>
<td width="120" class="z-text-left zi-bd-b-none">改稿自来稿:</td>
<td class="z-text-left zi-bd-b-none">
<#for value : designerGroupDispatchValue>
<#if value.getRelatedType()==4>${typeMap.get(value.getRelatedValue())},</#if>
</#for>
</td>
</tr>
<tr>
<td width="120" class="z-text-left zi-bd-b-none">普通设计:</td>
<td class="z-text-left zi-bd-b-none">
<#for value : designerGroupDispatchValue>
<#if value.getRelatedType()==1>${typeMap.get(value.getRelatedValue())},</#if>
</#for>
</td>
</tr>
<tr>
<td width="120" class="z-text-left zi-bd-b-none">资深设计:</td>
<td class="z-text-left zi-bd-b-none">
<#for value : designerGroupDispatchValue>
<#if value.getRelatedType()==2>${typeMap.get(value.getRelatedValue())},</#if>
</#for>
</td>
</tr>
</table>
</td>
<td>
<#if item.getMaxOrderNum() gt 0>
${item.getMaxOrderNum()}
</#if>
</td>
<td>
<label class="switch">
<input <#if item.getIsShowCost() == 1>checked</#if> type="checkbox" id="toggleSwitch" onclick="doUpdateDesignerGroupDispatchIsShowCost('${item.getOperatorCode()}',${item.getIsShowCost()})">
<span class="slider"></span>
<#if item.getIsShowCost() == 1>
<span class="labelOn">显示</span>
<#else>
<span class="labelOff">不显示</span>
</#if>
</label>
</td>
<td>
<label class="switch">
<input <#if item.getIsShowQddt() == 1>checked</#if> type="checkbox" id="toggleSwitchQddt" onclick="doUpdateDesignerGroupDispatchIsShowQddt('${item.getOperatorCode()}',${item.getIsShowQddt()})">
<span class="slider"></span>
<#if item.getIsShowQddt() == 1>
<span class="labelOn">显示</span>
<#else>
<span class="labelOff">不显示</span>
</#if>
</label>
</td>
<td>${Sqls.toDateTimeString(item.getModifyTime())}</td>
<td>${item.getModifyOperatorCode()}</td>
<td>
<#if item.getStatus() == 1>
<button class="z-button z-green" onclick="doUpdateDesignerGroupDispatchStatus('${item.getOperatorCode()}',${item.getStatus()})">
已启用
</button>
<#else>
<button class="z-button z-red" onclick="doUpdateDesignerGroupDispatchStatus('${item.getOperatorCode()}',${item.getStatus()})">
已停用
</button>
</#if>
</td>
</tr>
</#for>
</table>
<script>
function doUpdateDesignerGroupDispatchStatus(operatorCode,status){
Z.confirm("确认" + (status == 1 ? "停用" : "启用") + "该设计师的接单配置?",function(){
var ajax = new Z.Ajax();
ajax.setClassName("DesignerGroupPresenter");
ajax.setMethodName("doUpdateDesignerGroupDispatchStatus");
ajax.addParam("operatorCode",operatorCode);
ajax.addParam("status",status == 1?0:1);
ajax.setFailureAlert();
ajax.setSuccess(function(){
Z.success('修改成功', function(){
location.reload();
});
});
ajax.setLoading(document);
ajax.execute();/*
* }); }
*
* /*const toggleSwitch = document.getElementById("toggleSwitch");
* const onText = document.getElementById("onText"); const offText =
* document.getElementById("offText");
* // 监听开关状态改变事件,并更新汉字的显示 toggleSwitch.addEventListener("change",
* function() { if (this.checked) { onText.style.display = "block";
* offText.style.display = "none"; } else { onText.style.display =
* "none"; offText.style.displa
y = "block";*/
});
}
function doUpdateDesignerGroupDispatchIsShowCost(operatorCode,isShowCost){
var ajax = new Z.Ajax();
ajax.setClassName("DesignerGroupPresenter");
ajax.setMethodName("doUpdateDesignerGroupDispatchIsShowCost");
ajax.addParam("operatorCode",operatorCode);
ajax.addParam("isShowCost",isShowCost == 0?1:0);
ajax.setFailureAlert();
ajax.setSuccess(function(){
Z.success('修改成功', function(){
location.reload();
//$("#tableDispatch").reload();
});
});
ajax.setLoading(document);
ajax.execute();
}
function doUpdateDesignerGroupDispatchIsShowQddt(operatorCode,isShowQddt){
var ajax = new Z.Ajax();
ajax.setClassName("DesignerGroupPresenter");
ajax.setMethodName("doUpdateDesignerGroupDispatchIsShowQddt");
ajax.addParam("operatorCode",operatorCode);
ajax.addParam("isShowQddt",isShowQddt == 0?1:0);
ajax.setFailureAlert();
ajax.setSuccess(function(){
Z.success('修改成功', function(){
location.reload();
//$("#tableDispatch").reload();
});
});
ajax.setLoading(document);
ajax.execute();
}
var toggleSwitches = document.querySelectorAll('input[type="checkbox"]');
for (var i = 0; i < toggleSwitches.length; i++) {
toggleSwitches[i].addEventListener("click", function(event) {
event.preventDefault(); // 阻止事件的默认行为
});
}
</script>
${zhiqim_manager_paging(pageResult, "designerGroupDispatch.htm")}
${zhiqim_manager_content_end()}