designerGroupDispatch2.zml 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  1. ${zhiqim_manager_breadcrumb("接单条件组接单管理")}
  2. ${zhiqim_manager_content()}
  3. <style>
  4. .switch {
  5. position: relative;
  6. display: inline-block;
  7. width: 80px;
  8. height: 30px;
  9. }
  10. .slider {
  11. position: absolute;
  12. top: 0;
  13. left: 0;
  14. right: 0;
  15. bottom: 0;
  16. background-color: #ccc;
  17. transition: .4s;
  18. border-radius:20%;
  19. }
  20. .slider:before {
  21. position: absolute;
  22. content: "";
  23. height: 26px;
  24. width: 26px;
  25. left: 2px;
  26. bottom: 2px;
  27. border-radius:50%;
  28. background-color: white;
  29. transition: .4s;
  30. }
  31. .labelOn {
  32. position: absolute;
  33. top: 50%;
  34. transform: translateY(-50%);
  35. left: 10px;
  36. font-size: 14px;
  37. color: white;
  38. z-index:999;
  39. }
  40. .labelOff {
  41. position: absolute;
  42. top: 50%;
  43. transform: translateY(-50%);
  44. left: 30px;
  45. font-size: 14px;
  46. color: #333;
  47. z-index:999;
  48. }
  49. input[type="checkbox"] {
  50. display: none;
  51. }
  52. input[type="checkbox"]:checked + .slider {
  53. background-color: #2196F3;
  54. }
  55. input[type="checkbox"]:checked + .slider:before {
  56. transform: translateX(50px);
  57. }
  58. </style>
  59. <#-- 导航 -->
  60. <div class="z-tabnav-main z-mg-b20 ${zmr_color_class}">
  61. <nav>
  62. <ul>
  63. <li class="z-active">设计师接单</li>
  64. </ul>
  65. <div class="z-float-left z-mg10 z-lh30">
  66. <form name="theForm">
  67. <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}">
  68. <option value="">选择条件组</option>
  69. <#for item : designerGroupList>
  70. <option value="${item.getDesignerGroupId()}" <#if item.getDesignerGroupId() == designerGroupId>selected</#if>>${item.getDesignerGroupName()}</option>
  71. </#for>
  72. </select>
  73. <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}">
  74. <option value="">选择组织</option>
  75. <#for item : orgList>
  76. <option value="${item.getOrgId()}" <#if orgId == item.getOrgId()>selected</#if>>${item.getOrgName()}</option>
  77. </#for>
  78. </select>
  79. <input class="z-float-left z-input ${zmr_color_class} z-w150 zi-bd-r-none" name="operatorCode" value="${operatorCode}" placeholder="操作员"/>
  80. <button class="z-float-left z-button z-w80 zi-bd-rd0 z-blue"><i class="z-font z-query"></i>查询</button>&nbsp;&nbsp;
  81. <button class="z-float-left z-button z-mg-l10" type="button" onclick="Z.Forms.clearForm(this.form);">清空</button>
  82. </form>
  83. </div>
  84. <div class="z-float-right z-mg-t10 z-mg-r5">
  85. <#-- <button class="z-button ${zmr_color_class}" onclick="Z.L.href('designerGroupDispatchAdd.htm');"><i class="z-font z-add"></i>增加设计师配置</button>
  86. -->
  87. <button class="z-button ${zmr_color_class}" onclick="Z.L.check('designerGroupDispatchModify2.htm', 'operatorCode');"><i class="z-font z-modify"></i>修改设计师配置</button>
  88. <#-- <button class="z-button z-red" onclick="Z.Location.confirm('/designerGroupDispatchDelete.htm', '确认要删除该配置信息?','operatorCode');"><i class="z-font z-delete"></i>删除设计师配置</button>
  89. -->
  90. </div>
  91. </nav>
  92. </div>
  93. <#-- 列表 -->
  94. <table id="tableDispatch" class="z-table z-bordered z-h40-tr z-text-center z-bg-white">
  95. <tr bgcolor="${zmr_thead_bgcolor}">
  96. <td width="50">选择</td>
  97. <td width="120">设计师</td>
  98. <td width="150">接单条件组</td>
  99. <td width="150">独立特殊标识</td>
  100. <td width="150">独立接单金额</td>
  101. <td width="450">独立稿件类型</td>
  102. <td width="50">独立最大接单量</td>
  103. <td width="80">是否显示佣金</td>
  104. <td width="10%">操作时间</td>
  105. <td width="5%">操作人</td>
  106. <td width="80">状态</td>
  107. </tr>
  108. ${zhiqim_manager_tr_no_record(pageResult, 10, "暂时没有设计师配置")}
  109. <#for item : pageResult.list()>
  110. <tr class="z-pointer" ${zhiqim_manager_tr_onmouse()} ${zhiqim_manager_tr_click_radio()}>
  111. <td><input name="operatorCode" type="radio" data-role="z-radio" data-class="${zmr_color_class}" value="${item.getOperatorCode()}"></td>
  112. <td>${item.getOperatorCode()}</td>
  113. <td>${designerGroupMap.get(item.getDesignerGroupId())}</td>
  114. <td>
  115. <#if item.isHighQualityOrder()><span style="font-size:16px;font-weight: bold"> 优 </span></#if>
  116. <#if item.isLargeAmount()><span style="font-size:16px;font-weight: bold"> 大 </span></#if>
  117. <#if item.isUrgent()><span style="font-size:16px;font-weight: bold"> 急 </span></#if>
  118. <#if item.isDesign()><span style="font-size:16px;font-weight: bold"> 仅设计 </span></#if>
  119. <#if item.isSpecial()><span style="font-size:16px;font-weight: bold"> 异 </span></#if>
  120. </td>
  121. <td>
  122. <#if item.getMinOrderAmount() gt 0 || item.getMaxOrderAmount() gt 0>
  123. ${Amounts.toYuanMustRadix(item.getMinOrderAmount())}元 - ${Amounts.toYuanMustRadix(item.getMaxOrderAmount())}元
  124. </#if>
  125. </td>
  126. <td>
  127. <#var designerGroupDispatchValue = ORM.get(ZTable.class).list(DesignerGroupDispatchValue.class, new Selector("operatorCode", item.getOperatorCode()))/>
  128. <table class="z-table z-bordered-line zi-bd-t-none z-pd3 z-lh150p">
  129. <tr>
  130. <td width="120" class="z-text-left zi-bd-b-none">标准自来稿:</td>
  131. <td class="z-text-left zi-bd-b-none">
  132. <#for value : designerGroupDispatchValue>
  133. <#if value.getRelatedType()==0>${typeMap.get(value.getRelatedValue())},</#if>
  134. </#for>
  135. </td>
  136. </tr>
  137. <tr>
  138. <td width="120" class="z-text-left zi-bd-b-none">改稿自来稿:</td>
  139. <td class="z-text-left zi-bd-b-none">
  140. <#for value : designerGroupDispatchValue>
  141. <#if value.getRelatedType()==4>${typeMap.get(value.getRelatedValue())},</#if>
  142. </#for>
  143. </td>
  144. </tr>
  145. <tr>
  146. <td width="120" class="z-text-left zi-bd-b-none">普通设计:</td>
  147. <td class="z-text-left zi-bd-b-none">
  148. <#for value : designerGroupDispatchValue>
  149. <#if value.getRelatedType()==1>${typeMap.get(value.getRelatedValue())},</#if>
  150. </#for>
  151. </td>
  152. </tr>
  153. <tr>
  154. <td width="120" class="z-text-left zi-bd-b-none">资深设计:</td>
  155. <td class="z-text-left zi-bd-b-none">
  156. <#for value : designerGroupDispatchValue>
  157. <#if value.getRelatedType()==2>${typeMap.get(value.getRelatedValue())},</#if>
  158. </#for>
  159. </td>
  160. </tr>
  161. </table>
  162. </td>
  163. <td>
  164. <#if item.getMaxOrderNum() gt 0>
  165. ${item.getMaxOrderNum()}
  166. </#if>
  167. </td>
  168. <td>
  169. <label class="switch">
  170. <input <#if item.getIsShowCost() == 1>checked</#if> type="checkbox" id="toggleSwitch" onclick="doUpdateDesignerGroupDispatchIsShowCost('${item.getOperatorCode()}',${item.getIsShowCost()})">
  171. <span class="slider"></span>
  172. <#if item.getIsShowCost() == 1>
  173. <span class="labelOn">显示</span>
  174. <#else>
  175. <span class="labelOff">不显示</span>
  176. </#if>
  177. </label>
  178. </td>
  179. <td>${Sqls.toDateTimeString(item.getModifyTime())}</td>
  180. <td>${item.getModifyOperatorCode()}</td>
  181. <td>
  182. <#if item.getStatus() == 1>
  183. <button class="z-button z-green" onclick="doUpdateDesignerGroupDispatchStatus('${item.getOperatorCode()}',${item.getStatus()})">
  184. 已启用
  185. </button>
  186. <#else>
  187. <button class="z-button z-red" onclick="doUpdateDesignerGroupDispatchStatus('${item.getOperatorCode()}',${item.getStatus()})">
  188. 已停用
  189. </button>
  190. </#if>
  191. </td>
  192. </tr>
  193. </#for>
  194. </table>
  195. <script>
  196. function doUpdateDesignerGroupDispatchStatus(operatorCode,status){
  197. Z.confirm("确认" + (status == 1 ? "停用" : "启用") + "该设计师的接单配置?",function(){
  198. var ajax = new Z.Ajax();
  199. ajax.setClassName("DesignerGroupPresenter");
  200. ajax.setMethodName("doUpdateDesignerGroupDispatchStatus");
  201. ajax.addParam("operatorCode",operatorCode);
  202. ajax.addParam("status",status == 1?0:1);
  203. ajax.setFailureAlert();
  204. ajax.setSuccess(function(){
  205. Z.success('修改成功', function(){
  206. location.reload();
  207. });
  208. });
  209. ajax.setLoading(document);
  210. ajax.execute();
  211. });
  212. }
  213. function doUpdateDesignerGroupDispatchIsShowCost(operatorCode,isShowCost){
  214. var ajax = new Z.Ajax();
  215. ajax.setClassName("DesignerGroupPresenter");
  216. ajax.setMethodName("doUpdateDesignerGroupDispatchIsShowCost");
  217. ajax.addParam("operatorCode",operatorCode);
  218. ajax.addParam("isShowCost",isShowCost == 0?1:0);
  219. ajax.setFailureAlert();
  220. ajax.setSuccess(function(){
  221. Z.success('修改成功', function(){
  222. location.reload();
  223. //$("#tableDispatch").reload();
  224. });
  225. });
  226. ajax.setLoading(document);
  227. ajax.execute();
  228. }
  229. var toggleSwitches = document.querySelectorAll('input[type="checkbox"]');
  230. for (var i = 0; i < toggleSwitches.length; i++) {
  231. toggleSwitches[i].addEventListener("click", function(event) {
  232. event.preventDefault(); // 阻止事件的默认行为
  233. });
  234. }
  235. </script>
  236. ${zhiqim_manager_paging(pageResult, "designerGroupDispatch.htm")}
  237. ${zhiqim_manager_content_end()}