From f33ece65bdfd7b8354bd5046d4b9d2d600643b0f Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期六, 09 十月 2021 13:24:51 +0800
Subject: [PATCH] tijiao

---
 zhengcaioa/zhengcaioa/Views/AdmGoodsManage/Edit.cshtml                   |  138 ++++----
 zhengcaioa/zhengcaioa/Views/AdmZhanghaomima/Index.cshtml                 |    2 
 zhengcaioa/zhengcaioa/Startup.cs                                         |    3 
 zhengcaioa/Model/AdmGoodsManage.cs                                       |    3 
 zhengcaioa/Services/AdmGoodsManageService.cs                             |    4 
 zhengcaioa/zhengcaioa/Views/AdmGoodsManage/Liushuizhang.cshtml           |   69 ++++
 zhengcaioa/IServices/IAdmGoodsRecordService.cs                           |   20 +
 zhengcaioa/Model/zhengcaioaContext.cs                                    |   58 +++
 zhengcaioa/zhengcaioa/Controllers/BusinessOrder/CooperOrderController.cs |  174 +++++++++-
 zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs                          |    2 
 zhengcaioa/DTO/AdmGoodsManageDTO.cs                                      |    1 
 zhengcaioa/zhengcaioa/Views/AdmGoodsManage/Index.cshtml                  |    6 
 zhengcaioa/DTO/AdmGoodsRecordDTO.cs                                      |   43 ++
 zhengcaioa/zhengcaioa/Controllers/admin/AdmGoodsRecordController.cs      |  125 +++++++
 zhengcaioa/zhengcaioa/Controllers/admin/AdmAskController.cs              |   18 +
 zhengcaioa/zhengcaioa/Controllers/admin/AdmTongxunluController.cs        |    2 
 zhengcaioa/Services/DailyManagementService.cs                            |    2 
 zhengcaioa/Model/AdmGoodsRecord.cs                                       |   23 +
 zhengcaioa/zhengcaioa/Controllers/admin/AdmGoodsManageController.cs      |   58 +++
 zhengcaioa/zhengcaioa/Controllers/admin/AdmZhanghaomimaController.cs     |    2 
 zhengcaioa/Services/AdmGoodsRecordService.cs                             |  207 ++++++++++++
 21 files changed, 856 insertions(+), 104 deletions(-)

diff --git a/zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs b/zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs
index 496f9c2..c859ac4 100644
--- a/zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs
+++ b/zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs
@@ -270,6 +270,8 @@
             CreateMap<AdmZhanghaomima, AdmZhanghaomimaDTO>();
             CreateMap<AdmZhanghaomimaDTO, AdmZhanghaomima>();
 
+            CreateMap<AdmGoodsRecord, AdmGoodsRecordDTO>();
+            CreateMap<AdmGoodsRecordDTO, AdmGoodsRecord>();
 
         }
     }
diff --git a/zhengcaioa/DTO/AdmGoodsManageDTO.cs b/zhengcaioa/DTO/AdmGoodsManageDTO.cs
index 1c86ec7..e07fbd7 100644
--- a/zhengcaioa/DTO/AdmGoodsManageDTO.cs
+++ b/zhengcaioa/DTO/AdmGoodsManageDTO.cs
@@ -23,6 +23,7 @@
 
         public decimal? GoodsCaozuo { get; set; }
         public string HaocaiStatus { get; set; }
+        public string ISBN { get; set; }
 
     }
     public class AdmGoodsManageDTOSearch : SearchEntity
diff --git a/zhengcaioa/DTO/AdmGoodsRecordDTO.cs b/zhengcaioa/DTO/AdmGoodsRecordDTO.cs
new file mode 100644
index 0000000..7b41480
--- /dev/null
+++ b/zhengcaioa/DTO/AdmGoodsRecordDTO.cs
@@ -0,0 +1,43 @@
+锘縰sing System;
+using System.Collections.Generic;
+
+#nullable disable
+
+namespace DTO
+{
+    public class AdmGoodsRecordDTO
+    {
+        public string Id { get; set; }
+        public string GoodsId { get; set; }
+        public string GoodsName { get; set; }
+
+        public string ISBN { get; set; }
+        
+        public string RecordTypeId { get; set; }
+        public string RecordTypeName { get; set; }
+        public decimal? GoodsNum { get; set; }
+        public decimal? GoodsLeft { get; set; }
+        public string OperationalMatters { get; set; }
+        public string Remark { get; set; }
+        public string RecStatus { get; set; }
+        public string Creater { get; set; }
+        public DateTime Createtime { get; set; }
+
+        public string CreatetimeName { get; set; }
+        public string Modifier { get; set; }
+        public DateTime Modifytime { get; set; }
+    }
+
+    public class AdmGoodsRecordDTOSearch : SearchEntity
+    {
+        public string Createtime { get; set; }
+       
+        public string OperationalMatters { get; set; }
+
+       
+
+        public string RecordTypeId { get; set; }
+
+        public string GoodsId { get; set; }
+    }
+}
diff --git a/zhengcaioa/IServices/IAdmGoodsRecordService.cs b/zhengcaioa/IServices/IAdmGoodsRecordService.cs
new file mode 100644
index 0000000..d736fee
--- /dev/null
+++ b/zhengcaioa/IServices/IAdmGoodsRecordService.cs
@@ -0,0 +1,20 @@
+锘縰sing DTO;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace IServices
+{
+    public interface IAdmGoodsRecordService
+    {
+        ResultEntity save(AdmGoodsRecordDTO dto);
+
+        AdmGoodsRecordDTO Get(string id);
+
+        ResultDataEntity<AdmGoodsRecordDTO> SearchByPaging(AdmGoodsRecordDTOSearch searchEntity);
+
+        ResultEntity ModifyStatus(string id, string userid);
+
+        List<AdmGoodsRecordDTO> GetList();
+    }
+}
diff --git a/zhengcaioa/Model/AdmGoodsManage.cs b/zhengcaioa/Model/AdmGoodsManage.cs
index c07f0d5..ac059f4 100644
--- a/zhengcaioa/Model/AdmGoodsManage.cs
+++ b/zhengcaioa/Model/AdmGoodsManage.cs
@@ -20,5 +20,8 @@
         public string Modifier { get; set; }
         public DateTime Modifytime { get; set; }
         public string HaocaiStatus { get; set; }
+        public string ISBN { get; set; }
+
+
     }
 }
