⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 editproductpromorules.ftl

📁 国外的一套开源CRM
💻 FTL
📖 第 1 页 / 共 3 页
字号:
<#--
 *  Copyright (c) 2003 The Open For Business Project - www.ofbiz.org
 *
 *  Permission is hereby granted, free of charge, to any person obtaining a
 *  copy of this software and associated documentation files (the "Software"),
 *  to deal in the Software without restriction, including without limitation
 *  the rights to use, copy, modify, merge, publish, distribute, sublicense,
 *  and/or sell copies of the Software, and to permit persons to whom the
 *  Software is furnished to do so, subject to the following conditions:
 *
 *  The above copyright notice and this permission notice shall be included
 *  in all copies or substantial portions of the Software.
 *
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 *  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 *  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 *  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
 *  OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
 *  THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 *
 *@author     David E. Jones (jonesde@ofbiz.org)
 *@author     Brad Steiner (bsteiner@thehungersite.com)
 *@author     Catherine.Heintz@nereide.biz (migration to UiLabel)
 *@version    $Revision: 1.19 $
 *@since      2.2
-->
<#assign uiLabelMap = requestAttributes.uiLabelMap>
<#if hasPermission>
${pages.get("/promo/PromoTabBar.ftl")}

    <div class="head1">${uiLabelMap.ProductRules} <span class="head2">${uiLabelMap.CommonFor} <#if productPromo?exists>${(productPromo.promoName)?if_exists}</#if> [${uiLabelMap.CommonId}:${productPromoId?if_exists}]</span></div>
    <a href="<@ofbizUrl>/EditProductPromo</@ofbizUrl>" class="buttontext">[${uiLabelMap.ProductNewProductPromo}]</a>
    <br>
    <br>
    <#if productPromoId?exists && productPromo?exists>

        <#-- ======================= Rules ======================== -->

        <table border="1" width="100%" cellpadding="2" cellspacing="0">
        <tr>
            <td width="10%"><div class="tabletext"><b>${uiLabelMap.ProductRuleId}</b></div></td>
            <td width="80%"><div class="tabletext"><b>${uiLabelMap.ProductRuleName}</b></div></td>
            <td width="10%"><div class="tabletext"><b>&nbsp;</b></div></td>
        </tr>
        <#list productPromoRules as productPromoRule>
        <#assign productPromoConds = productPromoRule.getRelated("ProductPromoCond")>
        <#assign productPromoActions = productPromoRule.getRelated("ProductPromoAction")>
        <tr valign="middle">
            <td><div class="tabletext"><b>${(productPromoRule.productPromoRuleId)?if_exists}</b></div></td>
            <td align="left">
                <form method="POST" action="<@ofbizUrl>/updateProductPromoRule</@ofbizUrl>">
                    <input type="hidden" name="productPromoId" value="${(productPromoRule.productPromoId)?if_exists}">
                    <input type="hidden" name="productPromoRuleId" value="${(productPromoRule.productPromoRuleId)?if_exists}">
                    <input type="text" size="30" name="ruleName" value="${(productPromoRule.ruleName)?if_exists}" class="inputBox">
                    <input type="submit" value="${uiLabelMap.CommonUpdate}" style="font-size: x-small;">
                </form>
            </td>
            <td align="center">&nbsp;
            <#if (productPromoConds.size() == 0 && productPromoActions.size() == 0)>
                <a href="<@ofbizUrl>/deleteProductPromoRule?productPromoId=${(productPromoRule.productPromoId)?if_exists}&productPromoRuleId=${(productPromoRule.productPromoRuleId)?if_exists}</@ofbizUrl>" class="buttontext">
                [${uiLabelMap.CommonDelete}]</a>
            </#if>
            </td>
        </tr>
        <tr valign="top">
            <td align="right"><div class="tabletext">${uiLabelMap.ProductConditions}:</div></td>
            <td align="left" colspan="2">
                <table border="1" width="100%" cellpadding="2" cellspacing="0">
                <#assign maxCondSeqId = 1>
                <#list productPromoConds as productPromoCond>
                    <tr>
                        <!-- if cur seq id is a number and is greater than max, set new max for input box prefill below -->
                        <#if (productPromoCond.productPromoCondSeqId)?exists>
                            <#assign curCondSeqId = Static["java.lang.Integer"].valueOf(productPromoCond.getString("productPromoCondSeqId"))>
                            <#if (curCondSeqId >= maxCondSeqId)>
                                <#assign maxCondSeqId = curCondSeqId + 1>
                            </#if>
                        </#if>
                        <td><div class="tabletext"><b>${(productPromoCond.productPromoCondSeqId)?if_exists}</b></div></td>
                        <td align="left">
                            <form method=POST action="<@ofbizUrl>/updateProductPromoCond</@ofbizUrl>">
                                <input type=hidden name="productPromoId" value="${(productPromoCond.productPromoId)?if_exists}"/>
                                <input type=hidden name="productPromoRuleId" value="${(productPromoCond.productPromoRuleId)?if_exists}"/>
                                <input type=hidden name="productPromoCondSeqId" value="${(productPromoCond.productPromoCondSeqId)?if_exists}"/>
                                <select name="inputParamEnumId" size=1 class="selectBox">
                                    <#if (productPromoCond.inputParamEnumId)?exists>
                                        <#assign inputParamEnum = productPromoCond.getRelatedOneCache("InputParamEnumeration")>
                                        <option value="${productPromoCond.inputParamEnumId}"><#if inputParamEnum?exists>${(inputParamEnum.description)?if_exists}<#else>[${(productPromoCond.inputParamEnumId)?if_exists}]</#if></option>
                                        <option value="${(productPromoCond.inputParamEnumId)?if_exists}">&nbsp;</option>
                                    <#else>
                                        <option value="">&nbsp;</option>
                                    </#if>
                                    <#list inputParamEnums as inputParamEnum>
                                        <option value="${(inputParamEnum.enumId)?if_exists}">${(inputParamEnum.description)?if_exists}</option>
                                    </#list>
                                </select>
                                <select name="operatorEnumId" size=1 class="selectBox">
                                    <#if (productPromoCond.operatorEnumId)?exists>
                                        <#assign operatorEnum = productPromoCond.getRelatedOneCache("OperatorEnumeration")>
                                        <option value="${(productPromoCond.operatorEnumId)?if_exists}"><#if operatorEnum?exists>${(operatorEnum.description)?if_exists}<#else>[${(productPromoCond.operatorEnumId)?if_exists}]</#if></option>
                                        <option value="${(productPromoCond.operatorEnumId)?if_exists}">&nbsp;</option>
                                    <#else>
                                        <option value="">&nbsp;</option>
                                    </#if>
                                    <#list condOperEnums as condOperEnum>
                                    <option value="${(condOperEnum.enumId)?if_exists}">${(condOperEnum.description)?if_exists}</option>
                                    </#list>
                                </select>
                                <input type=text size="25" name="condValue" value="${(productPromoCond.condValue)?if_exists}" class="inputBox">
                                <input type=submit value="${uiLabelMap.CommonUpdate}" style="font-size: x-small;">
                            </form>
                            <#-- ======================= Categories ======================== -->
                            <div class="tableheadtext">Condition Categories:</div>
                            <#assign condProductPromoCategories = productPromoCond.getRelated("ProductPromoCategory")>
                            <#list condProductPromoCategories as condProductPromoCategory>
                                <#assign condProductCategory = condProductPromoCategory.getRelatedOneCache("ProductCategory")>
                                <#assign condApplEnumeration = condProductPromoCategory.getRelatedOneCache("ApplEnumeration")>
                                <div class="tabletext">
                                    ${(condProductCategory.description)?if_exists} [${condProductPromoCategory.productCategoryId}]
                                    - ${(condApplEnumeration.description)?default(condProductPromoCategory.productPromoApplEnumId)}
                                    - SubCats? ${condProductPromoCategory.includeSubCategories?default("N")}
                                    - And Group: ${condProductPromoCategory.andGroupId}
                                    <a href="<@ofbizUrl>/deleteProductPromoCategory?productPromoId=${(condProductPromoCategory.productPromoId)?if_exists}&productPromoRuleId=${(condProductPromoCategory.productPromoRuleId)?if_exists}&productPromoActionSeqId=${(condProductPromoCategory.productPromoActionSeqId)?if_exists}&productPromoCondSeqId=${(condProductPromoCategory.productPromoCondSeqId)?if_exists}&productCategoryId=${(condProductPromoCategory.productCategoryId)?if_exists}&andGroupId=${(condProductPromoCategory.andGroupId)?if_exists}</@ofbizUrl>" class="buttontext">
                                    [${uiLabelMap.CommonDelete}]</a>
                                </div>
                            </#list>
                            <div class="tabletext">
                                <form method="POST" action="<@ofbizUrl>/createProductPromoCategory</@ofbizUrl>">
                                    <input type="hidden" name="productPromoId" value="${productPromoId}">
                                    <input type="hidden" name="productPromoRuleId" value="${productPromoCond.productPromoRuleId}">
                                    <input type="hidden" name="productPromoActionSeqId" value="_NA_">
                                    <input type="hidden" name="productPromoCondSeqId" value="${productPromoCond.productPromoCondSeqId}">
                                    <select name="productCategoryId" class="selectBox">
                                        <#list productCategories as productCategory>
                                            <option value="${productCategory.productCategoryId}">${productCategory.description}</option>
                                        </#list>
                                    </select>
                                    <select name="productPromoApplEnumId" class="selectBox">
                                        <#list productPromoApplEnums as productPromoApplEnum>
                                            <option value="${productPromoApplEnum.enumId}">${productPromoApplEnum.description}</option>
                                        </#list>
                                    </select>
                                    <select name="includeSubCategories" class="selectBox">
                                        <option value="N">N</option>
                                        <option value="Y">Y</option>
                                    </select>
                                    And Group: <input type="text" size="10" maxlength="20" name="andGroupId" value="_NA_" class="inputBox"/>*
                                    <input type="submit" value="${uiLabelMap.CommonAdd}" style="font-size: x-small;">
                                </form>
                            </div>
                            <#-- ======================= Products ======================== -->
                            <div class="tableheadtext">Condition Products:</div>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -