Files
zszq-trs/YLErpWeb/Controllers/CalcPriceShowCfgController.cs
T
2024-05-09 14:06:26 +08:00

79 lines
2.0 KiB
C#

using YLErp.Modules.TagModule.Dto;
using YLErp.Modules.TagModule;
using YLErp.Modules.CalcPriceShowConfigModule;
using YLErp.Modules.CalcPriceShowConfigModule.Dto;
namespace YLErp.Web.Controllers
{
/// <summary>
/// 定价指标显示配置
/// </summary>
public class CalcPriceShowCfgController : BaseController
{
public ActionResult Index()
{
return View();
}
public JsonResult GetList()
{
using (var service = new CalcPriceShowConfigService(CurUser))
{
var list = service.GetList();
return Json(list);
}
}
[HttpGet]
public JsonResult GetById(int id)
{
using (var service = new CalcPriceShowConfigService(CurUser))
{
var model = service.GetById(id);
return JsonSuccessData(model);
}
}
public JsonResult Save(CalcPriceShowCofingDto req)
{
using (var service = new CalcPriceShowConfigService(CurUser))
{
var res = service.SaveData(req);
return JsonSuccessData(res);
}
}
public JsonResult SetIsEnable(CalcPriceCfgSetIsEnableReq req)
{
using (var service = new CalcPriceShowConfigService(CurUser))
{
service.SetIsEnable(req.Id);
return JsonSuccessData(true);
}
}
public JsonResult Delete(CalcPriceCfgDeleteReq req)
{
using (var service = new CalcPriceShowConfigService(CurUser))
{
service.Delete(req.Id);
return JsonSuccessData(true);
}
}
//public JsonResult GetShowCalcQuota()
//{
// using (var service = new CalcPriceShowConfigService(CurUser))
// {
// var list = service.GetShowCalcQuota();
// return Json(list);
// }
//}
}
}