Файли
ziqim/Yangcai365_web/manage/zview/sys/productConvert.zml
T
2025-02-20 14:59:35 +08:00

175 рядки
7.1 KiB
Plaintext

${zhiqim_manager_breadcrumb("产品单价")}
${zhiqim_manager_content()}
<script>
function doQueryPrdAttr(prdTypeId,prdSizeStd,prdPageName){
if(prdTypeId == ''){
Z("#prdSizeStd").htmlc('<option value="">尺寸</option>');
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();
}
function doDesignprice(){
var ajax = new Z.Ajax();
ajax.setClassName("ProductConvertAction");
ajax.setMethodName("designPrice");
ajax.setFailureAlert();
ajax.setSuccess(function(){
Z.success("操作成功",function(){parent.Z.Dialog.close();});
});
ajax.execute();
}
</script>
<#-- 导航 -->
<div data-role="z-tabnav" class="z-tabnav-main z-mg-b20 ${zmr_color_class}">
<nav>
<ul>
<!-- <li onclick="Z.L.href('/orderConvertList.htm');">订单折算参数</li>
<li onclick="Z.L.href('/qcParameter.htm');">质检参数</li>
<li onclick="Z.L.href('/qcAwardedType.htm');">质检加分管理</li>-->
<li class="z-active">产品单价</li>
</ul>
<div class="z-float-left z-mg10">
<form name="theForm" action="productConvert.htm" method="post" id="productConvertForm">
<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();">
<option value="">产品</option>
<#for item : DesignTypeDao.list()>
<option value="${item.getTypeId()}" <#if prdTypeId == item.getTypeId()>selected</#if>>${item.getTypeName()}</option>
</#for>
</select>
<!--<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();">
<option value="">尺寸</option>
</select>
<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();">
<option value="">面数</option>
</select> -->
</form>
</div>
<div class="z-text-right z-mg-t10 z-mg-r5">
<!--<button onclick="doDesignprice()">同步设计单价</button>-->
<button class="z-button ${zmr_color_class}" onclick="Z.L.href('productConvertAdd.htm');"><i class="z-font z-add"></i>增加产品单价</button>
<button class="z-button ${zmr_color_class}" onclick="Z.L.check('productConvertModify.htm', 'convertId');"><i class="z-font z-modify"></i>修改产品单价</button>
<button class="z-button z-red" onclick="Z.confirm('您确定删除该产品单价吗?', function(){Z.L.check('productConvertDelete.htm', 'convertId');});"><i class="z-font z-delete"></i>删除产品单价</button>
</div>
</nav>
</div>
<#-- 列表 -->
<table class="z-table z-bordered z-h40-tr z-pd5 z-bg-white z-text-center">
<tr bgcolor="${zmr_thead_bgcolor}">
<td width="100">选择</td>
<td>产品</td>
<td>尺寸</td>
<td>面数</td>
<td>普通设计单价</td>
<td>资深设计单价</td>
<td>改稿单价</td>
<td>最后修改时间</td>
<td>操作人</td>
</tr>
${zhiqim_manager_tr_no_record(pageResult, 10, "暂时没有产品单价信息")}
<#var prdTypeId = 0/>
<#var prdSizeWidth = 0/>
<#var prdSizeHeight = 0/>
<#var foldPrdTypeId = 1804102013509964/>
<#var prdPageName = ""/>
<#for item : pageResult.list()>
<#if item.getPrdTypeId() == foldPrdTypeId && item.getPrdPageName() == prdPageName>
<tr class="z-pointer" ${zhiqim_manager_tr_onmouse()} ${zhiqim_manager_tr_click_radio()}>
<td><input id="convertId" name="convertId" type="radio" data-role="z-radio" data-class="${zmr_color_class}" value="${item.getConvertId()}"></td>
<td>${Global.get(DesignTypeCache.class).getName(item.getPrdTypeId())}</td>
<td>
<#if item.getPrdSizeWidth() gt 0 && item.getPrdSizeHeight() gt 0>
${item.getPrdSizeWidth()}X${item.getPrdSizeHeight()}
<#else>/</#if>
<#if item.getAlias() != null && item.getAlias() != "">
(${item.getAlias()})
<#else></#if>
</td>
<td><#if Validates.isNotEmpty(item.getPrdPageName())>${item.getPrdPageName()}<#else>/</#if></td>
<td>${Amounts.toYuan(item.getDraftCommonDesign())}</td>
<td>${Amounts.toYuan(item.getSrDesign())}</td>
<td>${Amounts.toYuan(item.getDraftTemplate())}</td>
<td>${Sqls.toDateTimeString(item.getUpdateTime())}</td>
<td>${item.getUpdateOperator()}</td>
</tr>
<#elseif (prdTypeId == item.getPrdTypeId() || foldPrdTypeId == item.getPrdTypeId()) && prdSizeWidth == item.getPrdSizeWidth() && prdSizeHeight == item.getPrdSizeHeight()>
<#var prdTypeId = item.getPrdTypeId()/>
<#var prdSizeWidth = item.getPrdSizeWidth()/>
<#var prdSizeHeight = item.getPrdSizeHeight()/>
<#var prdPageName = item.getPrdPageName()/>
<#continue/>
<#else>
<tr class="z-pointer" ${zhiqim_manager_tr_onmouse()} ${zhiqim_manager_tr_click_radio()}>
<td><input id="convertId" name="convertId" type="radio" data-role="z-radio" data-class="${zmr_color_class}" value="${item.getConvertId()}"></td>
<td>${Global.get(DesignTypeCache.class).getName(item.getPrdTypeId())}</td>
<td>
<#if item.getPrdSizeWidth() gt 0 && item.getPrdSizeHeight() gt 0>
${item.getPrdSizeWidth()}X${item.getPrdSizeHeight()}
<#else>/</#if>
<#if item.getAlias() != null && item.getAlias() != "">
(${item.getAlias()})
<#else></#if>
</td>
<td><#if Validates.isNotEmpty(item.getPrdPageName())>${item.getPrdPageName()}<#else>/</#if></td>
<td>${Amounts.toYuan(item.getDraftCommonDesign())}</td>
<td>${Amounts.toYuan(item.getSrDesign())}</td>
<td>${Amounts.toYuan(item.getDraftTemplate())}</td>
<td>${Sqls.toDateTimeString(item.getUpdateTime())}</td>
<td>${item.getUpdateOperator()}</td>
</#if>
<#var prdTypeId = item.getPrdTypeId()/>
<#var prdSizeWidth = item.getPrdSizeWidth()/>
<#var prdSizeHeight = item.getPrdSizeHeight()/>
<#var prdPageName = item.getPrdPageName()/>
</tr>
</#for>
</table>
${zhiqim_manager_paging(pageResult,"/productConvert.htm")}
${zhiqim_manager_content_end()}