goods.basegoods.js 2.7 KB

module.exports=function(app) {
	/*基础商品列表*/
	app.get("/supplier/baseproduct/index","goods.basegoods.Index",function(){
		this.$extend={
			moduleName:"基础商品",
			pageName:"商品列表"
		}
	});

	/*列表头部各个审核状态的数量*/
	app.post("/base/goods/ajax/auditCount","basegoods_getbaseProductCountByStatus");

	/*ajax列表数据*/
	app.post("/product/getBaseProductList","basegoods_getBaseProductList");

	/*通过*/
	app.post("/base/goods/pass","basegoods_batchAuditPassBaseProduct");

	/*驳回*/
	app.post("/base/goods/reject","basegoods_batchAuditRejectBaseProduct");

	/*添加页面*/
	app.get("/base/goods/add","goods.basegoods.Edit","basegoods_queryProductColors",function(colos,req,res){
		this.$extend={
			moduleName:"基础商品",
			pageName:"添加商品",

			action: "/base/goods/ajax/add",
			btnText:"提交审核",
			list:colos.data.list
		}
	});
    
	/*添加数据接口*/
	app.post("/base/goods/ajax/add","basegoods_addBaseProduct");

	/*检查下SKU是否存在*/
	app.post("/product/checkSkuBarCodeExist","basegoods_checkSkuBarCodeExist");

	/*修改页面*/
	app.get("/base/goods/update/:productSkn/:isAuditing","goods.basegoods.Edit",["basegoods_queryProductColors","basegoods_getBaseProduct"],function(colos,info){
		this.$extend={
			moduleName:"基础商品",
			pageName:"修改商品",

			action: "/base/goods/ajax/update",
			btnText:"保存",
			list:colos.data.list
		}
		return info;
	});

	/*删除[废弃]*/
	// app.post("/base/goods/ajax/delete","basegoods_deleteBaseProduct");

	/*修改接口*/
	app.post("/base/goods/ajax/update","basegoods_updateBaseProduct");

	/*基础商品详情空页面*/
	app.get("/base/goods/info/:productSkn/:isAuditing","goods.basegoods.Info","basegoods_getBaseProduct",function(info){
		this.$extend={
			moduleName:"基础商品",
			pageName:"商品详情"
		}
		return info;
	});

	/*检查SKU*/
	app.post("/goods/base/checkSkuBarCodeExist","basegoods_checkSkuBarCodeExist");

	/*商品属性【网销那边,可以迁移过去】*/
	app.post("/base/goods/queryAllProductAttr","basegoods_queryAllBySortId4Html");

	/*尺码列表【网销那边,可以迁移过去】*/
	app.post("/base/goods/queryMaterialList","basegoods_queryMaterialList");

	

	/*批量*/
	app.get("/goods/piliang/batch","goods.basegoods.Batch",function(){
		this.$extend={
			moduleName:"基础商品",
			pageName:"批量功能",
			isPL:true
		}
	});

	/*基础商品录入*/
	app.get("/goods/base/batch","goods.basegoods.Batch",function(){
		this.$extend={
			moduleName:"基础商品",
			pageName:"基础商品导入",
			isPL:false
		}
	});

	

	/*通过任务ID查看任务是否被执行完*/
	app.post("/product/queryBatchImportResult","basegoods_queryBatchImportResult");
}