diff --git a/zhengcaioa/Model/AdmGoodsRecord.cs b/zhengcaioa/Model/AdmGoodsRecord.cs
new file mode 100644
index 0000000..f60a80d
--- /dev/null
+++ b/zhengcaioa/Model/AdmGoodsRecord.cs
@@ -0,0 +1,23 @@
+锘縰sing System;
+using System.Collections.Generic;
+
+#nullable disable
+
+namespace zhengcaioa.Models
+{
+    public partial class AdmGoodsRecord
+    {
+        public string Id { get; set; }
+        public string GoodsId { get; set; }
+        public string RecordTypeId { get; set; }
+        public decimal? GoodsNum { get; set; }
+        public decimal? GoodsLeft { get; set; }
+        public string OperationalMatters { get; set; }
+        public string Remark { get; set; }
+        public string RecStatus { get; set; }
+        public string Creater { get; set; }
+        public DateTime Createtime { get; set; }
+        public string Modifier { get; set; }
+        public DateTime Modifytime { get; set; }
+    }
+}
diff --git a/zhengcaioa/Model/zhengcaioaContext.cs b/zhengcaioa/Model/zhengcaioaContext.cs
index b031650..3d34a3d 100644
--- a/zhengcaioa/Model/zhengcaioaContext.cs
+++ b/zhengcaioa/Model/zhengcaioaContext.cs
@@ -29,6 +29,7 @@
         public virtual DbSet<AdmAskCiZhi> AdmAskCiZhis { get; set; }
         public virtual DbSet<AdmAskcost> AdmAskcosts { get; set; }
         public virtual DbSet<AdmAskGood> AdmAskGoods { get; set; }
+        public virtual DbSet<AdmGoodsRecord> AdmGoodsRecords { get; set; }
         public virtual DbSet<AdmAskJiaojie> AdmAskJiaojies { get; set; }
         public virtual DbSet<AdmAskJiaojieDtl> AdmAskJiaojieDtls { get; set; }
         public virtual DbSet<AdmAskLeave> AdmAskLeaves { get; set; }
@@ -418,6 +419,59 @@
                 entity.Property(e => e.Tittle)
                     .HasMaxLength(50)
                     .HasColumnName("tittle");
