From ef80d35cdbabf2ac5fd83f84714b4254e6444fef Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期二, 28 九月 2021 14:22:27 +0800
Subject: [PATCH] 通讯录,账号密码

---
 zhengcaioa/zhengcaioa/Controllers/admin/AdmGoodsManageController.cs |   22 +++++++++++++++-------
 1 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/zhengcaioa/zhengcaioa/Controllers/admin/AdmGoodsManageController.cs b/zhengcaioa/zhengcaioa/Controllers/admin/AdmGoodsManageController.cs
index 5fbfaaf..a4c75bd 100644
--- a/zhengcaioa/zhengcaioa/Controllers/admin/AdmGoodsManageController.cs
+++ b/zhengcaioa/zhengcaioa/Controllers/admin/AdmGoodsManageController.cs
@@ -103,7 +103,7 @@
 
 
             ViewBag.GoodsStatus = _liaotianService.GetSYScode("adm_goods_manage", "goods_status").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
-            ViewBag.Goods = _admGoodsManageService.GetList().Select(x => new { code = x.Id, label = x.GoodsName }).ToList();
+            ViewBag.Goods = _admGoodsManageService.GetList().Select(x => new { code = x.Id, label = (x.GoodsName.Length>15? x.GoodsName.Substring(0, 15) : x.GoodsName) }).ToList();
 
             ViewBag.ClassifyId = _admGoodsClassifyService.GetList().Select(x => new { code = x.Id, label = x.ClassifyName }).ToList();
 
@@ -153,7 +153,7 @@
             return new JsonResult(_admGoodsManageService.SearchByPaging(search));
         }
 
-        public IActionResult Edit(string id = null)
+        public IActionResult Edit(string id = null,string ClassifyIds = "")
         {
             var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
             ViewData["curentuser"] = curentuser;
@@ -163,9 +163,9 @@
             {
                 dto = _admGoodsManageService.Get(id);
             }
-            
 
 
+            ViewBag.ClassifyIds = ClassifyIds;
 
 
 
@@ -175,7 +175,7 @@
             ViewBag.GoodsStatus = _liaotianService.GetSYScode("adm_goods_manage", "goods_status");
 
 
-
+            ViewBag.shifou = _liaotianService.GetSYScode("system", "shifou");
 
 
 
@@ -219,13 +219,17 @@
 
 
 
-        public IActionResult Chuku()
+        public IActionResult Chuku(string id = null)
         {
             var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
             ViewData["curentuser"] = curentuser;
 
             AdmGoodsManageDTO dto = new AdmGoodsManageDTO();
-           
+            if (!String.IsNullOrEmpty(id))
+            {
+                dto = _admGoodsManageService.Get(id);
+            }
+
             ViewBag.ClassifyId = _admGoodsClassifyService.GetList();
 
             ViewBag.Goods = _admGoodsManageService.GetList().Where(x => x.GoodsStatus == "A").ToList();
@@ -280,12 +284,16 @@
 
 
 
-        public IActionResult Ruku()
+        public IActionResult Ruku(string id=null)
         {
             var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
             ViewData["curentuser"] = curentuser;
 
             AdmGoodsManageDTO dto = new AdmGoodsManageDTO();
+            if (!String.IsNullOrEmpty(id))
+            {
+                dto = _admGoodsManageService.Get(id);
+            }
 
             ViewBag.ClassifyId = _admGoodsClassifyService.GetList();
 

--
Gitblit v1.9.1