supplier.supplierAdd.js 1.4 KB
module.exports = function (app){
    app.get("/supplier/supplier/index", "supplier.Index", function (req,res){
        this.$extend={
            moduleName:"供应商管理",
            pageName:"创建供应商",
            iscreate:true,
            bottons:'{"columnsHidOper":true,"columnsHidisFr":true}',
            gridurl:'/supplier/create/getCreateSupplierList',
            searchStatus:[
                {name:"暂存",value:"100"},
                {name:"审核中",value:"200"},
                {name:"驳回",value:"900"}
            ],
            searchSort:true
        }
    });

    app.get("/supplier/add", "supplier.Edit", function (req,res){
        this.$extend={
            moduleName:"供应商管理",
            pageName:"添加供应商",
            action:'/brand/supplier/add',
            data:{},
            add:true,
            update:true
        }
    });

    app.get("/supplier/update/:id", "supplier.Edit", "supplierList_getSupplier", function (rs,req,res){
        this.$extend={
            moduleName:"供应商管理",
            pageName:"修改供应商",
            action:'/brand/action/update',
            update:true,
            data:rs.data
        }
    });

    //创建供应商列表
    app.post("/supplier/create/getCreateSupplierList","supplierAdd_getCreateSupplierList");

    //新建供应商保存
    app.post("/brand/supplier/add","supplierAdd_addSupplier");
}