+            });
+
+            modelBuilder.Entity<AdmGoodsRecord>(entity =>
+            {
+                entity.ToTable("adm_goods_record");
+
+                entity.Property(e => e.Id).HasMaxLength(50);
+
+                entity.Property(e => e.Creater)
+                    .IsRequired()
+                    .HasMaxLength(50)
+                    .HasColumnName("creater")
+                    .HasDefaultValueSql("('1')");
+
+                entity.Property(e => e.Createtime)
+                    .HasColumnType("datetime")
+                    .HasColumnName("createtime")
+                    .HasDefaultValueSql("(getdate())");
+
+                entity.Property(e => e.GoodsId)
+                    .HasMaxLength(50)
+                    .HasColumnName("goodsId");
+
+                entity.Property(e => e.GoodsLeft)
+                    .HasColumnType("numeric(18, 2)")
+                    .HasColumnName("goods_left");
+
+                entity.Property(e => e.GoodsNum)
+                    .HasColumnType("numeric(18, 2)")
+                    .HasColumnName("goods_num");
+
+                entity.Property(e => e.Modifier)
+                    .IsRequired()
+                    .HasMaxLength(50)
+                    .HasColumnName("modifier")
+                    .HasDefaultValueSql("('1')");
+
+                entity.Property(e => e.Modifytime)
+                    .HasColumnType("datetime")
+                    .HasColumnName("modifytime")
+                    .HasDefaultValueSql("(getdate())");
+
+                entity.Property(e => e.OperationalMatters).HasMaxLength(500);
+
+                entity.Property(e => e.RecStatus)
+                    .IsRequired()
+                    .HasMaxLength(1)
+                    .HasColumnName("rec_status")
+                    .HasDefaultValueSql("('A')");
+
+                entity.Property(e => e.RecordTypeId).HasMaxLength(50);
+
+                entity.Property(e => e.Remark).HasMaxLength(500);
             });
 
             modelBuilder.Entity<AdmAskJiaojie>(entity =>
@@ -1780,6 +1834,10 @@
                     .HasColumnName("goods_name")
                     .HasComment("鐗╁搧鍚嶇О");
 
+                entity.Property(e => e.ISBN)
+                  .HasMaxLength(500)
+                  .HasColumnName("ISBN");
+
                 entity.Property(e => e.GoodsNum)
                     .HasColumnType("numeric(18, 2)")
                     .HasColumnName("goods_num")
diff --git a/zhengcaioa/Services/AdmGoodsManageService.cs b/zhengcaioa/Services/AdmGoodsManageService.cs
index 487bfcf..951aa16 100644
--- a/zhengcaioa/Services/AdmGoodsManageService.cs
+++ b/zhengcaioa/Services/AdmGoodsManageService.cs
@@ -50,6 +50,8 @@
 
                     updateproject.ClassifyId = entity.ClassifyId;
                     updateproject.GoodsName = entity.GoodsName;
+                    updateproject.ISBN = entity.ISBN;
+                    
                     if (entity.GoodsPrice.HasValue)
                     {
                         updateproject.GoodsPrice = entity.GoodsPrice;
@@ -171,7 +173,7 @@
                              GoodsStatus = a.GoodsStatus,
                              HaocaiStatus = a.HaocaiStatus,
                              GoodsName = a.GoodsName,
-
+                             ISBN = a.ISBN,
 
 
 
diff --git a/zhengcaioa/Services/AdmGoodsRecordService.cs b/zhengcaioa/Services/AdmGoodsRecordService.cs
new file mode 100644
index 0000000..bd7ad1e
--- /dev/null
+++ b/zhengcaioa/Services/AdmGoodsRecordService.cs
@@ -0,0 +1,207 @@
+锘縰sing AutoMapper;
+using DTO;
+using IServices;
+using Microsoft.EntityFrameworkCore;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using zhengcaioa.Models;
+
+namespace Services
+{
+    public class AdmGoodsRecordService: IAdmGoodsRecordService
+    {
+        private readonly zhengcaioaContext _context;
+        private readonly IMapper _mapper;
+        public AdmGoodsRecordService(zhengcaioaContext context, IMapper mapper)
+        {
+            _context = context;
+            _mapper = mapper;
+        }
+
+        public ResultEntity save(AdmGoodsRecordDTO dto)
+        {
+            ResultEntity resultEntity = new ResultEntity();
+            try
+            {
+                var AdmGoodsRecord = _mapper.Map<AdmGoodsRecord>(dto);
+                if (String.IsNullOrEmpty(AdmGoodsRecord.Id))
+                {
+                    AdmGoodsRecord.Id = Guid.NewGuid().ToString();
+                    dto.Id = AdmGoodsRecord.Id;
+
+                    _context.AdmGoodsRecords.Add(AdmGoodsRecord);
+                }
+                else
+                {
+                    var updatepltRole = _context.AdmGoodsRecords.Find(AdmGoodsRecord.Id);
+                    updatepltRole.GoodsId = AdmGoodsRecord.GoodsId;
+                    updatepltRole.RecordTypeId = AdmGoodsRecord.RecordTypeId;
+                    updatepltRole.GoodsNum = AdmGoodsRecord.GoodsNum;
+                    updatepltRole.GoodsLeft = AdmGoodsRecord.GoodsLeft;
+
+
+
+                    updatepltRole.OperationalMatters = AdmGoodsRecord.OperationalMatters;
+                    updatepltRole.Remark = AdmGoodsRecord.Remark;
+                   
+
+
+                    updatepltRole.RecStatus = AdmGoodsRecord.RecStatus;
+                    // updatepltRole.Creater = pltRole.Creater;
+                    //updatepltRole.Createtime = pltRole.Createtime;
+                    updatepltRole.Modifier = AdmGoodsRecord.Modifier;
+                    updatepltRole.Modifytime = AdmGoodsRecord.Modifytime;
+
+                }
+
+                _context.SaveChanges();
+                resultEntity.ReturnID = AdmGoodsRecord.Id;
+                resultEntity.Result = true;
+            }
+            catch (Exception ex)
+            {
+                resultEntity.Result = false;
+                resultEntity.Message = "淇濆瓨澶辫触锛岃鑱旂郴绠$悊鍛�";
+
+            }
+            return resultEntity;
+        }
+
+        public AdmGoodsRecordDTO Get(string id)
+        {
+            var entity = _context.AdmGoodsRecords.Find(id);
+
+            if (entity.RecStatus != "A")
+            {
+                entity = new AdmGoodsRecord();
+            }
+            var AdmGoodsRecordDTO = _mapper.Map<AdmGoodsRecordDTO>(entity);
+            return AdmGoodsRecordDTO;
+        }
+
+        public ResultDataEntity<AdmGoodsRecordDTO> SearchByPaging(AdmGoodsRecordDTOSearch searchEntity)
+        {
+            ResultDataEntity<AdmGoodsRecordDTO> data = new ResultDataEntity<AdmGoodsRecordDTO>();
+
+            var listCode = (from a in _context.SysCodeDtls
+                            join b in _context.SysCodes
+                            on a.CodeId equals b.Id
+                            where a.RecStatus == "A"
+                                          && b.RecStatus == "A"
+                            select new CodeDataEntity()
+                            {
+                                CodeId = b.Id,
+                                CodeTable = b.CodeTable,
+                                CodeField = b.CodeField,
+                                CodeSn = a.CodeSn,
+                                Comments = a.Comments,
+                                Contents = a.Contents,
+                                RecStatus = a.RecStatus,
+                                Sort = a.Sort
+                            }
+                     );
+
+            DateTime XdTimestart = DateTime.Now;
+            DateTime XdTimeend = DateTime.Now;
+            if (!string.IsNullOrWhiteSpace(searchEntity.Createtime))
+            {
+                string[] XdTimes = searchEntity.Createtime.Split("|");
+                DateTime.TryParse(XdTimes[0], out XdTimestart);
+                DateTime.TryParse(XdTimes[1], out XdTimeend);
+                XdTimeend = XdTimeend.AddDays(1);
+            }
+            var query = (from a in _context.AdmGoodsRecords//.Where(x => x.RecStatus == "A")
+                         join z in _context.AdmGoodsManages on a.GoodsId equals z.Id
+
+                        
+                         join c in listCode.Where(x => x.CodeTable == "adm_goods_record" && x.CodeField == "RecordTypeId")
+                        on a.RecordTypeId equals c.CodeSn
+                         
+
+
+                         
+                         where a.RecStatus == "A"
+                           && (string.IsNullOrWhiteSpace(searchEntity.Createtime) || (a.Createtime >= XdTimestart && a.Createtime <= XdTimeend))
+                       
+
+                               && (string.IsNullOrWhiteSpace(searchEntity.OperationalMatters) || a.OperationalMatters.Contains(searchEntity.OperationalMatters.Trim()))
+                                
+                                        && (string.IsNullOrWhiteSpace(searchEntity.RecordTypeId) || a.RecordTypeId == searchEntity.RecordTypeId.Trim())
+                                             && (string.IsNullOrWhiteSpace(searchEntity.GoodsId) || a.GoodsId == searchEntity.GoodsId.Trim())
+
+                         select new AdmGoodsRecordDTO
+                         {
+                             Id = a.Id,
+                            
+
+                           
+                             RecordTypeId = a.RecordTypeId,
+                             RecordTypeName = c.Comments,
+                             GoodsId = a.GoodsId,
+                             GoodsName = z.GoodsName,
+                            
+                             OperationalMatters = a.OperationalMatters,
+                             Remark = a.Remark,
+                             CreatetimeName = a.Createtime.ToString("yyyy-MM-dd HH:mm:ss"),
+
+                             Creater = a.Creater,
+                             Createtime = a.Createtime,
+                             Modifier = a.Modifier,
+                             Modifytime = a.Modifytime,
+                            
+                             RecStatus = a.RecStatus,
+                             GoodsNum = a.GoodsNum ?? 0,
+                             GoodsLeft = a.GoodsLeft ?? 0,
+
+                         }).OrderByDescending(x => x.Createtime).ToList();
+
+
+
+
+
+
+
+            //if (searchEntity.totalrows == 0)
+            searchEntity.totalrows = query.Count();
+            var rolelist = query.Skip((searchEntity.page - 1) * searchEntity.rows).Take(searchEntity.rows).ToList();
+
+            data.LoadData(searchEntity, rolelist);
+            return data;
+        }
+
+        public ResultEntity ModifyStatus(string id, string userid)
+        {
+
+            ResultEntity result = new ResultEntity();
+            result.Result = true;
+
+            var model = _context.AdmGoodsRecords.Find(id);
+            if (model != null)
+            {
+                model.RecStatus = "D";
+                model.Modifier = userid;
+                model.Modifytime = DateTime.Now;
+                _context.SaveChanges();
+            }
+
+            return result;
+        }
+
+
+        /// <summary>
+        /// 鑾峰彇鎵�鏈夋湁鏁堣鑹�
+        /// </summary>
+        /// <returns></returns>
+        public List<AdmGoodsRecordDTO> GetList()
+        {
+
+
+            var listPosition = _context.AdmGoodsRecords.Where(r => r.RecStatus == "A").ToList();
+
+            var list = _mapper.Map<List<AdmGoodsRecordDTO>>(listPosition);
+            return list;
+        }
+    }
+}
diff --git a/zhengcaioa/Services/DailyManagementService.cs b/zhengcaioa/Services/DailyManagementService.cs
index 06b38cd..884e193 100644
--- a/zhengcaioa/Services/DailyManagementService.cs
+++ b/zhengcaioa/Services/DailyManagementService.cs
@@ -64,7 +64,7 @@
                           UserId = b.UserName,
                           Intention = a.Intention                          
                           
-                      }).ToList();
+                      }).OrderByDescending(x=>x.InTime).ToList();
             ResultDataEntity<AdmHoldPhoneDTO> data = new ResultDataEntity<AdmHoldPhoneDTO>();
             if (search.totalrows == 0)
                 search.totalrows = dt.Count();
diff --git a/zhengcaioa/zhengcaioa/Controllers/BusinessOrder/CooperOrderController.cs b/zhengcaioa/zhengcaioa/Controllers/BusinessOrder/CooperOrderController.cs
index 7693c12..1d8b798 100644
--- a/zhengcaioa/zhengcaioa/Controllers/BusinessOrder/CooperOrderController.cs
+++ b/zhengcaioa/zhengcaioa/Controllers/BusinessOrder/CooperOrderController.cs
@@ -40,7 +40,10 @@
         private readonly IFiMemberService _fiMemberService;
         private readonly IConfiguration _configuration;
         private readonly IHttpClientFactory _clientFactory;
