operations.limit.js 2.33 KB
/**
 * Created by ty on 2016/6/22.
 * 限售商品管理
 */

module.exports=function(app) {

    /*【限购商品】页面渲染*/
    app.get("/limit/product/index","operations.limit.Index", function () {
        this.$extend = {
            moduleName: "运营管理",
            pageName: "限购商品管理"
        }
    });

    /*【限购商品】添加页面渲染*/
    app.get("/limit/product/add","operations.limit.Edit", function () {
        this.$extend = {
            moduleName: "运营管理",
            pageName: "限购商品管理",
            data: {
                limitProductType:"1",
                hotFlag:"0"
            },
            action: '/limitProduct/addLimitProduct',
        }
    });

    /*【限购商品】编辑页面渲染*/
    app.get("/limit/edit/:id","operations.limit.Edit","limit_getLimitProduct", function (response) {
        this.$extend = {
            moduleName: "运营管理",
            pageName: "限购商品管理",
            action: "/limitProduct/updateLimitProduct",
            type: "update",
            data: response.data
        }
    });

    /*列表*/
    app.post("/limitProduct/getLimitProductList","limit_getLimitProductList");

    /*添加*/
    app.post("/limitProduct/addLimitProduct","limit_addLimitProduct");

    /*编辑*/
    app.post("/limitProduct/updateLimitProduct","limit_updateLimitProduct");

    /*获取各状态数量*/
    app.post("/limitProduct/getCountByStatus","limit_getCountByStatus");

    /*更改商品状态*/
    app.post("/limitProduct/auditLimitProduct","limit_auditLimitProduct");

    /*删除限购商品*/
    app.post("/limitProduct/deleteLimitProduct","limit_deleteLimitProduct");

    /*检查batchNo是否存在*/
    app.post("/limitProduct/checkBatchNoExist","limit_checkBatchNoExist");

    /*根据BatchNo检查限购码是否正确*/
    app.post("/limitCode/checkLimitCodeByBatchNo","limit_checkLimitCodeByBatchNo");

    /*导出*/
    app.post("/limit/batch/export","limit_export");

    /*检查活动是否存在*/
    app.post("/DrawlineActivityRest/checkActivityIdExists","limit_checkActivityIdExists");

    /*检查活动是否存在*/
    app.post("/limitProduct/checkActivityIdNoExist","limit_checkActivityIdNoExist");

    /*根据id获取限购商品*/
    //app.post("/limitProduct/checkActivityIdNoExist","limit_checkActivityIdNoExist");
}