productConvertModify.zml 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491
  1. ${request.getValidateScript()}
  2. ${zhiqim_manager_history("productConvert.htm")}
  3. ${zhiqim_manager_breadcrumb_parent("productConvert.htm", "产品单价" , "增加产品单价")}
  4. ${zhiqim_manager_content()}
  5. <script>
  6. function addDesignPrice(prdTypeId,convertId,effectTime){
  7. var temp = document.getElementById('designPrice');
  8. var linum = temp.getElementsByTagName("li").length;
  9. var prdPrice = "prdPrice_"+linum;
  10. var prdPriceDate = "prdPriceDate_"+linum;
  11. var draftType = 2;
  12. document.getElementById("designPrice").innerHTML+= "<li><input type=\"text\" name=\""+prdPrice+"\" id=\""+prdPrice+"\" class=\"z-input z-w180\" value=\"\" placeholder=\"请输入设计单价\">&nbsp;<input type=\"month\" data-month=\""+effectTime+"\" name=\""+prdPriceDate+"\" id=\""+prdPriceDate+"\" class=\"z-input z-w180\" value=\"\">&nbsp;<button class=\"z-button z-blue\" onclick=\"insertDesignPrice(this,'"+prdPrice+"','"+prdPriceDate+"','"+prdTypeId+"','"+convertId+"','"+draftType+"')\">保存</button>&nbsp;<button class=\"z-button z-gray\" onclick=\"delDesignPrice(this)\">删除</button></li>"
  13. getMonth('designPrice');
  14. }
  15. function delDesignPrice(obj,priceId){
  16. var ul=document.getElementById("designPrice");
  17. var oLi=obj.parentNode;
  18. ul.removeChild(oLi);
  19. if(priceId){
  20. var ajax = new Z.Ajax();
  21. ajax.setClassName("ProductConvertAction");
  22. ajax.setMethodName("delDesignPrice");
  23. ajax.addParam(priceId);
  24. ajax.setFailureAlert();
  25. ajax.setSuccess(function(){
  26. Z.success("操作成功",function(){parent.Z.Dialog.close();});
  27. });
  28. ajax.setLoading("delDesignPrice", '正在提交', {disabled:true});
  29. ajax.execute();
  30. }
  31. }
  32. function useDesignPrice(obj,priceId){
  33. var prdPriceId = document.getElementById("prdPriceId").value;
  34. if(priceId && prdPriceId){
  35. var ajax = new Z.Ajax();
  36. ajax.setClassName("ProductConvertAction");
  37. ajax.setMethodName("useDesignPrice");
  38. ajax.addParam(priceId);
  39. ajax.addParam(prdPriceId);
  40. ajax.setFailureAlert();
  41. ajax.setSuccess(function(){
  42. Z.success("操作成功",function(){parent.Z.Dialog.close();});
  43. });
  44. ajax.setLoading("useDesignPrice", '正在提交', {disabled:true});
  45. ajax.execute();
  46. }
  47. }
  48. function addSrPrice(prdTypeId,convertId,effectTime){
  49. var temp = document.getElementById('srPrice');
  50. var linum = temp.getElementsByTagName("li").length;
  51. var srPrice = "srPrice_"+linum;
  52. var srPriceDate = "srPriceDate_"+linum;
  53. var draftType = 3;
  54. document.getElementById("srPrice").innerHTML+= "<li><input type=\"text\" name=\""+srPrice+"\" id=\""+srPrice+"\" class=\"z-input z-w180\" value=\"\" placeholder=\"请输入资深设计单价\">&nbsp;<input type=\"month\" data-month=\""+effectTime+"\" name=\""+srPriceDate+"\" id=\""+srPriceDate+"\" class=\"z-input z-w180\" value=\"\">&nbsp;<button class=\"z-button z-blue\" onclick=\"insertSrPrice(this,'"+srPrice+"','"+srPriceDate+"','"+prdTypeId+"','"+convertId+"','"+draftType+"')\">保存</button>&nbsp;<button class=\"z-button z-gray\" onclick=\"delSrPrice(this)\">删除</button></li>"
  55. getMonth('srPrice');
  56. }
  57. function delSrPrice(obj,priceId){
  58. var ul=document.getElementById("srPrice");
  59. var oLi=obj.parentNode;
  60. ul.removeChild(oLi);
  61. if(priceId){
  62. var ajax = new Z.Ajax();
  63. ajax.setClassName("ProductConvertAction");
  64. ajax.setMethodName("delDesignPrice");
  65. ajax.addParam(priceId);
  66. ajax.setFailureAlert();
  67. ajax.setSuccess(function(){
  68. Z.success("操作成功",function(){parent.Z.Dialog.close();});
  69. });
  70. ajax.setLoading("delDesignPrice", '正在提交', {disabled:true});
  71. ajax.execute();
  72. }
  73. }
  74. function useSrPrice(obj,priceId){
  75. var srPriceId = document.getElementById("srPriceId").value;
  76. if(priceId && srPriceId){
  77. var ajax = new Z.Ajax();
  78. ajax.setClassName("ProductConvertAction");
  79. ajax.setMethodName("useDesignPrice");
  80. ajax.addParam(priceId);
  81. ajax.addParam(srPriceId);
  82. ajax.setFailureAlert();
  83. ajax.setSuccess(function(){
  84. Z.success("操作成功",function(){parent.Z.Dialog.close();});
  85. });
  86. ajax.setLoading("useDesignPrice", '正在提交', {disabled:true});
  87. ajax.execute();
  88. }
  89. }
  90. function addRewritePrice(prdTypeId,convertId,effectTime){
  91. var temp = document.getElementById('rewritePrice');
  92. var linum = temp.getElementsByTagName("li").length
  93. var templateDraftPrice = "templateDraftPrice_"+linum;
  94. var rewritePriceDate = "rewritePriceDate_"+linum;
  95. var draftType = 1;
  96. document.getElementById("rewritePrice").innerHTML+= "<li><input type=\"text\" name=\""+templateDraftPrice+"\" id=\""+templateDraftPrice+"\" class=\"z-input z-w180\" value=\"\" placeholder=\"请输入改稿价格\">&nbsp;<input type=\"month\" data-month=\""+effectTime+"\" name=\""+rewritePriceDate+"\" id=\""+rewritePriceDate+"\" class=\"z-input z-w180\" value=\"\">&nbsp;<button class=\"z-button z-blue\" onclick=\"insertRewritePrice(this,'"+templateDraftPrice+"','"+rewritePriceDate+"','"+prdTypeId+"','"+convertId+"','"+draftType+"')\">保存</button>&nbsp;<button class=\"z-button z-gray\" onclick=\"delRewritePrice(this)\">删除</button></li>"
  97. getMonth('rewritePrice');
  98. }
  99. function delRewritePrice(obj,priceId){
  100. var ul=document.getElementById("rewritePrice");
  101. var oLi=obj.parentNode;
  102. ul.removeChild(oLi)
  103. if(priceId){
  104. var ajax = new Z.Ajax();
  105. ajax.setClassName("ProductConvertAction");
  106. ajax.setMethodName("delDesignPrice");
  107. ajax.addParam(priceId);
  108. ajax.setFailureAlert();
  109. ajax.setSuccess(function(){
  110. Z.success("操作成功",function(){parent.Z.Dialog.close();});
  111. });
  112. ajax.setLoading("delDesignPrice", '正在提交', {disabled:true});
  113. ajax.execute();
  114. }
  115. }
  116. function insertDesignPrice(obj,prdPrice,prdPriceDate,prdTypeId,convertId,draftType){
  117. var prdPrice = document.getElementById(prdPrice).value;
  118. var prdPriceDate = document.getElementById(prdPriceDate).value;
  119. if(prdPrice!="" && prdPriceDate!=""){
  120. var ajax = new Z.Ajax();
  121. ajax.setClassName("ProductConvertAction");
  122. ajax.setMethodName("insertDesignPrice");
  123. ajax.addParam("prdPrice",prdPrice);
  124. ajax.addParam("prdPriceDate",prdPriceDate);
  125. ajax.addParam("draftType",draftType);
  126. ajax.addParam("prdTypeId",prdTypeId);
  127. ajax.addParam("convertId",convertId);
  128. ajax.setFailureAlert();
  129. ajax.setSuccess(function(){
  130. Z.success("操作成功",function(){window.location.reload();parent.Z.Dialog.close();});
  131. });
  132. ajax.setLoading("insertDesignPrice", '正在提交', {disabled:true});
  133. ajax.execute();
  134. preventSubmit(obj,draftType);
  135. }
  136. else{
  137. preventSubmit(obj,draftType);
  138. Z.alert("请填入必填项!")
  139. }
  140. }
  141. function insertSrPrice(obj,srPrice,srPriceDate,prdTypeId,convertId,draftType){
  142. var srPrice = document.getElementById(srPrice).value;
  143. var srPriceDate = document.getElementById(srPriceDate).value;
  144. if(srPrice!="" && srPriceDate!=""){
  145. var ajax = new Z.Ajax();
  146. ajax.setClassName("ProductConvertAction");
  147. ajax.setMethodName("insertDesignPrice");
  148. ajax.addParam("prdPrice",srPrice);
  149. ajax.addParam("prdPriceDate",srPriceDate);
  150. ajax.addParam("draftType",draftType);
  151. ajax.addParam("prdTypeId",prdTypeId);
  152. ajax.addParam("convertId",convertId);
  153. ajax.setFailureAlert();
  154. ajax.setSuccess(function(){
  155. Z.success("操作成功",function(){window.location.reload();parent.Z.Dialog.close();});
  156. });
  157. ajax.setLoading("insertDesignPrice", '正在提交', {disabled:true});
  158. ajax.execute();
  159. preventSubmit(obj,draftType);
  160. }
  161. else{
  162. preventSubmit(obj,draftType);
  163. Z.alert("请填入必填项!")
  164. }
  165. }
  166. function insertRewritePrice(obj,rewritePrice,rewritePriceDate,prdTypeId,convertId,draftType){
  167. var rewritePrice = document.getElementById(rewritePrice).value;
  168. var rewritePriceDate = document.getElementById(rewritePriceDate).value;
  169. if(rewritePrice!="" && rewritePriceDate!=""){
  170. var ajax = new Z.Ajax();
  171. ajax.setClassName("ProductConvertAction");
  172. ajax.setMethodName("insertDesignPrice");
  173. ajax.addParam("prdPrice",rewritePrice);
  174. ajax.addParam("prdPriceDate",rewritePriceDate);
  175. ajax.addParam("draftType",draftType);
  176. ajax.addParam("prdTypeId",prdTypeId);
  177. ajax.addParam("convertId",convertId);
  178. ajax.setFailureAlert();
  179. ajax.setSuccess(function(){
  180. Z.success("操作成功",function(){window.location.reload();parent.Z.Dialog.close();});
  181. });
  182. ajax.setLoading("insertDesignPrice", '正在提交', {disabled:true});
  183. ajax.execute();
  184. preventSubmit(obj,draftType);
  185. }
  186. else{
  187. preventSubmit(obj,draftType);
  188. Z.alert("请填入必填项!")
  189. }
  190. }
  191. function useRewritePrice(obj,priceId){
  192. var rewritePriceId = document.getElementById("rewritePriceId").value;
  193. if(priceId && rewritePriceId){
  194. var ajax = new Z.Ajax();
  195. ajax.setClassName("ProductConvertAction");
  196. ajax.setMethodName("useDesignPrice");
  197. ajax.addParam(priceId);
  198. ajax.addParam(rewritePriceId);
  199. ajax.setFailureAlert();
  200. ajax.setSuccess(function(){
  201. Z.success("操作成功",function(){parent.Z.Dialog.close();});
  202. });
  203. ajax.setLoading("useDesignPrice", '正在提交', {disabled:true});
  204. ajax.execute();
  205. }
  206. }
  207. function preventSubmit(obj,draftType){
  208. var ul= null;
  209. if(draftType == 2){
  210. ul= document.getElementById("designPrice");
  211. }else if(draftType == 3){
  212. ul= document.getElementById("srPrice");
  213. }else {
  214. ul= document.getElementById("rewritePrice");
  215. }
  216. var oLi=obj.parentNode;
  217. ul.removeChild(oLi);
  218. }
  219. function editDesignPrice(obj,priceId){
  220. var prdPrice = document.getElementById('prdPrice_'+priceId).value;
  221. var prdPriceDate = document.getElementById('prdPriceDate_'+priceId).value;
  222. var draftType = 2;
  223. var ajax = new Z.Ajax();
  224. ajax.setClassName("ProductConvertAction");
  225. ajax.setMethodName("doEditDesignPrice");
  226. ajax.addParam("priceId",priceId);
  227. ajax.addParam("prdPrice",prdPrice);
  228. ajax.addParam("prdPriceDate",prdPriceDate);
  229. ajax.setFailureAlert();
  230. ajax.setSuccess(function(){
  231. Z.success("操作成功",function(){window.location.reload();parent.Z.Dialog.close();});
  232. });
  233. ajax.setLoading("editDesignPrice", '正在提交', {disabled:true});
  234. ajax.execute();
  235. preventSubmit(obj,draftType);
  236. }
  237. function editRewritePrice(obj,priceId){
  238. var prdPrice = document.getElementById("templateDraftPrice_"+priceId).value;
  239. var prdPriceDate = document.getElementById("rewritePriceDate_"+priceId).value;
  240. var draftType = 1;
  241. var ajax = new Z.Ajax();
  242. ajax.setClassName("ProductConvertAction");
  243. ajax.setMethodName("doEditDesignPrice");
  244. ajax.addParam("priceId",priceId);
  245. ajax.addParam("prdPrice",prdPrice);
  246. ajax.addParam("prdPriceDate",prdPriceDate);
  247. ajax.setFailureAlert();
  248. ajax.setSuccess(function(){
  249. Z.success("操作成功",function(){window.location.reload();parent.Z.Dialog.close();});
  250. });
  251. ajax.setLoading("editRewritePrice", '正在提交', {disabled:true});
  252. ajax.execute();
  253. preventSubmit(obj,draftType);
  254. }
  255. function getMonth(price) {
  256. if (price == 'designPrice'){
  257. var temp1 = document.getElementById('designPrice').children;
  258. var i1 = 1
  259. for (i1; i1 < temp1.length; i1++){
  260. if(!temp1[i1].children[1].getAttribute('data-month')){
  261. continue;
  262. }
  263. temp1[i1].children[1].value = temp1[i1].children[1].getAttribute('data-month').substring(0,7)
  264. }
  265. }else if (price == 'rewritePrice'){
  266. var temp = document.getElementById('rewritePrice').children;
  267. var i = 1
  268. for (i; i < temp.length; i++){
  269. if(!temp[i].children[1].getAttribute('data-month')){
  270. continue;
  271. }
  272. temp[i].children[1].value = temp[i].children[1].getAttribute('data-month').substring(0,7)
  273. }
  274. }else{
  275. var temp1 = document.getElementById('designPrice').children;
  276. var i1 = 1
  277. for (i1; i1 < temp1.length; i1++){
  278. if(!temp1[i1].children[1].getAttribute('data-month')){
  279. continue;
  280. }
  281. temp1[i1].children[1].value = temp1[i1].children[1].getAttribute('data-month').substring(0,7)
  282. }
  283. var temp = document.getElementById('rewritePrice').children;
  284. var i = 1
  285. for (i; i < temp.length; i++){
  286. if(!temp[i].children[1].getAttribute('data-month')){
  287. continue;
  288. }
  289. temp[i].children[1].value = temp[i].children[1].getAttribute('data-month').substring(0,7)
  290. }
  291. }
  292. }
  293. window.onload = function() {
  294. getMonth();
  295. }
  296. </script>
  297. <form name="theForm" action="productConvertUpdate.htm" method="post" onSubmit="return validateForm(this);" data-role="z-call-frame">
  298. <input name="convertId" value="${convert.getConvertId()}" type="hidden">
  299. <table class="z-table z-bordered z-h50-tr z-pd10 z-bg-white">
  300. <tr class="zi-h40 z-bg-gray z-bold">
  301. <td colspan="2">修改产品单价</td>
  302. </tr>
  303. <tr>
  304. <td width="40%" align="center">产品</td>
  305. <td width="*">
  306. <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)">
  307. <#for item : DesignTypeDao.list()>
  308. <option value="${item.getTypeId()}" <#if item.getTypeId() == convert.getPrdTypeId()>selected</#if>>${item.getTypeName()}</option>
  309. </#for>
  310. </select>
  311. <span class="z-color-red">&nbsp;*</span>
  312. </td>
  313. </tr>
  314. <tr>
  315. <td align="center">尺寸</td>
  316. <td>
  317. <div style="display:flex;align-items:center;">
  318. 长:小于&nbsp;<input type="text" name="prdSizeWidth" id="prdSizeWidth" data-options="type:Integer;paste:true;" maxlength="8" class="z-input z-w150" value="${convert.getPrdSizeWidth()}" placeholder="填写尺寸时需包含出血">&emsp;宽:小于&nbsp;<input type="text" name="prdSizeHeight" id="prdSizeHeight" data-options="type:Integer;paste:true;" maxlength="8" class="z-input z-w150" value="${convert.getPrdSizeHeight()}" placeholder="填写尺寸时需包含出血">&nbsp;
  319. <span class="z-pointer" data-role="z-tooltip" data-options="placement:top;align:left;width:420px;" data-text="1.若有多个尺寸配置适用,则使用最小适用尺寸范围配置<br>2.配置尺寸需考虑产品出血值<br>3.不支持长宽交叉配置(小于90*小于56和小于92*小于54不允许同时存在)"><svg t="1618819497927" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4064" width="28" height="28"><path d="M512 127.9c51.9 0 102.2 10.1 149.5 30.2 45.7 19.3 86.8 47 122.1 82.3s63 76.4 82.3 122.1c20 47.3 30.2 97.6 30.2 149.5S886 614.2 865.9 661.5c-19.3 45.7-47 86.8-82.3 122.1s-76.4 63-122.1 82.3c-47.3 20-97.6 30.2-149.5 30.2S409.8 886 362.5 865.9c-45.7-19.3-86.8-47-122.1-82.3s-63-76.4-82.3-122.1c-20-47.3-30.2-97.6-30.2-149.5s10.1-102.2 30.2-149.5c19.3-45.7 47-86.8 82.3-122.1s76.4-63 122.1-82.3c47.3-20 97.6-30.2 149.5-30.2m0-64C264.5 63.9 63.9 264.5 63.9 512S264.5 960.1 512 960.1 960.1 759.5 960.1 512 759.5 63.9 512 63.9z" fill="#1296db" p-id="4065"></path><path d="M480 736h64v64h-64zM476.9 686.3c-0.3-9.3-0.4-42.2-0.4-46.8 0-27.3 3.9-50.8 11.6-70.6 5.7-14.9 14.8-30 27.4-45.1 9.3-11.1 25.9-27.2 50-48.4 24-21.2 39.7-38.1 46.9-50.7s10.8-26.4 10.8-41.3c0-27-10.5-50.7-31.6-71.2-21.1-20.4-46.9-30.7-77.5-30.7-29.6 0-54.3 9.3-74.1 27.8-19.8 18.5-32.8 47.4-39 86.8l-71.4-8.5c6.4-52.7 25.5-93.1 57.3-121.1s73.7-42 125.9-42c55.3 0 99.4 15 132.3 45.1 32.9 30.1 49.4 66.5 49.4 109.2 0 24.7-5.8 47.4-17.4 68.3s-34.2 46.2-67.9 76c-22.6 20.1-37.4 34.8-44.4 44.4-6.9 9.5-12.1 20.4-15.4 32.8-3.3 12.3-5.3 58.4-5.8 86.2h-66.7v-0.2z" fill="#1296db" p-id="4066"></path></svg></span>
  320. &nbsp;&nbsp;&nbsp;
  321. <div style="display:flex;align-items:center;">
  322. 别名:<input type="text" name="alias" id="alias" data-options="type:String;paste:true;" maxlength="8" class="z-input z-w150" value="${convert.getAlias()}" placeholder="该尺寸产品别名">&nbsp;
  323. </td>
  324. </tr>
  325. <tr>
  326. <td align="center">面数</td>
  327. <td>
  328. <select name="prdPageName" id="prdPageName" class="z-float-left z-select z-w150" data-role="z-select-search" data-class="${zmr_color_class}">
  329. </select>
  330. </td>
  331. </tr>
  332. <tr>
  333. <td align="center">普通设计单价</td>
  334. <td>
  335. <ul class="rankUl" id='designPrice'>
  336. <li align="right">
  337. <button class='z-button z-blue' onclick="addDesignPrice('${convert.getPrdTypeId()}','${convert.getConvertId()}','${Sqls.toDateString(item.getEffectTime())}')">添加</button>
  338. </li>
  339. <#for item : ProductDesignPriceView>
  340. <#if item.getDraftType() == 2 && item.getStatus() == 1>
  341. <li>
  342. <input type="hidden" id='prdPriceId' value="${item.getPriceId()}">
  343. <input type="text" disabled="disabled" name="prdPrice" id="prdPrice" class="z-input z-w180" value="${Amounts.toYuan(item.getDesignPriceMoney())}" placeholder="请输入设计单价">&nbsp;<input type="month" disabled="disabled" name="prdPriceDate" id="prdPriceDate" data-month="${Sqls.toDateString(item.getEffectTime())}" class="z-input z-w180" value="${Sqls.toDateString(item.getEffectTime())}">&nbsp;<span style='color: blue'>当前使用</span>
  344. </li>
  345. <#elseif item.getDraftType() == 2>
  346. <li>
  347. <input type="text" name="prdPrice_${item.getPriceId()}" id="prdPrice_${item.getPriceId()}" class="z-input z-w180" value="${Amounts.toYuan(item.getDesignPriceMoney())}" placeholder="请输入设计单价">&nbsp;<input type="month" name="prdPriceDate_${item.getPriceId()}" id="prdPriceDate_${item.getPriceId()}" class="z-input z-w180" data-month="${Sqls.toDateString(item.getEffectTime())}" value="${Sqls.toDateString(item.getEffectTime())}">&nbsp;<button class="z-button z-blue" onclick="editDesignPrice(this,'${item.getPriceId()}')">修改</button>&nbsp;<button class="z-button z-gray" onclick="delDesignPrice(this,'${item.getPriceId()}')">删除</button>
  348. &nbsp;<button class="z-button z-gray" onclick="useDesignPrice(this,'${item.getPriceId()}')">立即生效</button>
  349. </li>
  350. </#if>
  351. </#for>
  352. </ul>
  353. </td>
  354. </tr>
  355. <tr>
  356. <td align="center">资深设计单价</td>
  357. <td>
  358. <ul class="rankUl" id='srPrice'>
  359. <li align="right">
  360. <button class='z-button z-blue' onclick="addSrPrice('${convert.getPrdTypeId()}','${convert.getConvertId()}','${Sqls.toDateString(item.getEffectTime())}')">添加</button>
  361. </li>
  362. <#for item : ProductDesignPriceView>
  363. <#if item.getDraftType() == 3 && item.getStatus() == 1>
  364. <li>
  365. <input type="hidden" id='srPriceId' value="${item.getPriceId()}">
  366. <input type="text" disabled="disabled" name="srPrice" id="srPrice" class="z-input z-w180" value="${Amounts.toYuan(item.getDesignPriceMoney())}" placeholder="请输入资深设计单价">&nbsp;<input type="month" disabled="disabled" name="srPriceDate" id="srPriceDate" data-month="${Sqls.toDateString(item.getEffectTime())}" class="z-input z-w180" value="${Sqls.toDateString(item.getEffectTime())}">&nbsp;<span style='color: blue'>当前使用</span>
  367. </li>
  368. <#elseif item.getDraftType() == 3>
  369. <li>
  370. <input type="text" name="srPrice_${item.getPriceId()}" id="srPrice_${item.getPriceId()}" class="z-input z-w180" value="${Amounts.toYuan(item.getDesignPriceMoney())}" placeholder="请输入资深设计单价">&nbsp;<input type="month" name="srPriceDate_${item.getPriceId()}" id="srPriceDate_${item.getPriceId()}" class="z-input z-w180" data-month="${Sqls.toDateString(item.getEffectTime())}" value="${Sqls.toDateString(item.getEffectTime())}">&nbsp;<button class="z-button z-blue" onclick="editSrPrice(this,'${item.getPriceId()}')">修改</button>&nbsp;<button class="z-button z-gray" onclick="delSrPrice(this,'${item.getPriceId()}')">删除</button>
  371. &nbsp;<button class="z-button z-gray" onclick="useSrPrice(this,'${item.getPriceId()}')">立即生效</button>
  372. </li>
  373. </#if>
  374. </#for>
  375. </ul>
  376. </td>
  377. </tr>
  378. <tr>
  379. <td align="center">改稿单价</td>
  380. <td>
  381. <ul class="rankUl" id='rewritePrice'>
  382. <li align="right">
  383. <button class='z-button z-blue' onclick="addRewritePrice('${convert.getPrdTypeId()}','${convert.getConvertId()}','${Sqls.toDateString(item.getEffectTime())}')">添加</button>
  384. </li>
  385. <#for item : ProductDesignPriceView>
  386. <#if item.getDraftType() == 1 && item.getStatus() == 1>
  387. <li>
  388. <input type="hidden" id='rewritePriceId' value="${item.getPriceId()}">
  389. <input type="text" disabled="disabled" name="templateDraftPrice" id="templateDraftPrice" class="z-input z-w180" value="${Amounts.toYuan(item.getDesignPriceMoney())}" placeholder="请输入改稿价格">&nbsp;<input type="month" disabled="disabled" name="rewritePriceDate" id="rewritePriceDate" class="z-input z-w180" data-month="${Sqls.toDateString(item.getEffectTime())}" value="${Sqls.toDateString(item.getEffectTime())}" placeholder="生效时间">&nbsp;<span style='color: blue'>当前使用</span>
  390. </li>
  391. <#elseif item.getDraftType() == 1>
  392. <li>
  393. <input type="text" name="templateDraftPrice_${item.getPriceId()}" id="templateDraftPrice_${item.getPriceId()}" class="z-input z-w180" value="${Amounts.toYuan(item.getDesignPriceMoney())}" placeholder="请输入改稿价格">&nbsp;<input type="month" name="rewritePriceDate_${item.getPriceId()}" id="rewritePriceDate_${item.getPriceId()}" class="z-input z-w180" data-month="${Sqls.toDateString(item.getEffectTime())}" value="${Sqls.toDateString(item.getEffectTime())}" placeholder="生效时间">&nbsp;<button class="z-button z-blue" onclick="editRewritePrice(this,'${item.getPriceId()}')">修改</button>&nbsp;<button class="z-button z-gray" onclick="delRewritePrice(this,'${item.getPriceId()}')">删除</button>
  394. &nbsp;<button class="z-button z-gray" onclick="useRewritePrice(this,'${item.getPriceId()}')">立即生效</button>
  395. </li>
  396. </#if>
  397. </#for>
  398. </ul>
  399. </td>
  400. </tr>
  401. </table>
  402. ${zhiqim_manager_submit()}
  403. </form>
  404. ${zhiqim_manager_content_end()}
  405. <style>
  406. .rankUl>li{
  407. padding-bottom: 10px;
  408. }
  409. .rankUl>li>input{
  410. margin-left: 10px;
  411. }
  412. </style>
  413. <script>
  414. Z.onload(function(){
  415. doQueryPrdAttr(${convert.getPrdTypeId()},'${convert.getPrdPageName()}');
  416. });
  417. function doQueryPrdAttr(prdTypeId,prdPageName){
  418. if(prdTypeId == ''){
  419. Z("#prdPageName").htmlc('<option value="">面数</option>');
  420. return;
  421. }
  422. /*var ajax = new Z.Ajax();
  423. ajax.setClassName("BasePresenter");
  424. ajax.setMethodName("doQueryPrdSizeByTypeId");
  425. ajax.addParam("prdTypeId", prdTypeId);
  426. ajax.setFailureAlert();
  427. ajax.setSuccess(function(){
  428. var obj = Z.J.toObject(this.responseText);
  429. var html = '<option value="">尺寸</option>';
  430. obj.forEach(function(value, key, arr){
  431. var selected = '';
  432. if(value == prdSizeStd){
  433. selected = 'selected';
  434. }
  435. html += '<option value="'+value+'" '+selected+'>'+value+'</option>';
  436. });
  437. Z("#prdSizeStd").htmlc(html);
  438. });
  439. ajax.execute();*/
  440. var ajax = new Z.Ajax();
  441. ajax.setClassName("BasePresenter");
  442. ajax.setMethodName("doQueryPrdPageByTypeId");
  443. ajax.addParam("prdTypeId", prdTypeId);
  444. ajax.setFailureAlert();
  445. ajax.setSuccess(function(){
  446. var obj = Z.J.toObject(this.responseText);
  447. var html = '<option value="">面数</option>';
  448. obj.forEach(function(value, key, arr){
  449. var selected = '';
  450. if(value == prdPageName){
  451. selected = 'selected';
  452. }
  453. html += '<option value="'+value+'" '+selected+'>'+value+'</option>';
  454. });
  455. Z("#prdPageName").htmlc(html);
  456. });
  457. ajax.execute();
  458. }
  459. </script>