-        private readonly IAskService _askService; 
+        private readonly IAskService _askService;
+        private readonly IAdmGoodsRecordService _admGoodsRecordService;
+
+        private readonly IAdmGoodsManageService _admGoodsManageService;
 
 
         public CooperOrderController(ILogger<CooperOrderController> logger, ILiaotianService liaotianService, IUserService userService, ICooperOrderService cooperOrderService
@@ -48,7 +51,10 @@
             , IFiServiceService fiServiceService, IFiMemberService fiMemberService
             , IConfiguration configuration
             , IHttpClientFactory clientFactory
-            , IAskService askService)
+            , IAskService askService
+            , IAdmGoodsRecordService admGoodsRecordService
+            , IAdmGoodsManageService admGoodsManageService
+            )
         {
             _logger = logger;
             _liaotianService = liaotianService;
@@ -63,6 +69,8 @@
             _configuration = configuration;
             _clientFactory = clientFactory;
             _askService = askService;
+            _admGoodsRecordService = admGoodsRecordService;
+            _admGoodsManageService = admGoodsManageService;
         }
 
         [CheckLogin]
@@ -616,19 +624,82 @@
             ResultEntity resultEntity = new ResultEntity();
             resultEntity.Result = false;
 
-            CooperOrderDTO dto = _cooperOrderService.Get(id);
-            if(dto.ShouliStatus != "1")
+            using (TransactionScope scope = new TransactionScope())
             {
-                resultEntity.Result = false;
-                resultEntity.Message = "鍙湁宸蹭笅鍗曠姸鎬佺殑璁㈠崟鎵嶈兘鍙楃悊";
-                return new JsonResult(resultEntity);
+
+                CooperOrderDTO dto = _cooperOrderService.Get(id);
+                if (dto.ShouliStatus != "1")
+                {
+                    resultEntity.Result = false;
+                    resultEntity.Message = "鍙湁宸蹭笅鍗曠姸鎬佺殑璁㈠崟鎵嶈兘鍙楃悊";
+                    return new JsonResult(resultEntity);
+                }
+
+
+                if (dto.OrderType == "01")
+                {
+                    var shi = _fiBookService.Get(dto.OrderType1);
+                    if (string.IsNullOrEmpty(shi.Id))
+                    {
+                        resultEntity.Result = false;
+                        resultEntity.Message = "鏈壘鍒拌鍟嗗搧";
+                        return new JsonResult(resultEntity);
+                    }
+                    var admGoodsManageDTOs = _admGoodsManageService.GetList().Where(x => x.ISBN == shi.BookNo).FirstOrDefault();
+
+                    if (admGoodsManageDTOs == null)
+                    {
+
+
+                        resultEntity.Result = false;
+                        resultEntity.Message = "娌℃湁鎵惧埌璇ュ晢鍝�";
+                        return new JsonResult(resultEntity);
+
+                    }
+                    else if (!admGoodsManageDTOs.GoodsLeft.HasValue)
+                    {
+                        resultEntity.Result = false;
+                        resultEntity.Message = "璇ュ晢鍝佹病鏈夊簱瀛�";
+                        return new JsonResult(resultEntity);
+
+                    }
+                    else if (admGoodsManageDTOs.GoodsLeft.Value < dto.OrderNum)
+                    {
+                        resultEntity.Result = false;
+                        resultEntity.Message = "璇ュ晢鍝佸簱瀛樹笉瓒�";
+                        return new JsonResult(resultEntity);
+
+                    }
+                    var left = admGoodsManageDTOs.GoodsLeft - dto.OrderNum;
+                    admGoodsManageDTOs.GoodsLeft = left;
+
+                    resultEntity = _admGoodsManageService.save(admGoodsManageDTOs);
+
+                    AdmGoodsRecordDTO dto1 = new AdmGoodsRecordDTO();
+                    dto1.GoodsId = admGoodsManageDTOs.Id;
+                    dto1.GoodsNum = dto.OrderNum;
+                    dto1.GoodsLeft = admGoodsManageDTOs.GoodsLeft;
+                    dto1.RecordTypeId = "02";
+                    dto1.RecStatus = "A";
+                    dto1.Creater = curentuser.Id;
+                    dto1.Createtime = DateTime.Now;
+                    dto1.Modifier = curentuser.Id;
+                    dto1.Modifytime = DateTime.Now;
+                    dto1.OperationalMatters = "璁㈠崟锛�" + dto.OrderNo + " 璐拱涔︾睄";
+                    resultEntity = _admGoodsRecordService.save(dto1);
+
+                }
+
+
+
+                dto.Shoulier = curentuser.Id;
+                dto.Shoulitime = DateTime.Now;
+                dto.ShouliStatus = "2";
+
+                resultEntity = _cooperOrderService.shouli(dto);
+
+                scope.Complete();
             }
-
-            dto.Shoulier = curentuser.Id;
-            dto.Shoulitime = DateTime.Now;
-            dto.ShouliStatus = "2";
-
-              resultEntity = _cooperOrderService.shouli(dto);
 
             return new JsonResult(resultEntity);
         }
@@ -676,24 +747,69 @@
 
             ResultEntity resultEntity = new ResultEntity();
             resultEntity.Result = false;
-
-            CooperOrderDTO dto = _cooperOrderService.Get(Chedanid);
-            if (dto.ShouliStatus != "2")
+            using (TransactionScope scope = new TransactionScope())
             {
-                resultEntity.Result = false;
-                resultEntity.Message = "鍙湁鍙楃悊鐘舵�佺殑璁㈠崟鎵嶈兘鎾ゅ崟";
-                return new JsonResult(resultEntity);
+
+                CooperOrderDTO dto = _cooperOrderService.Get(Chedanid);
+                if (dto.ShouliStatus != "2")
+                {
+                    resultEntity.Result = false;
+                    resultEntity.Message = "鍙湁鍙楃悊鐘舵�佺殑璁㈠崟鎵嶈兘鎾ゅ崟";
+                    return new JsonResult(resultEntity);
+                }
+
+
+                if (dto.OrderType == "01")
+                {
+                    var shi = _fiBookService.Get(dto.OrderType1);
+                    if (string.IsNullOrEmpty(shi.Id))
+                    {
+                        resultEntity.Result = false;
+                        resultEntity.Message = "鏈壘鍒拌鍟嗗搧";
+                        return new JsonResult(resultEntity);
+                    }
+                    var admGoodsManageDTOs = _admGoodsManageService.GetList().Where(x => x.ISBN == shi.BookNo).FirstOrDefault();
+
+                    if (admGoodsManageDTOs == null)
+                    {
+
+
+                        resultEntity.Result = false;
+                        resultEntity.Message = "娌℃湁鎵惧埌璇ュ晢鍝�";
+                        return new JsonResult(resultEntity);
+
+                    }
+
+                    var left = admGoodsManageDTOs.GoodsLeft + dto.OrderNum;
+                    admGoodsManageDTOs.GoodsLeft = left;
+
+                    resultEntity = _admGoodsManageService.save(admGoodsManageDTOs);
+
+                    AdmGoodsRecordDTO dto1 = new AdmGoodsRecordDTO();
+                    dto1.GoodsId = admGoodsManageDTOs.Id;
+                    dto1.GoodsNum = dto.OrderNum;
+                    dto1.GoodsLeft = admGoodsManageDTOs.GoodsLeft;
+                    dto1.RecordTypeId = "01";
+                    dto1.RecStatus = "A";
+                    dto1.Creater = curentuser.Id;
+                    dto1.Createtime = DateTime.Now;
+                    dto1.Modifier = curentuser.Id;
+                    dto1.Modifytime = DateTime.Now;
+                    dto1.OperationalMatters = "璁㈠崟锛�" + dto.OrderNo + " 鎾ゅ崟";
+                    resultEntity = _admGoodsRecordService.save(dto1);
+
+                }
+
+
+                dto.Chedaner = curentuser.Id;
+                dto.Chedantime = DateTime.Now;
+                dto.ChedanStatus = "A";
+                dto.Chedan = Price;
+                dto.ShouliStatus = "0";
+
+                resultEntity = _cooperOrderService.chedan(dto);
+                scope.Complete();
             }
