_config.js 2.37 KB



var condition_type_list = [
    {
            name:'condition_combine',
            caption :'顶级组合条件',
            child : [
                { 
                    name:'condition_product',
                    caption :'产品属性组合条件',
                    child :[                        
                        {
                            name:'condition_product_sort',
                            caption :'分类'
                        },
                        {
                            name:'condition_product_brand' ,
                            caption :'品牌'
                        },
                        {
                            name:'condition_promotion_flag',
                            caption :'促销标记'
                            
                        },
                        {
                            name:'condition_special_product',
                            caption :'特定产品'
                        }
                    ]                    
                         
                },
                {
                    name:"condition_payment",
                    caption :'支付方式',
                    html:{
                        operator:{
                            name:"operator",
                            type:"select"
                        },
                        value:{
                            name:"value",
                            type:"select"
                        }
                    }
                }
            ]
        }
        
];

var formDataKey = {
     data : {name: "data"},
     pnodeIndex :{name : "pnodeIndex"},
     curnodeIndex : {name : "nodeIndex"}
 };
 var formSerializeArrayKey={
     name:"name",
     value:"value"
 }  
 var conditon_base_conf = {
        preffixName: "rule_condition",
        splitor:"_",
        firstLevelIndex:0,
        /** condition_type_list 第一级 child 位置*/
        productIndex:0,
        paymentIndex:1,
        /** condition_type_list 第一级 child 位置*/
        product_sort_index:0,
        product_brand_index:1,
        promotion_flag_index:2,
        special_product_index:3

    };

var promotion_config={
    condition_type_list: condition_type_list,
    formDataKey : formDataKey,
    formSerializeArrayKey : formSerializeArrayKey,
    condition_base_conf: conditon_base_conf
}
module.exports = promotion_config;