|
|
@@ -51,7 +51,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
/// 机具库列表
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
- public JsonResult IndexData(PosMachinesTwo data, string BindingStateSelect, string ActivationStateSelect, string UserIdMakerCode, string UserIdRealName, string StoreIdCode, string StoreIdName, string BrandId, int page = 1, int limit = 30)
|
|
|
+ public JsonResult IndexData(PosMachinesTwo data, string BindingStateSelect, string ActivationStateSelect, string UserIdMakerCode, string UserIdRealName, string StoreIdCode, string StoreIdName, string BrandId, string ActivationDateData, string BindingDateData, int page = 1, int limit = 30)
|
|
|
{
|
|
|
|
|
|
Dictionary<string, string> Fields = new Dictionary<string, string>();
|
|
|
@@ -97,6 +97,22 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
condition += " and BrandId =" + BrandId;
|
|
|
}
|
|
|
|
|
|
+ if (!string.IsNullOrEmpty(ActivationDateData))
|
|
|
+ {
|
|
|
+ string[] datelist = ActivationDateData.Split(new string[] { " - " }, StringSplitOptions.None);
|
|
|
+ string start = datelist[0];
|
|
|
+ string end = datelist[1];
|
|
|
+ condition += " and ActivationTime>='" + start + " 00:00:00' and ActivationTime<='" + end + " 23:59:59'";
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!string.IsNullOrEmpty(BindingDateData))
|
|
|
+ {
|
|
|
+ string[] datelist = BindingDateData.Split(new string[] { " - " }, StringSplitOptions.None);
|
|
|
+ string start = datelist[0];
|
|
|
+ string end = datelist[1];
|
|
|
+ condition += " and BindingTime>='" + start + " 00:00:00' and BindingTime<='" + end + " 23:59:59'";
|
|
|
+ }
|
|
|
+
|
|
|
Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).IndexData("PosMachinesTwo", Fields, "Id desc", "0", page, limit, condition);
|
|
|
List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
|
|
|
foreach (Dictionary<string, object> dic in diclist)
|
|
|
@@ -249,6 +265,49 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
+
|
|
|
+ #region 未使用机具归位总仓
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 未使用机具归位总仓
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ public IActionResult Home(string right, int Id = 0)
|
|
|
+ {
|
|
|
+ ViewBag.RightInfo = RightInfo;
|
|
|
+ ViewBag.right = right;
|
|
|
+
|
|
|
+
|
|
|
+ PosMachinesTwo editData = db.PosMachinesTwo.FirstOrDefault(m => m.Id == Id) ?? new PosMachinesTwo();
|
|
|
+ ViewBag.data = editData;
|
|
|
+ return View();
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region 未使用机具归位总仓
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 未使用机具归位总仓
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPost]
|
|
|
+ public string Home(PosMachinesTwo data)
|
|
|
+ {
|
|
|
+ Dictionary<string, object> Fields = new Dictionary<string, object>();
|
|
|
+ Fields.Add("SeoTitle", "");
|
|
|
+ Fields.Add("SeoKeyword", "");
|
|
|
+ Fields.Add("PosSnType", 0);
|
|
|
+ new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).Edit("PosMachinesTwo", Fields, data.Id);
|
|
|
+ AddSysLog(data.Id.ToString(), "PosMachinesTwo", "home");
|
|
|
+ db.SaveChanges();
|
|
|
+ RedisDbconn.Instance.Clear("PosMachinesTwo:" + data.Id);
|
|
|
+ return "success";
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
#region 删除机具库信息
|
|
|
|
|
|
/// <summary>
|