-
-           
-            dto.Chedaner = curentuser.Id;
-            dto.Chedantime = DateTime.Now;
-            dto.ChedanStatus = "A";
-            dto.Chedan = Price;
-            dto.ShouliStatus = "0";
-
-            resultEntity = _cooperOrderService.chedan(dto);
-
             return new JsonResult(resultEntity);
         }
         [CheckLogin]
diff --git a/zhengcaioa/zhengcaioa/Controllers/admin/AdmAskController.cs b/zhengcaioa/zhengcaioa/Controllers/admin/AdmAskController.cs
index cb75041..91cc7d4 100644
--- a/zhengcaioa/zhengcaioa/Controllers/admin/AdmAskController.cs
+++ b/zhengcaioa/zhengcaioa/Controllers/admin/AdmAskController.cs
@@ -30,6 +30,7 @@
         private readonly ICooperatecustomCustomerService _cooperatecustomCustomerService;
         private readonly IIntentionCustomerService _intentionCustomerService;
         private readonly IHrPositionService _hrPositionService;
+        private readonly IAdmGoodsRecordService _admGoodsRecordService;
 
         public AdmAskController(ILogger<AdmAskController> logger, IAskService askService, IHrDeptService hrDeptService, IWfRunProcessService wfRunProcessService
             , IWfHistoryService wfHistoryService, IWfNeeddeelService wfNeeddeelService
@@ -39,7 +40,8 @@
             , IAdmBreakPrecedentService aAdmBreakPrecedentService
             , ICooperatecustomCustomerService cooperatecustomCustomerService
             , IIntentionCustomerService intentionCustomerService
-            , IHrPositionService hrPositionService)
+            , IHrPositionService hrPositionService
+            , IAdmGoodsRecordService admGoodsRecordService)
         {
             _logger = logger;
             _hrDeptService = hrDeptService;
@@ -54,6 +56,7 @@
             _cooperatecustomCustomerService = cooperatecustomCustomerService;
             _intentionCustomerService = intentionCustomerService;
             _hrPositionService = hrPositionService;
+            _admGoodsRecordService = admGoodsRecordService;
         }
 
         public IActionResult Askcost(string id = "")
@@ -277,6 +280,19 @@
                         resultEntity.Message = "鐗╁搧鍓╀綑鏁伴噺涓嶈冻";
                         return new JsonResult(resultEntity);
                     }
+
+                    AdmGoodsRecordDTO dto = new AdmGoodsRecordDTO();
+                    dto.GoodsId = admGoodsManageDTO.Id;
+                    dto.GoodsNum = admAskGoodDTO.Shuliang.Value;
+                    dto.GoodsLeft = admGoodsManageDTO.GoodsLeft;
+                    dto.RecordTypeId = "02";
+                    dto.RecStatus = "A";
+                    dto.Creater = curentuser.Id;
+                    dto.Createtime = DateTime.Now;
+                    dto.Modifier = curentuser.Id;
+                    dto.Modifytime = DateTime.Now;
+                    dto.OperationalMatters = admAskGoodDTO.Tittle;
+                    resultEntity = _admGoodsRecordService.save(dto);
                 }
 
 
diff --git a/zhengcaioa/zhengcaioa/Controllers/admin/AdmGoodsManageController.cs b/zhengcaioa/zhengcaioa/Controllers/admin/AdmGoodsManageController.cs
index a4c75bd..07e284c 100644
--- a/zhengcaioa/zhengcaioa/Controllers/admin/AdmGoodsManageController.cs
+++ b/zhengcaioa/zhengcaioa/Controllers/admin/AdmGoodsManageController.cs
@@ -29,15 +29,18 @@
         private readonly IAdmGoodsManageService _admGoodsManageService;
         private readonly IAdmGoodsClassifyService _admGoodsClassifyService;
         private readonly IPltPageService _pltPageService;
+        private readonly IAdmGoodsRecordService _admGoodsRecordService;
 
 
-        public AdmGoodsManageController(ILogger<AdmGoodsManageController> logger, ILiaotianService liaotianService, IAdmGoodsManageService admGoodsManageService, IAdmGoodsClassifyService admGoodsClassifyService, IPltPageService pltPageService)
+        public AdmGoodsManageController(ILogger<AdmGoodsManageController> logger, ILiaotianService liaotianService, IAdmGoodsManageService admGoodsManageService, IAdmGoodsClassifyService admGoodsClassifyService, IPltPageService pltPageService
+            , IAdmGoodsRecordService admGoodsRecordService)
         {
             _logger = logger;
             _liaotianService = liaotianService;
             _admGoodsManageService = admGoodsManageService;
             _admGoodsClassifyService = admGoodsClassifyService;
             _pltPageService = pltPageService;
+            _admGoodsRecordService = admGoodsRecordService;
 
         }
 
@@ -268,6 +271,19 @@
                 }
 
 
+                AdmGoodsRecordDTO dto = new AdmGoodsRecordDTO();
+                dto.GoodsId = savedata.Id;
+                dto.GoodsNum = data.GoodsCaozuo;
+                dto.GoodsLeft = savedata.GoodsLeft;
+                dto.RecordTypeId = "02";
+                dto.RecStatus = "A";
+                dto.Creater = curentuser.Id;
+                dto.Createtime = DateTime.Now;
+                dto.Modifier = curentuser.Id;
+                dto.Modifytime = DateTime.Now;
+                dto.OperationalMatters = curentuser.UserName + "锛氬嚭搴�";
+                resultEntity = _admGoodsRecordService.save(dto);
+
 
 
                 data.Modifier = curentuser.Id;
@@ -339,6 +355,18 @@
                     savedata.GoodsLeft = data.GoodsCaozuo;
                 }
 
+                AdmGoodsRecordDTO dto = new AdmGoodsRecordDTO();
+                dto.GoodsId = savedata.Id;
+                dto.GoodsNum = data.GoodsCaozuo;
+                dto.GoodsLeft = savedata.GoodsLeft;
+                dto.RecordTypeId = "01";
+                dto.RecStatus = "A";
+                dto.Creater = curentuser.Id;
+                dto.Createtime = DateTime.Now;
+                dto.Modifier = curentuser.Id;
+                dto.Modifytime = DateTime.Now;
+                dto.OperationalMatters = curentuser.UserName+"锛氬叆搴�";
+                resultEntity = _admGoodsRecordService.save(dto);
 
 
 
