productConvert.zml 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. ${zhiqim_manager_breadcrumb("产品单价")}
  2. ${zhiqim_manager_content()}
  3. <script>
  4. function doQueryPrdAttr(prdTypeId,prdSizeStd,prdPageName){
  5. if(prdTypeId == ''){
  6. Z("#prdSizeStd").htmlc('<option value="">尺寸</option>');
  7. Z("#prdPageName").htmlc('<option value="">面数</option>');
  8. return;
  9. }
  10. var ajax = new Z.Ajax();
  11. ajax.setClassName("BasePresenter");
  12. ajax.setMethodName("doQueryPrdSizeByTypeId");
  13. ajax.addParam("prdTypeId", prdTypeId);
  14. ajax.setFailureAlert();
  15. ajax.setSuccess(function(){
  16. var obj = Z.J.toObject(this.responseText);
  17. var html = '<option value="">尺寸</option>';
  18. obj.forEach(function(value, key, arr){
  19. var selected = '';
  20. if(value == prdSizeStd){
  21. selected = 'selected';
  22. }
  23. html += '<option value="'+value+'" '+selected+'>'+value+'</option>';
  24. });
  25. Z("#prdSizeStd").htmlc(html);
  26. });
  27. ajax.execute();
  28. var ajax = new Z.Ajax();
  29. ajax.setClassName("BasePresenter");
  30. ajax.setMethodName("doQueryPrdPageByTypeId");
  31. ajax.addParam("prdTypeId", prdTypeId);
  32. ajax.setFailureAlert();
  33. ajax.setSuccess(function(){
  34. var obj = Z.J.toObject(this.responseText);
  35. var html = '<option value="">面数</option>';
  36. obj.forEach(function(value, key, arr){
  37. var selected = '';
  38. if(value == prdPageName){
  39. selected = 'selected';
  40. }
  41. html += '<option value="'+value+'" '+selected+'>'+value+'</option>';
  42. });
  43. Z("#prdPageName").htmlc(html);
  44. });
  45. ajax.execute();
  46. }
  47. function doDesignprice(){
  48. var ajax = new Z.Ajax();
  49. ajax.setClassName("ProductConvertAction");
  50. ajax.setMethodName("designPrice");
  51. ajax.setFailureAlert();
  52. ajax.setSuccess(function(){
  53. Z.success("操作成功",function(){parent.Z.Dialog.close();});
  54. });
  55. ajax.execute();
  56. }
  57. </script>
  58. <#-- 导航 -->
  59. <div data-role="z-tabnav" class="z-tabnav-main z-mg-b20 ${zmr_color_class}">
  60. <nav>
  61. <ul>
  62. <!-- <li onclick="Z.L.href('/orderConvertList.htm');">订单折算参数</li>
  63. <li onclick="Z.L.href('/qcParameter.htm');">质检参数</li>
  64. <li onclick="Z.L.href('/qcAwardedType.htm');">质检加分管理</li>-->
  65. <li class="z-active">产品单价</li>
  66. </ul>
  67. <div class="z-float-left z-mg10">
  68. <form name="theForm" action="productConvert.htm" method="post" id="productConvertForm">
  69. <select name="prdTypeId" class="z-float-left z-select z-w150" data-role="z-select-search" data-class="${zmr_color_class}" onchange="doQueryPrdAttr(this.value);Z('#prdSizeStd').htmlc('');Z('#prdPageName').htmlc('');document.getElementById('productConvertForm').submit();">
  70. <option value="">产品</option>
  71. <#for item : DesignTypeDao.list()>
  72. <option value="${item.getTypeId()}" <#if prdTypeId == item.getTypeId()>selected</#if>>${item.getTypeName()}</option>
  73. </#for>
  74. </select>
  75. <!--<select name="prdSizeStd" id="prdSizeStd" class="z-float-left z-select z-w150" data-role="z-select-search" data-class="${zmr_color_class}" onchange="document.getElementById('productConvertForm').submit();">
  76. <option value="">尺寸</option>
  77. </select>
  78. <select name="prdPageName" id="prdPageName" class="z-float-left z-select z-w150" data-role="z-select-search" data-class="${zmr_color_class}" onchange="document.getElementById('productConvertForm').submit();">
  79. <option value="">面数</option>
  80. </select> -->
  81. </form>
  82. </div>
  83. <div class="z-text-right z-mg-t10 z-mg-r5">
  84. <!--<button onclick="doDesignprice()">同步设计单价</button>-->
  85. <button class="z-button ${zmr_color_class}" onclick="Z.L.href('productConvertAdd.htm');"><i class="z-font z-add"></i>增加产品单价</button>
  86. <button class="z-button ${zmr_color_class}" onclick="Z.L.check('productConvertModify.htm', 'convertId');"><i class="z-font z-modify"></i>修改产品单价</button>
  87. <button class="z-button z-red" onclick="Z.confirm('您确定删除该产品单价吗?', function(){Z.L.check('productConvertDelete.htm', 'convertId');});"><i class="z-font z-delete"></i>删除产品单价</button>
  88. </div>
  89. </nav>
  90. </div>
  91. <#-- 列表 -->
  92. <table class="z-table z-bordered z-h40-tr z-pd5 z-bg-white z-text-center">
  93. <tr bgcolor="${zmr_thead_bgcolor}">
  94. <td width="100">选择</td>
  95. <td>产品</td>
  96. <td>尺寸</td>
  97. <td>面数</td>
  98. <td>普通设计单价</td>
  99. <td>资深设计单价</td>
  100. <td>改稿单价</td>
  101. <td>最后修改时间</td>
  102. <td>操作人</td>
  103. </tr>
  104. ${zhiqim_manager_tr_no_record(pageResult, 10, "暂时没有产品单价信息")}
  105. <#var prdTypeId = 0/>
  106. <#var prdSizeWidth = 0/>
  107. <#var prdSizeHeight = 0/>
  108. <#var foldPrdTypeId = 1804102013509964/>
  109. <#var prdPageName = ""/>
  110. <#for item : pageResult.list()>
  111. <#if item.getPrdTypeId() == foldPrdTypeId && item.getPrdPageName() == prdPageName>
  112. <tr class="z-pointer" ${zhiqim_manager_tr_onmouse()} ${zhiqim_manager_tr_click_radio()}>
  113. <td><input id="convertId" name="convertId" type="radio" data-role="z-radio" data-class="${zmr_color_class}" value="${item.getConvertId()}"></td>
  114. <td>${Global.get(DesignTypeCache.class).getName(item.getPrdTypeId())}</td>
  115. <td>
  116. <#if item.getPrdSizeWidth() gt 0 && item.getPrdSizeHeight() gt 0>
  117. ${item.getPrdSizeWidth()}X${item.getPrdSizeHeight()}
  118. <#else>/</#if>
  119. <#if item.getAlias() != null && item.getAlias() != "">
  120. (${item.getAlias()})
  121. <#else></#if>
  122. </td>
  123. <td><#if Validates.isNotEmpty(item.getPrdPageName())>${item.getPrdPageName()}<#else>/</#if></td>
  124. <td>${Amounts.toYuan(item.getDraftCommonDesign())}</td>
  125. <td>${Amounts.toYuan(item.getSrDesign())}</td>
  126. <td>${Amounts.toYuan(item.getDraftTemplate())}</td>
  127. <td>${Sqls.toDateTimeString(item.getUpdateTime())}</td>
  128. <td>${item.getUpdateOperator()}</td>
  129. </tr>
  130. <#elseif (prdTypeId == item.getPrdTypeId() || foldPrdTypeId == item.getPrdTypeId()) && prdSizeWidth == item.getPrdSizeWidth() && prdSizeHeight == item.getPrdSizeHeight()>
  131. <#var prdTypeId = item.getPrdTypeId()/>
  132. <#var prdSizeWidth = item.getPrdSizeWidth()/>
  133. <#var prdSizeHeight = item.getPrdSizeHeight()/>
  134. <#var prdPageName = item.getPrdPageName()/>
  135. <#continue/>
  136. <#else>
  137. <tr class="z-pointer" ${zhiqim_manager_tr_onmouse()} ${zhiqim_manager_tr_click_radio()}>
  138. <td><input id="convertId" name="convertId" type="radio" data-role="z-radio" data-class="${zmr_color_class}" value="${item.getConvertId()}"></td>
  139. <td>${Global.get(DesignTypeCache.class).getName(item.getPrdTypeId())}</td>
  140. <td>
  141. <#if item.getPrdSizeWidth() gt 0 && item.getPrdSizeHeight() gt 0>
  142. ${item.getPrdSizeWidth()}X${item.getPrdSizeHeight()}
  143. <#else>/</#if>
  144. <#if item.getAlias() != null && item.getAlias() != "">
  145. (${item.getAlias()})
  146. <#else></#if>
  147. </td>
  148. <td><#if Validates.isNotEmpty(item.getPrdPageName())>${item.getPrdPageName()}<#else>/</#if></td>
  149. <td>${Amounts.toYuan(item.getDraftCommonDesign())}</td>
  150. <td>${Amounts.toYuan(item.getSrDesign())}</td>
  151. <td>${Amounts.toYuan(item.getDraftTemplate())}</td>
  152. <td>${Sqls.toDateTimeString(item.getUpdateTime())}</td>
  153. <td>${item.getUpdateOperator()}</td>
  154. </#if>
  155. <#var prdTypeId = item.getPrdTypeId()/>
  156. <#var prdSizeWidth = item.getPrdSizeWidth()/>
  157. <#var prdSizeHeight = item.getPrdSizeHeight()/>
  158. <#var prdPageName = item.getPrdPageName()/>
  159. </tr>
  160. </#for>
  161. </table>
  162. ${zhiqim_manager_paging(pageResult,"/productConvert.htm")}
  163. ${zhiqim_manager_content_end()}