| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212 |
- <#def designatedPath="/receiveMerManage.htm"/>
- ${request.getValidateScript()}
- ${zhiqim_manager_history("/receiveMerManage.htm")}
- ${zhiqim_manager_breadcrumb_parent("/receiveMerManage.htm", "接单商户管理", "修改接单商户")}
- ${zhiqim_manager_content()}
- <script>
- var typeIdArr = [];
- var policyModules = {};
- Z.onload(function(){
- typeIdArr = Z.AR.toArray('${orgMer.getDesignTypeIds()}', ",");
- doBiuldPolicy(typeIdArr);
- });
- function doBiuldPolicy(typeIdArr)
- {
- if (typeIdArr.length==0)
- {
- Z("#policy_div").html("");
- return;
- }
-
- var ajax = new Z.Ajax();
- ajax.setClassName("ReceiveMerPresenter");
- ajax.setMethodName("doQueryPolicy");
- ajax.addParam("typeIdIds", Z.AR.toString(typeIdArr));
- ajax.setFailureAlert();
- ajax.setSuccess(function(){
- var obj = Z.J.toObject(this.responseText);
- var typeList = obj.typeList;
- var dataMap = obj.dataMap;
-
- if (typeList.length == 0)
- {
- Z("#policy_div").html("");
- return;
- }
-
- var html = '<table class="z-table z-bordered-line zi-bd-t-none z-lh150p">';
- Z.each(typeList, function(type, i)
- {
- var policyList = dataMap[type.typeIdId];
- var spolicyList = policyModules[type.typeIdId]
- if (!spolicyList)
- spolicyList = [];
-
- if (policyList.length > 0)
- {
- var allchk = policyList.length == spolicyList.length ? 'checked' : '';
- html +='<tr>';
- html +=' <td class="zi-bd-b-none">';
- html +=' <div class="z-pd3 z-bold z-pointer"><input type="checkbox" '+allchk+' data-role="z-checkbox" onclick="doselctbox(this)"data-class="z-blue"/><span class="z-mg-l5" onclick="Z(this).parent().find(\'zcover>i.z-checkbox\').click();">'+type.typeIdName+'</span></div>';
- html +=' <div class="z-float-left z-pd10">';
- Z.each(policyList, function(policy, j)
- {
- var checked = Z.AR.contains(spolicyList, policy.policyId) ? 'checked' : '';
- html +=' <div class="z-float-left" style="width:110px"><span class="z-pd10 z-pointer z-text-ellipsis" style="max-width:100px" title="'+policy.policyName+'"><input type="checkbox" '+checked+' name="policyId'+type.typeIdId+'" data-role="z-checkbox" value="'+policy.policyId+'" data-class="z-blue"/><span class="z-pd5" onclick="Z(this).parent().find(\'zcover>i.z-checkbox\').click();">'+policy.policyName+'</span></span></div>';
- });
- html +=' </div>';
- html +=' </td>';
- html +=' </tr>';
- }
- });
-
- html +='</table>';
- Z("#policy_div").htmlc(html);
- });
- ajax.execute();
- }
- function doSelectDesignType(v)
- {
- if (Z.AR.contains(typeIdArr, v))
- {
- Z.AR.remove(typeIdArr, v);
- }
- else
- {
- typeIdArr.push(v);
- policyModules[v*1]=[];
- }
-
- if (Z("input[name=typeIdIds]").length == typeIdArr.length)
- {
- Z.D.id("selectAllType").checked=true;
- Z("i[data-id=selectAllType]").addClass("z-active");
- }
- else
- {
- Z.D.id("selectAllType").checked=false;
- Z("i[data-id=selectAllType]").removeClass("z-active");
- }
- doBiuldPolicy(typeIdArr);
- }
- function doselctbox(box, type)
- {
- var _div = Z(box).parent().parent().siblings("div");
- Z.each(_div.find('i.z-checkbox'), function(item, i)
- {
- if (Z(item).hasClass("z-active"))
- {
- if (!box.checked)
- {
- Z(item).click();
- }
- }
- else
- {
- if (box.checked)
- {
- Z(item).click();
- }
- }
- });
-
- if (type == 1)
- {
- doBiuldPolicy(typeIdArr)
- }
-
- }
- function doSelectAllDesignType(box)
- {
- var type = Z.V.isEmptyBlank(Z.FM.getCheckBoxValue("typeIds")) ? 1 : (Z("input[name=typeIds]").length != typeIdArr.length ? 1 : 2);
- if (box.checked && type == 2)
- type = 1;
-
- Z.FM.doSelectCheckBox('typeIds', type)
- typeIdArr = Z.AR.toArray(Z.FM.getCheckBoxValue("typeIds"), ",");
- doBiuldPolicy(typeIdArr);
- }
- function doBiuldPolicy(typeIdArr)
- {
- }
- </script>
- <form name="theForm" action="receiveMerUpdate.htm" method="post" onSubmit="return validateForm(this);" data-role="z-call-frame">
- <table class="z-table z-bordered z-h50-tr z-pd10 z-bg-white">
- <tr class="zi-h40 z-bg-gray z-bold">
- <td colspan="20">修改接单商户</td>
- </tr>
- <tr>
- <td width="25%">选择接单商户:</td>
- <td width="25%">
- <select id="orgId" name="orgId" class="z-select z-w200" data-role="z-select" data-class="${zmr_color_class}">
- <#for item : orgList>
- <#if item.getOrgId()==orgMer.getOrgId()>
- <option value="${item.getOrgId()}">${item.getOrgName()}</option>
- </#if>
- </#for>
- </select>
- </td>
- <td width="25%">商户排序优先级:<span class="z-text-red" style="color:#D0CECE;">数字越小排序越前</span></td>
- <td width="25%">
- <input id="merLevel" name="merLevel" value="${orgMer.getMerLevel()}" class="z-input z-w200" maxlength="6" data-options="type:Decimal;paste:true;" placeholder="排序优先级(填写数字)">
- <span class="z-text-red">*</span>
- </td>
- </tr>
- <tr>
- <td>接单状态:</td>
- <td>
- <select id="isPauseRecieive" name="isPauseRecieive" class="z-select z-w200" data-role="z-select" data-class="${zmr_color_class}">
- <option value="false" <#if orgMer.isPauseRecieive() == false>selected</#if>>开启</option>
- <option value="true" <#if orgMer.isPauseRecieive()>selected</#if>>暂停</option>
- </select>
- </td>
- <td>商户状态:</td>
- <td>
- <select id="merStatus" name="merStatus" class="z-select z-w200" data-role="z-select" data-class="${zmr_color_class}">
- <option value="0" <#if orgMer.getMerStatus() == 0>selected</#if>>正常</option>
- <option value="1" <#if orgMer.getMerStatus() == 1>selected</#if>>停用</option>
- </select>
- </td>
- </tr>
- <tr>
- <td>个人同时最大接单量:<span class="z-text-red" style="color:#D0CECE;">个人正在设计订单总数(老用户订单派单除外)</span></td>
- <td>
- <input id="personalMaxOrder" name="personalMaxOrder" value="${orgMer.getPersonalMaxOrder()}" class="z-input z-w200" maxlength="6" data-options="type:Decimal;paste:true;" placeholder="最大接单量(填写数字)">
- <span class="z-text-red">*</span>
- </td>
- <td>个人非加急订单最大接单量:<span class="z-text-red" style="color:#D0CECE;">普通订单正在设计数量</span></td>
- <td>
- <input id="personalMaxOrdinaryOrder" name="personalMaxOrdinaryOrder" value="${orgMer.getPersonalMaxOrdinaryOrder()}" class="z-input z-w200" data-options="type:Decimal;paste:true;" maxlength="6" placeholder="最大未领单量(填写数字)">
- <span class="z-text-red">*</span>
- </td>
- </tr>
- <tr>
- <td>支持店铺:</td>
- <td colspan="3">
- <div class="z-pd3 z-bold z-pointer">
- <input type="checkbox" id="selectAllShop" data-role="z-checkbox" onclick="Z.FM.doSelectCheckBox('orderShop', this.checked ? 1 : 2);" <#if Lists.toStringList(orgMer.getOrderShop()).size()==shopList.size()> checked </#if> data-class="z-blue"/><span class="z-mg-l5" onclick="Z(this).parent().find('zcover>i.z-checkbox').click();">全选</span>
- </div>
- <div class="z-float-left z-pd6">
- <#var merShop = Lists.toStringList(orgMer.getOrderShop())/>
- <#for item : shopList>
- <div class="z-float-left z-pd6 z-mg-l20 z-text-ellipsis z-pointer " style="width:110px" title="${item}">
- <input type="checkbox" name="orderShop" onclick="" <#if merShop.contains(item)>checked</#if> class="z-checkbox" value="${item}" data-role="z-checkbox" data-class="${zmr_color_class}">
- <span onclick="Z(this).parent().find('zcover>i.z-checkbox').click()" class="z-pointer">${item}</span>
- </div>
- </#for>
- </div>
- </td>
- </tr>
- </table>
- ${zhiqim_manager_submit()}
- </form>
- ${zhiqim_manager_content_end()}
|