designerGroupDispatch.zml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293
  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 onclick="Z.L.href('receiveMerManage.htm');">组织接单</li>
  64. <li onclick="Z.L.href('designerGroup.htm');">接单条件组</li>
  65. <li class="z-active">设计师接单</li>
  66. <li onclick="Z.L.href('dispatchStat.htm');">派单统计</li>
  67. </ul>
  68. <div class="z-float-left z-mg10 z-lh30">
  69. <form name="theForm">
  70. <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}">
  71. <option value="">选择条件组</option>
  72. <#for item : designerGroupList>
  73. <option value="${item.getDesignerGroupId()}" <#if item.getDesignerGroupId() == designerGroupId>selected</#if>>${item.getDesignerGroupName()}</option>
  74. </#for>
  75. </select>
  76. <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}">
  77. <option value="">选择组织</option>
  78. <#for item : orgList>
  79. <option value="${item.getOrgId()}" <#if orgId == item.getOrgId()>selected</#if>>${item.getOrgName()}</option>
  80. </#for>
  81. </select>
  82. <input class="z-float-left z-input ${zmr_color_class} z-w150 zi-bd-r-none" name="operatorCode" value="${operatorCode}" placeholder="操作员"/>
  83. <button class="z-float-left z-button z-w80 zi-bd-rd0 z-blue"><i class="z-font z-query"></i>查询</button>&nbsp;&nbsp;
  84. <button class="z-float-left z-button z-mg-l10" type="button" onclick="Z.Forms.clearForm(this.form);">清空</button>
  85. </form>
  86. </div>
  87. <div class="z-float-right z-mg-t10 z-mg-r5">
  88. <button class="z-button ${zmr_color_class}" onclick="Z.L.href('designerGroupDispatchAdd.htm');"><i class="z-font z-add"></i>增加设计师配置</button>
  89. <button class="z-button ${zmr_color_class}" onclick="Z.L.check('designerGroupDispatchModify.htm', 'operatorCode');"><i class="z-font z-modify"></i>修改设计师配置</button>
  90. <button class="z-button z-red" onclick="Z.Location.confirm('/designerGroupDispatchDelete.htm', '确认要删除该配置信息?','operatorCode');"><i class="z-font z-delete"></i>删除设计师配置</button>
  91. </div>
  92. </nav>
  93. </div>
  94. <#-- 列表 -->
  95. <table id="tableDispatch" class="z-table z-bordered z-h40-tr z-text-center z-bg-white">
  96. <tr bgcolor="${zmr_thead_bgcolor}">
  97. <td width="50">选择</td>
  98. <td width="120">设计师</td>
  99. <td width="150">接单条件组</td>
  100. <td width="150">独立特殊标识</td>
  101. <td width="150">独立接单金额</td>
  102. <td width="450">独立稿件类型</td>
  103. <td width="50">独立最大接单量</td>
  104. <td width="80">是否显示佣金</td>
  105. <td width="80">是否显示抢单大厅</td>
  106. <td width="10%">操作时间</td>
  107. <td width="5%">操作人</td>
  108. <td width="80">状态</td>
  109. </tr>
  110. ${zhiqim_manager_tr_no_record(pageResult, 10, "暂时没有设计师配置")}
  111. <#for item : pageResult.list()>
  112. <tr class="z-pointer" ${zhiqim_manager_tr_onmouse()} ${zhiqim_manager_tr_click_radio()}>
  113. <td><input name="operatorCode" type="radio" data-role="z-radio" data-class="${zmr_color_class}" value="${item.getOperatorCode()}"></td>
  114. <td>${item.getOperatorCode()}</td>
  115. <td>${designerGroupMap.get(item.getDesignerGroupId())}</td>
  116. <td>
  117. <#if item.isHighQualityOrder()><span style="font-size:16px;font-weight: bold"> 优 </span></#if>
  118. <#if item.isLargeAmount()><span style="font-size:16px;font-weight: bold"> 大 </span></#if>
  119. <#if item.isUrgent()><span style="font-size:16px;font-weight: bold"> 急 </span></#if>
  120. <#if item.isDesign()><span style="font-size:16px;font-weight: bold"> 仅设计 </span></#if>
  121. <#if item.isSpecial()><span style="font-size:16px;font-weight: bold"> 异 </span></#if>
  122. </td>
  123. <td>
  124. <#if item.getMinOrderAmount() gt 0 || item.getMaxOrderAmount() gt 0>
  125. ${Amounts.toYuanMustRadix(item.getMinOrderAmount())}元 - ${Amounts.toYuanMustRadix(item.getMaxOrderAmount())}元
  126. </#if>
  127. </td>
  128. <td>
  129. <#var designerGroupDispatchValue = ORM.get(ZTable.class).list(DesignerGroupDispatchValue.class, new Selector("operatorCode", item.getOperatorCode()))/>
  130. <table class="z-table z-bordered-line zi-bd-t-none z-pd3 z-lh150p">
  131. <tr>
  132. <td width="120" class="z-text-left zi-bd-b-none">标准自来稿:</td>
  133. <td class="z-text-left zi-bd-b-none">
  134. <#for value : designerGroupDispatchValue>
  135. <#if value.getRelatedType()==0>${typeMap.get(value.getRelatedValue())},</#if>
  136. </#for>
  137. </td>
  138. </tr>
  139. <tr>
  140. <td width="120" class="z-text-left zi-bd-b-none">改稿自来稿:</td>
  141. <td class="z-text-left zi-bd-b-none">
  142. <#for value : designerGroupDispatchValue>
  143. <#if value.getRelatedType()==4>${typeMap.get(value.getRelatedValue())},</#if>
  144. </#for>
  145. </td>
  146. </tr>
  147. <tr>
  148. <td width="120" class="z-text-left zi-bd-b-none">普通设计:</td>
  149. <td class="z-text-left zi-bd-b-none">
  150. <#for value : designerGroupDispatchValue>
  151. <#if value.getRelatedType()==1>${typeMap.get(value.getRelatedValue())},</#if>
  152. </#for>
  153. </td>
  154. </tr>
  155. <tr>
  156. <td width="120" class="z-text-left zi-bd-b-none">资深设计:</td>
  157. <td class="z-text-left zi-bd-b-none">
  158. <#for value : designerGroupDispatchValue>
  159. <#if value.getRelatedType()==2>${typeMap.get(value.getRelatedValue())},</#if>
  160. </#for>
  161. </td>
  162. </tr>
  163. </table>
  164. </td>
  165. <td>
  166. <#if item.getMaxOrderNum() gt 0>
  167. ${item.getMaxOrderNum()}
  168. </#if>
  169. </td>
  170. <td>
  171. <label class="switch">
  172. <input <#if item.getIsShowCost() == 1>checked</#if> type="checkbox" id="toggleSwitch" onclick="doUpdateDesignerGroupDispatchIsShowCost('${item.getOperatorCode()}',${item.getIsShowCost()})">
  173. <span class="slider"></span>
  174. <#if item.getIsShowCost() == 1>
  175. <span class="labelOn">显示</span>
  176. <#else>
  177. <span class="labelOff">不显示</span>
  178. </#if>
  179. </label>
  180. </td>
  181. <td>
  182. <label class="switch">
  183. <input <#if item.getIsShowQddt() == 1>checked</#if> type="checkbox" id="toggleSwitchQddt" onclick="doUpdateDesignerGroupDispatchIsShowQddt('${item.getOperatorCode()}',${item.getIsShowQddt()})">
  184. <span class="slider"></span>
  185. <#if item.getIsShowQddt() == 1>
  186. <span class="labelOn">显示</span>
  187. <#else>
  188. <span class="labelOff">不显示</span>
  189. </#if>
  190. </label>
  191. </td>
  192. <td>${Sqls.toDateTimeString(item.getModifyTime())}</td>
  193. <td>${item.getModifyOperatorCode()}</td>
  194. <td>
  195. <#if item.getStatus() == 1>
  196. <button class="z-button z-green" onclick="doUpdateDesignerGroupDispatchStatus('${item.getOperatorCode()}',${item.getStatus()})">
  197. 已启用
  198. </button>
  199. <#else>
  200. <button class="z-button z-red" onclick="doUpdateDesignerGroupDispatchStatus('${item.getOperatorCode()}',${item.getStatus()})">
  201. 已停用
  202. </button>
  203. </#if>
  204. </td>
  205. </tr>
  206. </#for>
  207. </table>
  208. <script>
  209. function doUpdateDesignerGroupDispatchStatus(operatorCode,status){
  210. Z.confirm("确认" + (status == 1 ? "停用" : "启用") + "该设计师的接单配置?",function(){
  211. var ajax = new Z.Ajax();
  212. ajax.setClassName("DesignerGroupPresenter");
  213. ajax.setMethodName("doUpdateDesignerGroupDispatchStatus");
  214. ajax.addParam("operatorCode",operatorCode);
  215. ajax.addParam("status",status == 1?0:1);
  216. ajax.setFailureAlert();
  217. ajax.setSuccess(function(){
  218. Z.success('修改成功', function(){
  219. location.reload();
  220. });
  221. });
  222. ajax.setLoading(document);
  223. ajax.execute();/*
  224. * }); }
  225. *
  226. * /*const toggleSwitch = document.getElementById("toggleSwitch");
  227. * const onText = document.getElementById("onText"); const offText =
  228. * document.getElementById("offText");
  229. * // 监听开关状态改变事件,并更新汉字的显示 toggleSwitch.addEventListener("change",
  230. * function() { if (this.checked) { onText.style.display = "block";
  231. * offText.style.display = "none"; } else { onText.style.display =
  232. * "none"; offText.style.displa
  233. y = "block";*/
  234. });
  235. }
  236. function doUpdateDesignerGroupDispatchIsShowCost(operatorCode,isShowCost){
  237. var ajax = new Z.Ajax();
  238. ajax.setClassName("DesignerGroupPresenter");
  239. ajax.setMethodName("doUpdateDesignerGroupDispatchIsShowCost");
  240. ajax.addParam("operatorCode",operatorCode);
  241. ajax.addParam("isShowCost",isShowCost == 0?1:0);
  242. ajax.setFailureAlert();
  243. ajax.setSuccess(function(){
  244. Z.success('修改成功', function(){
  245. location.reload();
  246. //$("#tableDispatch").reload();
  247. });
  248. });
  249. ajax.setLoading(document);
  250. ajax.execute();
  251. }
  252. function doUpdateDesignerGroupDispatchIsShowQddt(operatorCode,isShowQddt){
  253. var ajax = new Z.Ajax();
  254. ajax.setClassName("DesignerGroupPresenter");
  255. ajax.setMethodName("doUpdateDesignerGroupDispatchIsShowQddt");
  256. ajax.addParam("operatorCode",operatorCode);
  257. ajax.addParam("isShowQddt",isShowQddt == 0?1:0);
  258. ajax.setFailureAlert();
  259. ajax.setSuccess(function(){
  260. Z.success('修改成功', function(){
  261. location.reload();
  262. //$("#tableDispatch").reload();
  263. });
  264. });
  265. ajax.setLoading(document);
  266. ajax.execute();
  267. }
  268. var toggleSwitches = document.querySelectorAll('input[type="checkbox"]');
  269. for (var i = 0; i < toggleSwitches.length; i++) {
  270. toggleSwitches[i].addEventListener("click", function(event) {
  271. event.preventDefault(); // 阻止事件的默认行为
  272. });
  273. }
  274. </script>
  275. ${zhiqim_manager_paging(pageResult, "designerGroupDispatch.htm")}
  276. ${zhiqim_manager_content_end()}