product.js 8.03 KB
exports.domain = require('../config/common.js').domain;
// exports.domain ="http://172.16.6.227:8088/platform";

//路由配置
exports.res = [
    {
        //商品管理【品类列表】页面渲染
        route: '/erpproduct/sort/index',
        method: 'GET',
        view: 'pages/product/index',
        src: '/product/index',
        url: '/product/queryAllProductSortList',
    },{
        //商品管理【ajax查询所有品类】
        route: '/product/class/queryAllProductSortList',
        method: 'POST',
        url: '/product/queryAllMaxSortList',
    },{
        //商品管理【根据ID ajax查询子品类列表】
        route: '/product/class/queryProductSortList',
        method: 'POST',
        url: '/product/queryProductSortList',
        params: [
            {
                name: 'param',
                type: 'Number'
            }
        ]
    },{
        //商品管理>【添加品类】页面渲染
        route: '/product/class/new',
        method: 'GET',
        view: 'pages/product/new-class',
        src: '/product/add',
        data: {
            data: {
                status: 1
            },
            pagetitle:"添加品类",
            action:"/product/sort/addProductSort"
        }
    },{
        //商品管理>【添加品类】ajax请求接口
        route: '/product/sort/addProductSort',
        method: 'POST',
        url: '/product/addProductSort',
        params: [
            {
                name: 'sortName',
                type: 'String'
            },{
                name: 'sortInitials',
                type: 'String'
            },{
                name:'firstSortId',
                type: 'Number'
            },{
                name:'secondSortId',
                type:'Number'
            },{
                name:'threeSortId',
                type:'Number'
            },{
                name: 'orderBy',
                type: 'Number'
            },{
                name: 'status',
                type: 'Number'
            }
        ]
    },{
        //商品管理>【编辑品类】页面
        route: '/product/class/edit/:param',
        method: 'GET',
        view: 'pages/product/new-class',
        src: '/product/add',
        data:{
            pagetitle:"修改品类",
            action:"/product/sort/update"
        }
    },{
        route:'/product/class/getProductSort',
        url:'/product/getProductSort',
        method: 'POST',
        params: [
            {
                name: 'param',
                type: 'Number'
            }
        ]
    },{
        //商品管理>【品类列表ajax更新】
        route: '/product/sort/update',
        method: 'POST',
        url: '/product/updateProductSort',
        params: [
            {
                name: 'id',
                type: 'Number'
            },{
                name: 'sortName',
                type: 'String'
            },{
                name: 'sortInitials',
                type: 'String'
            },{
                name:'firstSortId',
                type: 'Number'
            },{
                name:'secondSortId',
                type:'Number'
            },{
                name:'threeSortId',
                type:'Number'
            },{
                name: 'orderBy',
                type: 'Number'
            },{
                name: 'status',
                type: 'Number'
            }
        ]
    },{
        route:"/erpproduct/sorter/open",
        method: 'POST',
        url: '/product/publishProductSort',
        params: [{
            name: 'param',
            type: 'Number'
        }]
    },{
        route:"/erpproduct/sorter/close",
        method: 'POST',
        url: '/product/closeProductSort',
        params: [{
            name: 'param',
            type: 'Number'
        }]
    },
     {
         //商品管理>【产品属性】页面渲染
         route: '/erpproduct/attribute/index',
         method: 'GET',
         view: 'pages/product/product-attr',
         //url: '/product/queryAllProductSortList',
         url:'/product/queryProductSortListByConf',
         src: '/product/attr',
         params:[{
             name: 'status',
             type: 'String',
             def:1
         }]
     },
     {
         //商品管理>【产品属性ajax获取】
         route: '/product/attr/get',
         method: 'POST',
         url: '/product/getAttr',
     },{
         //商品管理>【添加产品属性ajax】
         route: '/product/attr/add',
         method: 'POST',
         url: '/product/addProductAttribute',
         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',
         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'
             },{
                 name: 'categoryId',
                 type: 'Number'
             }
         ]
     },{
         //商品管理【根据类目ID ajax查询属性列表】
         route: '/product/attr/queryProductAttributeList',
         method: 'POST',
         url: '/product/queryProductAttributeList',
         params: [
             {
                 name: 'categoryId',
                 type: 'Number'
             },
             {
                 name: 'page',
                 type: 'Number'
             },
             {
                 name: 'size',
                 type: 'Number'
             }
         ]
     },{
         //商品管理【根据类目ID ajax查询属性的详细信息】
         route: '/product/attr/getProductAttribute',
         method: 'POST',
         url: '/product/getProductAttribute',
         params: [
             {
                 name: 'attributeId',
                 type: 'Number'
             }
         ]
     }
];