store.js 9.29 KB
exports.domain = require('../config/common.js').domain;
//路由配置
exports.res = [{
        // 店铺创建列表页面
        route: '/supplier/store/index',   
        method: 'GET',
        view: 'pages/store/index',     
        noApi:true,
        data: {
            gridurl:'/supplier/store/indexPage',
            authority:'{"btn":false,"info":false,"create":true,"operationStatus":1,"checkStatusArr":"100,200,900"}',
            add:true,
            pagetitle:{
                level1title:"店铺管理",
                level2title:"创建店铺管理",
                level3title:"创建店铺列表"
            },
            dropCheckStatus:true
        },
        src:'/store/index'
    },{
      // 店铺信息管理页面
        route: '/supplier/store/examine',   
        method: 'GET',
        view: 'pages/store/index',        
        noApi:true,
        data: {
            gridurl:'/supplier/store/indexPage',
            authority:'{"btn":true,"operationStatus":2,"checkStatusArr":"200,300,900"}', //300,200,900
            dropCheckStatus:true,
            pagetitle:{
                level1title:"店铺管理",
                level2title:"店铺信息管理",
                level3title:"店铺信息列表"
            }
        },
        src:'/store/index',
    },{
      // 店铺审核管理页面
        route: '/supplier/check/index',   
        method: 'GET',
        view: 'pages/store/index',        
        noApi:true,
        data: {
            gridurl:'/supplier/store/indexPage',
            authority:'{"btn":false,"info":true,"operationStatus":0,"checkStatusArr":"200"}',
            pagetitle:{
                level1title:"店铺管理",
                level2title:"店铺审核管理",
                level3title:"店铺审核列表"
            }
        },
        src:'/store/index',
    },{
        //获取列表数据
        route: '/supplier/store/indexPage',   
        method: 'POST',
        url:"/ShopsRest/getShopList",
        isJsonRaw:true,
        params:[
            {name: 'supplierId', type: 'Number'},
            {name: 'brandId', type: 'Number'},
            {name: 'operationStatus', type: 'Number'},
            {name: 'checkStatus', type: 'Number'},
            {name: 'checkStatusArr', type: 'String'},
            {name: 'size', type: 'Number'},
            {name: 'page', type: 'Number'}
        ]
    },{
      // 关店
        route: '/supplier/store/closeShops',   
        method: 'POST',
        url:"/ShopsRest/closeShops",
        isJsonRaw:true,
        params:[
            {name:"shopsId",type:"Number"}
        ]
    },{
      // 开店
        route: '/supplier/store/openShops',   
        method: 'POST',
        url:"/ShopsRest/openShops",
        isJsonRaw:true,
        params:[
            {name:"shopsId",type:"Number"}
        ]
    }
    ,{
      // 店铺详细信息页面渲染
        route: '/supplier/store/info/:shopsId',   
        method: 'GET',
        view: 'pages/store/info',
        url:"/ShopsRest/getShopDetailById",
        isJsonRaw:true,
        params:[{
            name:'shopsId',
            type:'String'
        }],
        src:'/store/info'
    }
    ,{
      // 店铺详细信息页面渲染
        route: '/supplier/store/infocmd/:shopsId',   
        method: 'GET',
        view: 'pages/store/info',
        url:"/ShopsRest/getShopDetailById",
        isJsonRaw:true,
        params:[{
            name:'shopsId',
            type:'String'
        }],
        data:{
            data:{
                btn:true
            }
        },
        src:'/store/info'
    },
    {//审核通过
        route: '/Shops/ShopsRest/checkShopPass',
        method:"POST",
        url:"/ShopsRest/checkShopPass",
        isJsonRaw:true,
        params:[
            {name:"shopsId",type:"Number"}
        ]
    },
    {//驳回
        route: '/Shops/ShopsRest/checkReject',
        method:"POST",
        url:"/ShopsRest/checkReject",
        isJsonRaw:true,
        params:[
            {name:"shopsId",type:"Number"}
        ]
    }

//*******************************


    ,{
      // 修改店铺页面渲染
        route: '/supplier/store/update/:shopsId',   
        method: 'GET',
        view: 'pages/store/edit',
        url:"/ShopsRest/getShopDetailById",
        isJsonRaw:true,
        params:[{
            name:'shopsId',
            type:'String'
        }],
        data:{
            pageTitel:"修改店铺",
            action:'/store/update',
        },
        src:'/store/edit'
    },{
      // 修改店铺页面提交
        route: '/store/update',
        method: 'POST',
        url: '/ShopsRest/updateShops',
        isJsonRaw: true,
        params:[
            {name:"shopsId",type:"Number"},
            {name:"shopName",type:"String"},
            {name:"shopDomain",type:"String"},
            {name:"shopNature",type:"Number"},
            
            {name:"websiteUrl",type:"String"},
            {name:"otherUrl",type:"String"},
            {name:"shopAddress",type:"String"},

            {name:"createPid",type:"Number"},

            {name:"shopsType",type:"Number"},
            {name:"shopLogo",type:"String"},
            {name:"shopIntro",type:"String"},
            
            
            {name:"onCheck",type:"Number"},
            {name:"shopRelation",type:"String"}
        ]
    },{
      // 新增店铺页面渲染
        route: '/supplier/store/add',   
        method: 'GET',
        view: 'pages/store/edit',
        src:'/store/edit',
        noApi:true,
        data:{
            pageTitel:"创建店铺",
            action:'/store/add',
            data:{
                shopId:0
            }
        }
    }, {// 新增店铺数据
        route: '/store/add',
        method: 'POST',
        url: '/ShopsRest/addShops',
        isJsonRaw: true,
        params:[
            {name:"shopId",type:"Number",def:0},
            {name:"shopName",type:"String"},
            {name:"shopDomain",type:"String"},
            {name:"shopNature",type:"Number"},
            {name:"createPid",type:"Number"},
            {name:"shopsType",type:"Number"},
            {name:"shopLogo",type:"String"},
            {name:"shopIntro",type:"String"},
            {name:"websiteUrl",type:"String"},
            {name:"otherUrl",type:"String"},
            {name:"shopAddress",type:"String"},
            {name:"onCheck",type:"Number"},
            {name:"shopRelation",type:"String"}
        ]
    }




//***********************************
    ,{
      // 店铺管理员关系列表
        route: '/supplier/storeadmin/index',   
        method: 'GET',
        view: 'pages/store/adminindex',
        noApi:true,
        data: {
            gridurl:'/supplier/storeadmin/indexPage'
        },
        src:'/store/adminindex'
    },{
      // 店铺管理员关系列表
        route: '/supplier/storeadmin/indexPage',   
        method: 'POST',
        url:"/ShopsAdminRest/getShopsAdminList",
        isJsonRaw:true,
        params:[
            {name: 'page', type: 'Number'},
            {name: 'size', type: 'Number'}
        ]
    },{
      // 移除店铺管理员关系列表
        route: '/supplier/storeadmin/delete',   
        method: 'POST',
        url:"/ShopsAdminRest/delAdminRelation",
        isJsonRaw:true,
        params:[
            {name:"id",type:"Number"}
        ]
    }
    ,{
      // 店铺管理员关系新增
        route: '/supplier/storeadmin/adminAdd',
        method: 'GET',
        view: 'pages/store/adminedit',
        src:'/store/adminedit'
    },{      
        // 店铺管理员关系新增
        route: '/supplier/storeadmin/addguanxi',
        method: 'POST',
        url:"/ShopsAdminRest/addAdminRelation",
        isJsonRaw:true,
        params:[
            {name:"shopsId",type:"Number"},
            {name:"adminPid",type:"Number"},
            {name:"identity",type:"Number"}
        ]
    },{
      // 修改店铺页面渲染
        route: '/supplier/store/adminupdate/:id',   
        method: 'GET',
        view: 'pages/store/adminedit',
        url:"/ShopsAdminRest/getAdminRelationDetailById",
        isJsonRaw:true,
        params:[{
            name:'id',
            type:'String'
        }],
        src:'/store/adminedit'
    },{
        // 修改店铺管理员关系
        route: '/supplier/storeadmin/updateguanxi',
        method: 'POST',
        url:"/ShopsAdminRest/updateAdminRalation",
        isJsonRaw:true,
        params:[
            {name:"id",type:"Number"},
            {name:"shopsId",type:"Number"},
            {name:"adminPid",type:"Number"},
            {name:"identity",type:"Number"}
        ]
    },{
      // 根据身份选择管理员
        route: '/supplier/storeadmin/managerName',   
        method: 'POST',
        url:"/ShopsAdminRest/getUsersByIdentity",
        isJsonRaw:true,
        src:'/store/adminedit',
        params:[
            {name:"identity",type:"Number"}
        ]
    },{
      // 根据品牌选择供应商
        route: '/supplier/storeadmin/supplierlist',   
        method: 'POST',
        url:"/supplier/supplier/selectSupplierByBrandId",
        isJsonRaw:true,
        params:[
            {name:"brandId",type:"Number"}
        ]
    },{
      // 店铺列表
        route: '/ShopsRest/getShopsByName',   
        method: 'POST',
        url:"/ShopsRest/selectCheckPassShopsByName",
        isJsonRaw:true,
        params:[
            {name:"idName",type:"String"}
        ]
    }
]