product.js 7.08 KB
exports.domain = require('../config/common.js').domain;

//路由配置
exports.res = [
    {
        //商品管理【品类列表】页面渲染
        route: '/erpproduct/sort/index',
        method: 'GET',
        view: 'pages/product/index',
        src: '/product/index',
        url: '/product/queryAllProductSortList',
        isJsonRaw:true
    },{
        //商品管理【ajax查询所有品类】
        route: '/product/class/queryAllProductSortList',
        method: 'POST',
        url: '/product/queryAllMaxSortList',
        isJsonRaw:true
    },{
        //商品管理【根据ID ajax查询子品类列表】
        route: '/product/class/queryProductSortList',
        method: 'POST',
        url: '/product/queryProductSortList',
        isJsonRaw:true,
        params: [
            {
                name: 'param',
                type: 'Number'
            }
        ]
    },{
        //商品管理>【添加品类】页面渲染
        route: '/product/class/new',
        method: 'GET',
        view: 'pages/product/new-class',
        noApi:true,
        src: '/product/add',
        data: {
            data: {
                status: 1
            },
            pagetitle:"添加品类",
            action:"/product/sort/addProductSort"
        }
    },{
        //商品管理>【添加品类】ajax请求接口
        route: '/product/sort/addProductSort',
        method: 'POST',
        url: '/product/addProductSort',
        isJsonRaw:true,
        params: [
            {
                name: 'sortName',
                type: 'String'
            },{
                name: 'sortInitials',
                type: 'String'
            },{
                name:'firstSortId',
                type: 'Number'
            },{
                name:'secondSortId',
                type:'Number'
            },{
                name: 'orderBy',
                type: 'Number'
            },{
                name: 'status',
                type: 'Number'
            }
        ]
    },{
        //商品管理>【编辑品类】页面
        route: '/product/class/edit/:param',
        method: 'GET',
        view: 'pages/product/new-class',
        url: '/product/getProductSort',
        src: '/product/add',
        isJsonRaw:true,
        data:{
            pagetitle:"修改品类",
            action:"/product/sort/update"
        },
        params: [
            {
                name: 'param',
                type: 'Number'
            }
        ]
    },{
        //商品管理>【品类列表ajax更新】
        route: '/product/sort/update',
        method: 'POST',
        url: '/product/updateProductSort',
        isJsonRaw:true,
        params: [
            {
                name: 'id',
                type: 'Number'
            },{
                name: 'sortName',
                type: 'String'
            },{
                name: 'sortInitials',
                type: 'String'
            },{
                name:'firstSortId',
                type: 'Number'
            },{
                name:'secondSortId',
                type:'Number'
            },{
                name: 'orderBy',
                type: 'Number'
            },{
                name: 'status',
                type: 'Number'
            }
        ]
    },{
        //商品管理>【产品属性】页面渲染
        route: '/erpproduct/attribute/index',
        method: 'GET',
        view: 'pages/product/product-attr',
        url: '/product/queryAllProductSortList',
        isJsonRaw:true,
        src: '/product/attr'
    },{
        //商品管理>【产品属性ajax获取】
        route: '/product/attr/get',
        method: 'POST',
        url: '/product/getAttr',
        isJsonRaw:true
    },{
        //商品管理>【添加产品属性ajax】
        route: '/product/attr/add',
        method: 'POST',
        url: '/product/addProductAttribute',
        isJsonRaw:true,
        params: [
            {
                name: 'attributeName',
                type: 'String'
            },{
                name: 'saleType',
                type: 'Number'
            },{
                name: 'inputType',
                type: 'String'
            },{
                name: 'attributeType',
                type: 'String'
            },{
                name: 'isMust',
                type: 'String'
            },{
                name: 'isSearch',
                type: 'String'
            },{
                name: 'maxValueLen',
                type: 'Number'
            },{
                name: 'isAllowAlias',
                type: 'String'
            },{
                name: 'orderBy',
                type: 'Number'
            },{
                name: 'state',
                type: 'Number'
            },{
                name: 'remark',
                type: 'String'
            },{
                name: 'attributeValues',
                type: 'String'
            },{

                name: 'displayPosition',
                type: 'Number'
            },{
                name: 'categoryId',
                type: 'Number'
            }
        ]
    },{
        //商品管理>【更新产品属性ajax】
        route: '/product/attr/update',
        method: 'POST',
        url: '/product/updateProductAttribute',
        isJsonRaw:true,
        params: [
            {
                name: 'attributeName',
                type: 'String'
            },{
                name: 'saleType',
                type: 'Number'
            },{
                name: 'inputType',
                type: 'String'
            },{
                name: 'attributeType',
                type: 'String'
            },{
                name: 'isMust',
                type: 'String'
            },{
                name: 'isSearch',
                type: 'String'
            },{
                name: 'maxValueLen',
                type: 'Number'
            },{
                name: 'isAllowAlias',
                type: 'String'
            },{
                name: 'orderBy',
                type: 'Number'
            },{
                name: 'state',
                type: 'Number'
            },{
                name: 'remark',
                type: 'String'
            },{
                name: 'attributeValues',
                type: 'String'
            },{

                name: 'displayPosition',
                type: 'Number'
            },{
                name: 'attributeId',
                type: 'Number'
            }
        ]
    },{
        //商品管理【根据类目ID ajax查询属性列表】
        route: '/product/attr/queryProductAttributeList',
        method: 'POST',
        url: '/product/queryProductAttributeList',
        isJsonRaw:true,
        params: [
            {
                name: 'categoryId',
                type: 'Number'
            }
        ]
    },{
        //商品管理【根据类目ID ajax查询属性的详细信息】
        route: '/product/attr/getProductAttribute',
        method: 'POST',
        url: '/product/getProductAttribute',
        isJsonRaw:true,
        params: [
            {
                name: 'attributeId',
                type: 'Number'
            }
        ]
    }
];