@@ -366,5 +394,33 @@
             ViewData["curentuser"] = curentuser;
             return new JsonResult(_admGoodsManageService.ModifyStatus(Id, curentuser.Id));
         }
+
+
+        public IActionResult Liushuizhang(string id)
+        {
+            var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
+            ViewData["curentuser"] = curentuser;
+            List<ActionEntity> actionlist = new List<ActionEntity>();
+            ActionEntity actionEntity = new ActionEntity();
+            actionEntity.OpenType = 0;
+            actionEntity.ActionUrl = "";
+            actionEntity.ActionFun = "Search";
+            actionEntity.PageIco = "fa fa-search";
+            actionEntity.ActionName = "鏌ヨ";
+            actionlist.Add(actionEntity);
+
+            ViewData["ActionInfo"] = actionlist;
+            ViewBag.RecordTypeId = _liaotianService.GetSYScode("adm_goods_record", "RecordTypeId").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
+            ViewBag.id = id;
+            return View();
+        }
+
+
+        public IActionResult GetListLiushuizhang(AdmGoodsRecordDTOSearch search)
+        {
+            var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
+            ViewData["curentuser"] = curentuser;
+            return new JsonResult(_admGoodsRecordService.SearchByPaging(search));
+        }
     }
 }
diff --git a/zhengcaioa/zhengcaioa/Controllers/admin/AdmGoodsRecordController.cs b/zhengcaioa/zhengcaioa/Controllers/admin/AdmGoodsRecordController.cs
new file mode 100644
index 0000000..c8944a7
--- /dev/null
+++ b/zhengcaioa/zhengcaioa/Controllers/admin/AdmGoodsRecordController.cs
@@ -0,0 +1,125 @@
+锘縰sing DTO;
+using IServices;
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.Extensions.Logging;
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Transactions;
+using zhengcaioa.IService;
+using zhengcaioa.Models;
+
+namespace zhengcaioa.Controllers.admin
+{
+    public class AdmGoodsRecordController : Controller
+    {
+        private readonly ILogger<AdmGoodsRecordController> _logger;
+        private readonly IAdmGoodsRecordService _admGoodsRecordService;
+        private readonly ILiaotianService _liaotianService;
+
+        private readonly IAdmGoodsManageService _admGoodsManageService;
+
+        public AdmGoodsRecordController(ILogger<AdmGoodsRecordController> logger, IAdmGoodsRecordService admGoodsRecordService, ILiaotianService liaotianService
+            , IAdmGoodsManageService admGoodsManageService)
+        {
+            _logger = logger;
+          
+            _liaotianService = liaotianService;
+            _admGoodsRecordService = admGoodsRecordService;
+            _admGoodsManageService = admGoodsManageService;
+        }
+
+        //鍑哄簱鎺ュ彛
+        public IActionResult BookChuKu([FromBody] AdmGoodsRecordDTO dto)
+        {
+            ReturnMsg<List<ProjectDTO>> returnMsg = new ReturnMsg<List<ProjectDTO>>();
+            returnMsg.code = 2;
+
+            if (string.IsNullOrEmpty(dto.ISBN))
+            {
+                
+                    returnMsg.code = 2;
+                    returnMsg.error = "娌℃湁ISBN";
+                    returnMsg.count = 0;
+                    return new JsonResult(returnMsg);
+              
+            }
+
+            var admGoodsManageDTOs = _admGoodsManageService.GetList().Where(x=>x.ISBN == dto.ISBN).FirstOrDefault();
+            
+            if (admGoodsManageDTOs==null)
+            {
+                
+               
+                    returnMsg.code = 2;
+                    returnMsg.error = "娌℃湁鎵惧埌璇ュ晢鍝�";
+                    returnMsg.count = 0;
+                    return new JsonResult(returnMsg);
+
+            }
+            else if(!admGoodsManageDTOs.GoodsLeft.HasValue )
+            {
+                returnMsg.code = 2;
+                returnMsg.error = "璇ュ晢鍝佹病鏈夊簱瀛�";
+                returnMsg.count = 0;
+                return new JsonResult(returnMsg);
+            }
+            else if (admGoodsManageDTOs.GoodsLeft.Value< dto.GoodsNum)
+            {
+                returnMsg.code = 2;
+                returnMsg.error = "璇ュ晢鍝佸簱瀛樹笉瓒�";
+                returnMsg.count = 0;
+                return new JsonResult(returnMsg);
+            }
+
+           
+
+
+
+
+
+            try
+            {
+                using (TransactionScope scope = new TransactionScope())
+                {
+                    var left = admGoodsManageDTOs.GoodsLeft - dto.GoodsNum;
+                    dto.GoodsId = admGoodsManageDTOs.Id;
+                    dto.GoodsLeft = left;
+                    dto.RecordTypeId = "02";
+
+                    admGoodsManageDTOs.GoodsLeft = left;
+
+                    var resultEntity = _admGoodsManageService.save(admGoodsManageDTOs);
+
+                    dto.RecStatus = "A";
+                    if (String.IsNullOrEmpty(dto.Id))
+                    {
+                        dto.Creater = "1";
+                        dto.Createtime = DateTime.Now;
+                    }
+                    dto.Modifier = "1";
+                    dto.Modifytime = DateTime.Now;
+
+                    resultEntity = _admGoodsRecordService.save(dto);
+
+                    returnMsg.code = 1;
+                    returnMsg.count = 0;
+                    returnMsg.returnObj = null;
+                    scope.Complete();
+                }
+
+            }
+            catch (Exception ex)
+            {
+                returnMsg.code = 2;
+                returnMsg.error = "娌℃湁鑾峰彇鍒皌oken";
+                returnMsg.count = 0;
+
+            }
+            return new JsonResult(returnMsg);
+        }
+    }
+}
diff --git a/zhengcaioa/zhengcaioa/Controllers/admin/AdmTongxunluController.cs b/zhengcaioa/zhengcaioa/Controllers/admin/AdmTongxunluController.cs
index 066271e..989fd47 100644
--- a/zhengcaioa/zhengcaioa/Controllers/admin/AdmTongxunluController.cs
+++ b/zhengcaioa/zhengcaioa/Controllers/admin/AdmTongxunluController.cs
@@ -86,7 +86,7 @@
         {
             var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
             ViewData["curentuser"] = curentuser;
-            search.Creater = curentuser.Id;
+            //search.Creater = curentuser.Id;
             //JsonResult jsonResult =   new JsonResult(_liaotianService.SearchByPaging(search), new Newtonsoft.Json.Serialization.DefaultContractResolver());
             return new JsonResult(_admTongxunluService.SearchByPaging(search));
         }
