491 行
23 KiB
Plaintext
491 行
23 KiB
Plaintext
${request.getValidateScript()}
|
|
${zhiqim_manager_history("productConvert.htm")}
|
|
|
|
${zhiqim_manager_breadcrumb_parent("productConvert.htm", "产品单价" , "增加产品单价")}
|
|
${zhiqim_manager_content()}
|
|
<script>
|
|
function addDesignPrice(prdTypeId,convertId,effectTime){
|
|
var temp = document.getElementById('designPrice');
|
|
var linum = temp.getElementsByTagName("li").length;
|
|
var prdPrice = "prdPrice_"+linum;
|
|
var prdPriceDate = "prdPriceDate_"+linum;
|
|
var draftType = 2;
|
|
document.getElementById("designPrice").innerHTML+= "<li><input type=\"text\" name=\""+prdPrice+"\" id=\""+prdPrice+"\" class=\"z-input z-w180\" value=\"\" placeholder=\"请输入设计单价\"> <input type=\"month\" data-month=\""+effectTime+"\" name=\""+prdPriceDate+"\" id=\""+prdPriceDate+"\" class=\"z-input z-w180\" value=\"\"> <button class=\"z-button z-blue\" onclick=\"insertDesignPrice(this,'"+prdPrice+"','"+prdPriceDate+"','"+prdTypeId+"','"+convertId+"','"+draftType+"')\">保存</button> <button class=\"z-button z-gray\" onclick=\"delDesignPrice(this)\">删除</button></li>"
|
|
getMonth('designPrice');
|
|
}
|
|
|
|
function delDesignPrice(obj,priceId){
|
|
var ul=document.getElementById("designPrice");
|
|
var oLi=obj.parentNode;
|
|
ul.removeChild(oLi);
|
|
|
|
if(priceId){
|
|
var ajax = new Z.Ajax();
|
|
ajax.setClassName("ProductConvertAction");
|
|
ajax.setMethodName("delDesignPrice");
|
|
ajax.addParam(priceId);
|
|
ajax.setFailureAlert();
|
|
ajax.setSuccess(function(){
|
|
Z.success("操作成功",function(){parent.Z.Dialog.close();});
|
|
});
|
|
ajax.setLoading("delDesignPrice", '正在提交', {disabled:true});
|
|
ajax.execute();
|
|
}
|
|
}
|
|
|
|
function useDesignPrice(obj,priceId){
|
|
var prdPriceId = document.getElementById("prdPriceId").value;
|
|
if(priceId && prdPriceId){
|
|
var ajax = new Z.Ajax();
|
|
ajax.setClassName("ProductConvertAction");
|
|
ajax.setMethodName("useDesignPrice");
|
|
ajax.addParam(priceId);
|
|
ajax.addParam(prdPriceId);
|
|
ajax.setFailureAlert();
|
|
ajax.setSuccess(function(){
|
|
Z.success("操作成功",function(){parent.Z.Dialog.close();});
|
|
});
|
|
ajax.setLoading("useDesignPrice", '正在提交', {disabled:true});
|
|
ajax.execute();
|
|
}
|
|
}
|
|
|
|
function addSrPrice(prdTypeId,convertId,effectTime){
|
|
var temp = document.getElementById('srPrice');
|
|
var linum = temp.getElementsByTagName("li").length;
|
|
var srPrice = "srPrice_"+linum;
|
|
var srPriceDate = "srPriceDate_"+linum;
|
|
var draftType = 3;
|
|
document.getElementById("srPrice").innerHTML+= "<li><input type=\"text\" name=\""+srPrice+"\" id=\""+srPrice+"\" class=\"z-input z-w180\" value=\"\" placeholder=\"请输入资深设计单价\"> <input type=\"month\" data-month=\""+effectTime+"\" name=\""+srPriceDate+"\" id=\""+srPriceDate+"\" class=\"z-input z-w180\" value=\"\"> <button class=\"z-button z-blue\" onclick=\"insertSrPrice(this,'"+srPrice+"','"+srPriceDate+"','"+prdTypeId+"','"+convertId+"','"+draftType+"')\">保存</button> <button class=\"z-button z-gray\" onclick=\"delSrPrice(this)\">删除</button></li>"
|
|
getMonth('srPrice');
|
|
}
|
|
|
|
function delSrPrice(obj,priceId){
|
|
var ul=document.getElementById("srPrice");
|
|
var oLi=obj.parentNode;
|
|
ul.removeChild(oLi);
|
|
|
|
if(priceId){
|
|
var ajax = new Z.Ajax();
|
|
ajax.setClassName("ProductConvertAction");
|
|
ajax.setMethodName("delDesignPrice");
|
|
ajax.addParam(priceId);
|
|
ajax.setFailureAlert();
|
|
ajax.setSuccess(function(){
|
|
Z.success("操作成功",function(){parent.Z.Dialog.close();});
|
|
});
|
|
ajax.setLoading("delDesignPrice", '正在提交', {disabled:true});
|
|
ajax.execute();
|
|
}
|
|
}
|
|
|
|
function useSrPrice(obj,priceId){
|
|
var srPriceId = document.getElementById("srPriceId").value;
|
|
if(priceId && srPriceId){
|
|
var ajax = new Z.Ajax();
|
|
ajax.setClassName("ProductConvertAction");
|
|
ajax.setMethodName("useDesignPrice");
|
|
ajax.addParam(priceId);
|
|
ajax.addParam(srPriceId);
|
|
ajax.setFailureAlert();
|
|
ajax.setSuccess(function(){
|
|
Z.success("操作成功",function(){parent.Z.Dialog.close();});
|
|
});
|
|
ajax.setLoading("useDesignPrice", '正在提交', {disabled:true});
|
|
ajax.execute();
|
|
}
|
|
}
|
|
|
|
function addRewritePrice(prdTypeId,convertId,effectTime){
|
|
var temp = document.getElementById('rewritePrice');
|
|
var linum = temp.getElementsByTagName("li").length
|
|
var templateDraftPrice = "templateDraftPrice_"+linum;
|
|
var rewritePriceDate = "rewritePriceDate_"+linum;
|
|
var draftType = 1;
|
|
document.getElementById("rewritePrice").innerHTML+= "<li><input type=\"text\" name=\""+templateDraftPrice+"\" id=\""+templateDraftPrice+"\" class=\"z-input z-w180\" value=\"\" placeholder=\"请输入改稿价格\"> <input type=\"month\" data-month=\""+effectTime+"\" name=\""+rewritePriceDate+"\" id=\""+rewritePriceDate+"\" class=\"z-input z-w180\" value=\"\"> <button class=\"z-button z-blue\" onclick=\"insertRewritePrice(this,'"+templateDraftPrice+"','"+rewritePriceDate+"','"+prdTypeId+"','"+convertId+"','"+draftType+"')\">保存</button> <button class=\"z-button z-gray\" onclick=\"delRewritePrice(this)\">删除</button></li>"
|
|
getMonth('rewritePrice');
|
|
}
|
|
|
|
function delRewritePrice(obj,priceId){
|
|
var ul=document.getElementById("rewritePrice");
|
|
var oLi=obj.parentNode;
|
|
ul.removeChild(oLi)
|
|
|
|
if(priceId){
|
|
var ajax = new Z.Ajax();
|
|
ajax.setClassName("ProductConvertAction");
|
|
ajax.setMethodName("delDesignPrice");
|
|
ajax.addParam(priceId);
|
|
ajax.setFailureAlert();
|
|
ajax.setSuccess(function(){
|
|
Z.success("操作成功",function(){parent.Z.Dialog.close();});
|
|
});
|
|
ajax.setLoading("delDesignPrice", '正在提交', {disabled:true});
|
|
ajax.execute();
|
|
}
|
|
}
|
|
|
|
function insertDesignPrice(obj,prdPrice,prdPriceDate,prdTypeId,convertId,draftType){
|
|
var prdPrice = document.getElementById(prdPrice).value;
|
|
var prdPriceDate = document.getElementById(prdPriceDate).value;
|
|
if(prdPrice!="" && prdPriceDate!=""){
|
|
var ajax = new Z.Ajax();
|
|
ajax.setClassName("ProductConvertAction");
|
|
ajax.setMethodName("insertDesignPrice");
|
|
ajax.addParam("prdPrice",prdPrice);
|
|
ajax.addParam("prdPriceDate",prdPriceDate);
|
|
ajax.addParam("draftType",draftType);
|
|
ajax.addParam("prdTypeId",prdTypeId);
|
|
ajax.addParam("convertId",convertId);
|
|
ajax.setFailureAlert();
|
|
ajax.setSuccess(function(){
|
|
Z.success("操作成功",function(){window.location.reload();parent.Z.Dialog.close();});
|
|
});
|
|
ajax.setLoading("insertDesignPrice", '正在提交', {disabled:true});
|
|
ajax.execute();
|
|
|
|
preventSubmit(obj,draftType);
|
|
}
|
|
else{
|
|
preventSubmit(obj,draftType);
|
|
Z.alert("请填入必填项!")
|
|
}
|
|
}
|
|
|
|
function insertSrPrice(obj,srPrice,srPriceDate,prdTypeId,convertId,draftType){
|
|
var srPrice = document.getElementById(srPrice).value;
|
|
var srPriceDate = document.getElementById(srPriceDate).value;
|
|
if(srPrice!="" && srPriceDate!=""){
|
|
var ajax = new Z.Ajax();
|
|
ajax.setClassName("ProductConvertAction");
|
|
ajax.setMethodName("insertDesignPrice");
|
|
ajax.addParam("prdPrice",srPrice);
|
|
ajax.addParam("prdPriceDate",srPriceDate);
|
|
ajax.addParam("draftType",draftType);
|
|
ajax.addParam("prdTypeId",prdTypeId);
|
|
ajax.addParam("convertId",convertId);
|
|
ajax.setFailureAlert();
|
|
ajax.setSuccess(function(){
|
|
Z.success("操作成功",function(){window.location.reload();parent.Z.Dialog.close();});
|
|
});
|
|
ajax.setLoading("insertDesignPrice", '正在提交', {disabled:true});
|
|
ajax.execute();
|
|
|
|
preventSubmit(obj,draftType);
|
|
}
|
|
else{
|
|
preventSubmit(obj,draftType);
|
|
Z.alert("请填入必填项!")
|
|
}
|
|
}
|
|
|
|
function insertRewritePrice(obj,rewritePrice,rewritePriceDate,prdTypeId,convertId,draftType){
|
|
var rewritePrice = document.getElementById(rewritePrice).value;
|
|
var rewritePriceDate = document.getElementById(rewritePriceDate).value;
|
|
if(rewritePrice!="" && rewritePriceDate!=""){
|
|
var ajax = new Z.Ajax();
|
|
ajax.setClassName("ProductConvertAction");
|
|
ajax.setMethodName("insertDesignPrice");
|
|
ajax.addParam("prdPrice",rewritePrice);
|
|
ajax.addParam("prdPriceDate",rewritePriceDate);
|
|
ajax.addParam("draftType",draftType);
|
|
ajax.addParam("prdTypeId",prdTypeId);
|
|
ajax.addParam("convertId",convertId);
|
|
ajax.setFailureAlert();
|
|
ajax.setSuccess(function(){
|
|
Z.success("操作成功",function(){window.location.reload();parent.Z.Dialog.close();});
|
|
});
|
|
ajax.setLoading("insertDesignPrice", '正在提交', {disabled:true});
|
|
ajax.execute();
|
|
|
|
preventSubmit(obj,draftType);
|
|
}
|
|
else{
|
|
preventSubmit(obj,draftType);
|
|
Z.alert("请填入必填项!")
|
|
}
|
|
}
|
|
|
|
function useRewritePrice(obj,priceId){
|
|
var rewritePriceId = document.getElementById("rewritePriceId").value;
|
|
if(priceId && rewritePriceId){
|
|
var ajax = new Z.Ajax();
|
|
ajax.setClassName("ProductConvertAction");
|
|
ajax.setMethodName("useDesignPrice");
|
|
ajax.addParam(priceId);
|
|
ajax.addParam(rewritePriceId);
|
|
ajax.setFailureAlert();
|
|
ajax.setSuccess(function(){
|
|
Z.success("操作成功",function(){parent.Z.Dialog.close();});
|
|
});
|
|
ajax.setLoading("useDesignPrice", '正在提交', {disabled:true});
|
|
ajax.execute();
|
|
}
|
|
}
|
|
|
|
function preventSubmit(obj,draftType){
|
|
var ul= null;
|
|
if(draftType == 2){
|
|
ul= document.getElementById("designPrice");
|
|
}else if(draftType == 3){
|
|
ul= document.getElementById("srPrice");
|
|
}else {
|
|
ul= document.getElementById("rewritePrice");
|
|
}
|
|
var oLi=obj.parentNode;
|
|
ul.removeChild(oLi);
|
|
}
|
|
|
|
function editDesignPrice(obj,priceId){
|
|
var prdPrice = document.getElementById('prdPrice_'+priceId).value;
|
|
var prdPriceDate = document.getElementById('prdPriceDate_'+priceId).value;
|
|
var draftType = 2;
|
|
var ajax = new Z.Ajax();
|
|
ajax.setClassName("ProductConvertAction");
|
|
ajax.setMethodName("doEditDesignPrice");
|
|
ajax.addParam("priceId",priceId);
|
|
ajax.addParam("prdPrice",prdPrice);
|
|
ajax.addParam("prdPriceDate",prdPriceDate);
|
|
ajax.setFailureAlert();
|
|
ajax.setSuccess(function(){
|
|
Z.success("操作成功",function(){window.location.reload();parent.Z.Dialog.close();});
|
|
});
|
|
ajax.setLoading("editDesignPrice", '正在提交', {disabled:true});
|
|
ajax.execute();
|
|
preventSubmit(obj,draftType);
|
|
}
|
|
|
|
function editRewritePrice(obj,priceId){
|
|
var prdPrice = document.getElementById("templateDraftPrice_"+priceId).value;
|
|
var prdPriceDate = document.getElementById("rewritePriceDate_"+priceId).value;
|
|
var draftType = 1;
|
|
var ajax = new Z.Ajax();
|
|
ajax.setClassName("ProductConvertAction");
|
|
ajax.setMethodName("doEditDesignPrice");
|
|
ajax.addParam("priceId",priceId);
|
|
ajax.addParam("prdPrice",prdPrice);
|
|
ajax.addParam("prdPriceDate",prdPriceDate);
|
|
ajax.setFailureAlert();
|
|
ajax.setSuccess(function(){
|
|
Z.success("操作成功",function(){window.location.reload();parent.Z.Dialog.close();});
|
|
});
|
|
ajax.setLoading("editRewritePrice", '正在提交', {disabled:true});
|
|
ajax.execute();
|
|
preventSubmit(obj,draftType);
|
|
}
|
|
|
|
|
|
function getMonth(price) {
|
|
if (price == 'designPrice'){
|
|
var temp1 = document.getElementById('designPrice').children;
|
|
var i1 = 1
|
|
for (i1; i1 < temp1.length; i1++){
|
|
if(!temp1[i1].children[1].getAttribute('data-month')){
|
|
continue;
|
|
}
|
|
temp1[i1].children[1].value = temp1[i1].children[1].getAttribute('data-month').substring(0,7)
|
|
}
|
|
}else if (price == 'rewritePrice'){
|
|
var temp = document.getElementById('rewritePrice').children;
|
|
var i = 1
|
|
for (i; i < temp.length; i++){
|
|
if(!temp[i].children[1].getAttribute('data-month')){
|
|
continue;
|
|
}
|
|
temp[i].children[1].value = temp[i].children[1].getAttribute('data-month').substring(0,7)
|
|
}
|
|
}else{
|
|
var temp1 = document.getElementById('designPrice').children;
|
|
var i1 = 1
|
|
for (i1; i1 < temp1.length; i1++){
|
|
if(!temp1[i1].children[1].getAttribute('data-month')){
|
|
continue;
|
|
}
|
|
temp1[i1].children[1].value = temp1[i1].children[1].getAttribute('data-month').substring(0,7)
|
|
}
|
|
|
|
var temp = document.getElementById('rewritePrice').children;
|
|
var i = 1
|
|
for (i; i < temp.length; i++){
|
|
if(!temp[i].children[1].getAttribute('data-month')){
|
|
continue;
|
|
}
|
|
temp[i].children[1].value = temp[i].children[1].getAttribute('data-month').substring(0,7)
|
|
}
|
|
}
|
|
}
|
|
|
|
window.onload = function() {
|
|
getMonth();
|
|
}
|
|
</script>
|
|
|
|
<form name="theForm" action="productConvertUpdate.htm" method="post" onSubmit="return validateForm(this);" data-role="z-call-frame">
|
|
<input name="convertId" value="${convert.getConvertId()}" type="hidden">
|
|
<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="2">修改产品单价</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="40%" align="center">产品</td>
|
|
<td width="*">
|
|
<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)">
|
|
<#for item : DesignTypeDao.list()>
|
|
<option value="${item.getTypeId()}" <#if item.getTypeId() == convert.getPrdTypeId()>selected</#if>>${item.getTypeName()}</option>
|
|
</#for>
|
|
</select>
|
|
<span class="z-color-red"> *</span>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center">尺寸</td>
|
|
<td>
|
|
<div style="display:flex;align-items:center;">
|
|
长:小于 <input type="text" name="prdSizeWidth" id="prdSizeWidth" data-options="type:Integer;paste:true;" maxlength="8" class="z-input z-w150" value="${convert.getPrdSizeWidth()}" placeholder="填写尺寸时需包含出血"> 宽:小于 <input type="text" name="prdSizeHeight" id="prdSizeHeight" data-options="type:Integer;paste:true;" maxlength="8" class="z-input z-w150" value="${convert.getPrdSizeHeight()}" placeholder="填写尺寸时需包含出血">
|
|
<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>
|
|
|
|
<div style="display:flex;align-items:center;">
|
|
别名:<input type="text" name="alias" id="alias" data-options="type:String;paste:true;" maxlength="8" class="z-input z-w150" value="${convert.getAlias()}" placeholder="该尺寸产品别名">
|
|
</td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<td align="center">面数</td>
|
|
<td>
|
|
<select name="prdPageName" id="prdPageName" class="z-float-left z-select z-w150" data-role="z-select-search" data-class="${zmr_color_class}">
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center">普通设计单价</td>
|
|
<td>
|
|
<ul class="rankUl" id='designPrice'>
|
|
<li align="right">
|
|
<button class='z-button z-blue' onclick="addDesignPrice('${convert.getPrdTypeId()}','${convert.getConvertId()}','${Sqls.toDateString(item.getEffectTime())}')">添加</button>
|
|
</li>
|
|
<#for item : ProductDesignPriceView>
|
|
<#if item.getDraftType() == 2 && item.getStatus() == 1>
|
|
<li>
|
|
<input type="hidden" id='prdPriceId' value="${item.getPriceId()}">
|
|
<input type="text" disabled="disabled" name="prdPrice" id="prdPrice" class="z-input z-w180" value="${Amounts.toYuan(item.getDesignPriceMoney())}" placeholder="请输入设计单价"> <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())}"> <span style='color: blue'>当前使用</span>
|
|
</li>
|
|
<#elseif item.getDraftType() == 2>
|
|
<li>
|
|
<input type="text" name="prdPrice_${item.getPriceId()}" id="prdPrice_${item.getPriceId()}" class="z-input z-w180" value="${Amounts.toYuan(item.getDesignPriceMoney())}" placeholder="请输入设计单价"> <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())}"> <button class="z-button z-blue" onclick="editDesignPrice(this,'${item.getPriceId()}')">修改</button> <button class="z-button z-gray" onclick="delDesignPrice(this,'${item.getPriceId()}')">删除</button>
|
|
<button class="z-button z-gray" onclick="useDesignPrice(this,'${item.getPriceId()}')">立即生效</button>
|
|
</li>
|
|
</#if>
|
|
</#for>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center">资深设计单价</td>
|
|
<td>
|
|
<ul class="rankUl" id='srPrice'>
|
|
<li align="right">
|
|
<button class='z-button z-blue' onclick="addSrPrice('${convert.getPrdTypeId()}','${convert.getConvertId()}','${Sqls.toDateString(item.getEffectTime())}')">添加</button>
|
|
</li>
|
|
<#for item : ProductDesignPriceView>
|
|
<#if item.getDraftType() == 3 && item.getStatus() == 1>
|
|
<li>
|
|
<input type="hidden" id='srPriceId' value="${item.getPriceId()}">
|
|
<input type="text" disabled="disabled" name="srPrice" id="srPrice" class="z-input z-w180" value="${Amounts.toYuan(item.getDesignPriceMoney())}" placeholder="请输入资深设计单价"> <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())}"> <span style='color: blue'>当前使用</span>
|
|
</li>
|
|
<#elseif item.getDraftType() == 3>
|
|
<li>
|
|
<input type="text" name="srPrice_${item.getPriceId()}" id="srPrice_${item.getPriceId()}" class="z-input z-w180" value="${Amounts.toYuan(item.getDesignPriceMoney())}" placeholder="请输入资深设计单价"> <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())}"> <button class="z-button z-blue" onclick="editSrPrice(this,'${item.getPriceId()}')">修改</button> <button class="z-button z-gray" onclick="delSrPrice(this,'${item.getPriceId()}')">删除</button>
|
|
<button class="z-button z-gray" onclick="useSrPrice(this,'${item.getPriceId()}')">立即生效</button>
|
|
</li>
|
|
</#if>
|
|
</#for>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center">改稿单价</td>
|
|
<td>
|
|
<ul class="rankUl" id='rewritePrice'>
|
|
<li align="right">
|
|
<button class='z-button z-blue' onclick="addRewritePrice('${convert.getPrdTypeId()}','${convert.getConvertId()}','${Sqls.toDateString(item.getEffectTime())}')">添加</button>
|
|
</li>
|
|
<#for item : ProductDesignPriceView>
|
|
<#if item.getDraftType() == 1 && item.getStatus() == 1>
|
|
<li>
|
|
<input type="hidden" id='rewritePriceId' value="${item.getPriceId()}">
|
|
<input type="text" disabled="disabled" name="templateDraftPrice" id="templateDraftPrice" class="z-input z-w180" value="${Amounts.toYuan(item.getDesignPriceMoney())}" placeholder="请输入改稿价格"> <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="生效时间"> <span style='color: blue'>当前使用</span>
|
|
</li>
|
|
<#elseif item.getDraftType() == 1>
|
|
<li>
|
|
<input type="text" name="templateDraftPrice_${item.getPriceId()}" id="templateDraftPrice_${item.getPriceId()}" class="z-input z-w180" value="${Amounts.toYuan(item.getDesignPriceMoney())}" placeholder="请输入改稿价格"> <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="生效时间"> <button class="z-button z-blue" onclick="editRewritePrice(this,'${item.getPriceId()}')">修改</button> <button class="z-button z-gray" onclick="delRewritePrice(this,'${item.getPriceId()}')">删除</button>
|
|
<button class="z-button z-gray" onclick="useRewritePrice(this,'${item.getPriceId()}')">立即生效</button>
|
|
</li>
|
|
</#if>
|
|
</#for>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
${zhiqim_manager_submit()}
|
|
</form>
|
|
${zhiqim_manager_content_end()}
|
|
<style>
|
|
.rankUl>li{
|
|
padding-bottom: 10px;
|
|
}
|
|
.rankUl>li>input{
|
|
margin-left: 10px;
|
|
}
|
|
</style>
|
|
<script>
|
|
Z.onload(function(){
|
|
doQueryPrdAttr(${convert.getPrdTypeId()},'${convert.getPrdPageName()}');
|
|
});
|
|
|
|
function doQueryPrdAttr(prdTypeId,prdPageName){
|
|
if(prdTypeId == ''){
|
|
Z("#prdPageName").htmlc('<option value="">面数</option>');
|
|
return;
|
|
}
|
|
/*var ajax = new Z.Ajax();
|
|
ajax.setClassName("BasePresenter");
|
|
ajax.setMethodName("doQueryPrdSizeByTypeId");
|
|
ajax.addParam("prdTypeId", prdTypeId);
|
|
ajax.setFailureAlert();
|
|
ajax.setSuccess(function(){
|
|
var obj = Z.J.toObject(this.responseText);
|
|
var html = '<option value="">尺寸</option>';
|
|
obj.forEach(function(value, key, arr){
|
|
var selected = '';
|
|
if(value == prdSizeStd){
|
|
selected = 'selected';
|
|
}
|
|
|
|
html += '<option value="'+value+'" '+selected+'>'+value+'</option>';
|
|
});
|
|
|
|
Z("#prdSizeStd").htmlc(html);
|
|
});
|
|
ajax.execute();*/
|
|
|
|
var ajax = new Z.Ajax();
|
|
ajax.setClassName("BasePresenter");
|
|
ajax.setMethodName("doQueryPrdPageByTypeId");
|
|
ajax.addParam("prdTypeId", prdTypeId);
|
|
ajax.setFailureAlert();
|
|
ajax.setSuccess(function(){
|
|
var obj = Z.J.toObject(this.responseText);
|
|
var html = '<option value="">面数</option>';
|
|
obj.forEach(function(value, key, arr){
|
|
var selected = '';
|
|
if(value == prdPageName){
|
|
selected = 'selected';
|
|
}
|
|
html += '<option value="'+value+'" '+selected+'>'+value+'</option>';
|
|
});
|
|
|
|
Z("#prdPageName").htmlc(html);
|
|
});
|
|
ajax.execute();
|
|
}
|
|
</script> |