diff --git a/zhengcaioa/zhengcaioa/Controllers/admin/AdmZhanghaomimaController.cs b/zhengcaioa/zhengcaioa/Controllers/admin/AdmZhanghaomimaController.cs
index 4e5136f..7f96079 100644
--- a/zhengcaioa/zhengcaioa/Controllers/admin/AdmZhanghaomimaController.cs
+++ b/zhengcaioa/zhengcaioa/Controllers/admin/AdmZhanghaomimaController.cs
@@ -87,7 +87,7 @@
         {
             var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
             ViewData["curentuser"] = curentuser;
-            search.Creater = curentuser.Id;
+            //search.Creater = curentuser.Id;
             //JsonResult jsonResult =   new JsonResult(_liaotianService.SearchByPaging(search), new Newtonsoft.Json.Serialization.DefaultContractResolver());
             return new JsonResult(_admZhanghaomimaService.SearchByPaging(search));
         }
diff --git a/zhengcaioa/zhengcaioa/Startup.cs b/zhengcaioa/zhengcaioa/Startup.cs
index f13e6d3..250630b 100644
--- a/zhengcaioa/zhengcaioa/Startup.cs
+++ b/zhengcaioa/zhengcaioa/Startup.cs
@@ -149,7 +149,8 @@
             services.AddScoped(typeof(IAdmZhanghaomimaService), typeof(AdmZhanghaomimaService));
             services.AddScoped(typeof(IAdmTongxunluService), typeof(AdmTongxunluService));
 
-            services.AddScoped(typeof(IAskService), typeof(AskService)); 
+            services.AddScoped(typeof(IAskService), typeof(AskService));
+            services.AddScoped(typeof(IAdmGoodsRecordService), typeof(AdmGoodsRecordService));
 
             //zcweb
             services.AddScoped(typeof(IDtChannelArticleNewsService), typeof(DtChannelArticleNewsService)); 
diff --git a/zhengcaioa/zhengcaioa/Views/AdmGoodsManage/Edit.cshtml b/zhengcaioa/zhengcaioa/Views/AdmGoodsManage/Edit.cshtml
index 86850ac..b550e75 100644
--- a/zhengcaioa/zhengcaioa/Views/AdmGoodsManage/Edit.cshtml
+++ b/zhengcaioa/zhengcaioa/Views/AdmGoodsManage/Edit.cshtml
@@ -139,88 +139,92 @@
 
 
 
-                                    <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">鐗╁搧浠锋牸锛堝厓锛�<i class="red">*</i></label>
-                                    <div class="col-sm-2 col-md-2" grouptype="Vdata">
-                                        <input class="form-control" label="鐗╁搧浠锋牸锛堝厓锛�" name="GoodsPrice" id="GoodsPrice" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="number" value="@Model.GoodsPrice" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">
-
-                                    </div>
-
-                                    <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">鐗╁搧鏁伴噺<i class="red">*</i></label>
-                                    <div class="col-sm-2 col-md-2" grouptype="Vdata">
-                                        <input class="form-control" label="鐗╁搧鏁伴噺" name="GoodsNum" id="GoodsNum" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="number" value="@Model.GoodsNum" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">
-
-                                    </div>
-
-                                  
-
-                                </div>*@
-                            <div class="clearfix layer-area" style="padding-bottom:15px;">
-                                @*@if (!string.IsNullOrWhiteSpace(Model.Id))
-        {
-            <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">鍓╀綑鏁伴噺</label>
+            <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">鐗╁搧浠锋牸锛堝厓锛�<i class="red">*</i></label>
             <div class="col-sm-2 col-md-2" grouptype="Vdata">
-                <input class="form-control" label="鍓╀綑鏁伴噺" name="GoodsLeft" id="GoodsLeft" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="number" value="@Model.GoodsLeft" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">
+                <input class="form-control" label="鐗╁搧浠锋牸锛堝厓锛�" name="GoodsPrice" id="GoodsPrice" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="number" value="@Model.GoodsPrice" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">
 
             </div>
-        }*@
+
+            <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">鐗╁搧鏁伴噺<i class="red">*</i></label>
+            <div class="col-sm-2 col-md-2" grouptype="Vdata">
+                <input class="form-control" label="鐗╁搧鏁伴噺" name="GoodsNum" id="GoodsNum" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="number" value="@Model.GoodsNum" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">
+
+            </div>
 
 
 
-                                <label class="text-right col-sm-1 col-md-1 control-label">鐗╁搧鐘舵��<i class="red">*</i></label>
-                                <div class="col-sm-2 col-md-2">
-                                    <select id="GoodsStatus" class="form-control" name="GoodsStatus" data-placeholder="閫夋嫨 搴忓垪 ...">
-                                        <option value="" hassubinfo="true">璇烽�夋嫨</option>
-                                        @foreach (var item in GoodsStatus)
-                                        {
-                                            @if (!item.CodeSn.Equals(Model.GoodsStatus))
+        </div>*@
+                                <div class="clearfix layer-area" style="padding-bottom:15px;">
+                                    @*@if (!string.IsNullOrWhiteSpace(Model.Id))
+            {
+                <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">鍓╀綑鏁伴噺</label>
+                <div class="col-sm-2 col-md-2" grouptype="Vdata">
+                    <input class="form-control" label="鍓╀綑鏁伴噺" name="GoodsLeft" id="GoodsLeft" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="number" value="@Model.GoodsLeft" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">
+
+                </div>
+            }*@
+
+
+
+                                    <label class="text-right col-sm-1 col-md-1 control-label">鐗╁搧鐘舵��<i class="red">*</i></label>
+                                    <div class="col-sm-2 col-md-2">
+                                        <select id="GoodsStatus" class="form-control" name="GoodsStatus" data-placeholder="閫夋嫨 搴忓垪 ...">
+                                            <option value="" hassubinfo="true">璇烽�夋嫨</option>
+                                            @foreach (var item in GoodsStatus)
                                             {
-                                                <option value="@item.CodeSn" hassubinfo="true">
-                                                    @item.Comments
-                                                </option>
-                                            }
-                                            else
-                                            {
-                                                <option value="@item.CodeSn" hassubinfo="true" selected="selected">
-                                                    @item.Comments
-                                                </option>
+                                                @if (!item.CodeSn.Equals(Model.GoodsStatus))
+                                                {
+                                                    <option value="@item.CodeSn" hassubinfo="true">
+                                                        @item.Comments
+                                                    </option>
+                                                }
+                                                else
+                                                {
+                                                    <option value="@item.CodeSn" hassubinfo="true" selected="selected">
+                                                        @item.Comments
+                                                    </option>
+                                                }
+
                                             }
 
-                                        }
+                                        </select>
+                                    </div>
 
-                                    </select>
+                                    <label class="text-right col-sm-1 col-md-1 control-label">鏄惁鑰楁潗<i class="red">*</i></label>
+                                    <div class="col-sm-2 col-md-2">
+                                        <select id="HaocaiStatus" class="form-control" name="HaocaiStatus" data-placeholder="閫夋嫨 搴忓垪 ...">
+                                            <option value="" hassubinfo="true">璇烽�夋嫨</option>
+                                            @foreach (var item in shifou)
+                                            {
+                                                @if (!item.CodeSn.Equals(Model.HaocaiStatus))
+                                                {
+                                                    <option value="@item.CodeSn" hassubinfo="true">
+                                                        @item.Comments
+                                                    </option>
+                                                }
+                                                else
+                                                {
+                                                    <option value="@item.CodeSn" hassubinfo="true" selected="selected">
+                                                        @item.Comments
+                                                    </option>
+                                                }
+
+                                            }
+
+                                        </select>
+                                    </div>
+
                                 </div>
 
-                                <label class="text-right col-sm-1 col-md-1 control-label">鏄惁鑰楁潗<i class="red">*</i></label>
-                                <div class="col-sm-2 col-md-2">
-                                    <select id="HaocaiStatus" class="form-control" name="HaocaiStatus" data-placeholder="閫夋嫨 搴忓垪 ...">
-                                        <option value="" hassubinfo="true">璇烽�夋嫨</option>
-                                        @foreach (var item in shifou)
-                                        {
-                                            @if (!item.CodeSn.Equals(Model.HaocaiStatus))
-                                            {
-                                                <option value="@item.CodeSn" hassubinfo="true">
-                                                    @item.Comments
-                                                </option>
-                                            }
-                                            else
-                                            {
-                                                <option value="@item.CodeSn" hassubinfo="true" selected="selected">
-                                                    @item.Comments
-                                                </option>
-                                            }
+                                <div class="clearfix layer-area" style="padding-bottom:15px;">
 
-                                        }
+                                    <label class="text-right col-sm-1 col-md-1 control-label">ISBN</label>
+                                    <div class="col-sm-2 col-md-2">
+                                        <input id="ISBN" class="form-control" label="ISBN" name="ISBN" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="true" type="text" value="@Model.ISBN">
 
-                                    </select>
+                                    </div>
+
                                 </div>
-
-                            </div>
- 
-
-
-
-
-
 
 
                             </div>
diff --git a/zhengcaioa/zhengcaioa/Views/AdmGoodsManage/Index.cshtml b/zhengcaioa/zhengcaioa/Views/AdmGoodsManage/Index.cshtml
index 0645e97..10658fb 100644
--- a/zhengcaioa/zhengcaioa/Views/AdmGoodsManage/Index.cshtml
+++ b/zhengcaioa/zhengcaioa/Views/AdmGoodsManage/Index.cshtml
@@ -41,6 +41,12 @@
                     return "<a onclick=\"OpenWindow('鍑哄簱','98%','100%', '/AdmGoodsManage/Chuku?id=" + rowObject.Id + "')\"  >鍑哄簱</a>";
                 }
             },
+            {
+                label: '鍑哄叆搴撹褰�', name: 'Remark', labtype: 'txt', hidden: false,
+                formatter: function (cellvalue, options, rowObject) {
+                    return "<a onclick=\"OpenWindow('" + rowObject.GoodsName + "','98%','100%', '/AdmGoodsManage/Liushuizhang?id=" + rowObject.Id + "')\"  >鍑哄叆搴撹褰�</a>";
+                }
+            },
         ];
         dataUrl = "/AdmGoodsManage/GetList";
         searchCol = [
diff --git a/zhengcaioa/zhengcaioa/Views/AdmGoodsManage/Liushuizhang.cshtml b/zhengcaioa/zhengcaioa/Views/AdmGoodsManage/Liushuizhang.cshtml
new file mode 100644
index 0000000..b552b79
--- /dev/null
+++ b/zhengcaioa/zhengcaioa/Views/AdmGoodsManage/Liushuizhang.cshtml
@@ -0,0 +1,69 @@
+锘緻{
+    ViewBag.Title = "AdmGoodsManage";
+    Layout = "~/Views/Shared/_Layout_Search.cshtml";
+}
+@section headerStyle{
+    <script type="text/javascript">
+        var RecordTypeId = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.RecordTypeId))';
+        dataCol = [
+            { label: 'id', name: 'Id', labtype: 'txt', hidden: true, width: 60},
+            
+            { label: '鍑哄叆搴�', name: 'RecordTypeName', labtype: 'txt', hidden: false, width: 60 },
+            { label: '鐗╁搧', name: 'GoodsName', labtype: 'txt', hidden: false, width: 100 },
+            { label: '鏁伴噺', name: 'GoodsNum', labtype: 'txt', hidden: false, width: 60},
+            { label: '鍓╀綑', name: 'GoodsLeft', labtype: 'txt', hidden: false, width: 60 },
+            { label: '鎽樿', name: 'OperationalMatters', labtype: 'txt', hidden: false, width: 200},
+            { label: '鎿嶄綔鏃堕棿', name: 'CreatetimeName', labtype: 'txt', hidden: false, width: 100},
+            
+        ];
+        dataUrl = "/AdmGoodsManage/GetListLiushuizhang?GoodsId=@ViewBag.id";
+        searchCol = [
+            { label: '鎿嶄綔鏃堕棿', name: 'Createtime', labtype: 'datearea', hidden: false },
+
+            { label: '鍑哄叆搴�', name: 'RecordTypeId', labtype: 'combox', hidden: false, data: JSON.parse(RecordTypeId) },
+            { label: '鎽樿', name: 'OperationalMatters', labtype: 'txt', hidden: false },
+
+            //{ label: '鏀朵粯娆句汉', name: 'PaymentUnit', labtype: 'txt', hidden: false },
+            
+
+
+
+
+        ];
+
+
+
+
+        var _afterSave = function (result) {
+            if (result) {
+                toastr.success("淇濆瓨鎴愬姛");
+            } else {
+                toastr.error("淇濆瓨澶辫触");
+            }
+        }
+
+        var _afterDel = function (result) {
+            if (result) {
+                toastr.success("鍒犻櫎鎴愬姛");
+            } else {
+                /**/
+                toastr.error("鍒犻櫎鎴愬姛");
+        /**/
+    }
+}
+    </script>
+}
+
+
+@section footerScripts{
+    <script type="text/javascript">
+
+
+
+
+
+
+
+    </script>
+}
+
diff --git a/zhengcaioa/zhengcaioa/Views/AdmZhanghaomima/Index.cshtml b/zhengcaioa/zhengcaioa/Views/AdmZhanghaomima/Index.cshtml
index 9934e52..08b99be 100644
--- a/zhengcaioa/zhengcaioa/Views/AdmZhanghaomima/Index.cshtml
+++ b/zhengcaioa/zhengcaioa/Views/AdmZhanghaomima/Index.cshtml
@@ -19,7 +19,7 @@
             {
                 label: '浜у搧椤圭洰', name: 'Chanpinxiangmu', labtype: 'txt', hidden: false, width: 100
             },
-            { label: '璐﹀彿', name: 'Zhanghao', labtype: 'txt', hidden: true, width: 100 },
+            { label: '璐﹀彿', name: 'Zhanghao', labtype: 'txt', hidden: false, width: 100 },
 
             { label: '瀵嗙爜', name: 'Mima', labtype: 'txt', hidden: false, width: 100 },
             { label: '瀵嗕繚', name: 'Mibao', labtype: 'txt', hidden: false, width: 100 },

--
Gitblit v1.9.1