username@email.com
2021-09-28 ef80d35cdbabf2ac5fd83f84714b4254e6444fef
通讯录,账号密码
8个文件已修改
14个文件已添加
2016 ■■■■■ 已修改文件
zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/DTO/AdmTongxunluDTO.cs 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/DTO/AdmZhanghaomimaDTO.cs 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/IServices/IAdmTongxunluService.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/IServices/IAdmZhanghaomimaService.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Model/AdmTongxunlu.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Model/AdmZhanghaomima.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Model/zhengcaioaContext.cs 112 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Services/AdmTongxunluService.cs 221 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Services/AdmZhanghaomimaService.cs 222 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Controllers/admin/AdmGoodsManageController.cs 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Controllers/admin/AdmTongxunluController.cs 163 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Controllers/admin/AdmZhanghaomimaController.cs 163 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Startup.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/AdmGoodsManage/Chuku.cshtml 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/AdmGoodsManage/Edit.cshtml 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/AdmGoodsManage/Index.cshtml 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/AdmGoodsManage/Ruku.cshtml 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/AdmTongxunlu/Edit.cshtml 309 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/AdmTongxunlu/Index.cshtml 123 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/AdmZhanghaomima/Edit.cshtml 314 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/AdmZhanghaomima/Index.cshtml 123 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/CommonToolsCore/AutoMapperConfigs.cs
@@ -263,7 +263,13 @@
            CreateMap<SysBaimingdan, SysBaimingdanDTO>();
            CreateMap<SysBaimingdanDTO, SysBaimingdan>();
            CreateMap<AdmTongxunlu, AdmTongxunluDTO>();
            CreateMap<AdmTongxunluDTO, AdmTongxunlu>();
            CreateMap<AdmZhanghaomima, AdmZhanghaomimaDTO>();
            CreateMap<AdmZhanghaomimaDTO, AdmZhanghaomima>();
        }
    }
zhengcaioa/DTO/AdmTongxunluDTO.cs
New file
@@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace DTO
{
    public class AdmTongxunluDTO
    {
        public string Id { get; set; }
        public string TypeId { get; set; }
        public string TypeName { get; set; }
        public string DanweiName { get; set; }
        public string Lianxiren { get; set; }
        public string Lianxidianhua { get; set; }
        public string Beuzhu { 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; }
    }
    public class AdmTongxunluDTOSearch : SearchEntity
    {
        public string TypeId { get; set; }
        public string DanweiName { get; set; }
        public string Creater { get; set; }
    }
}
zhengcaioa/DTO/AdmZhanghaomimaDTO.cs
New file
@@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace DTO
{
   public class AdmZhanghaomimaDTO
    {
        public string Id { get; set; }
        public string TypeId { get; set; }
        public string TypeName { get; set; }
        public string Chanpinxiangmu { get; set; }
        public string Zhanghao { get; set; }
        public string Mima { get; set; }
        public string Mibao { 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; }
    }
    public class AdmZhanghaomimaDTOSearch : SearchEntity
    {
        public string TypeId { get; set; }
        public string Chanpinxiangmu { get; set; }
        public string Creater { get; set; }
    }
}
zhengcaioa/IServices/IAdmTongxunluService.cs
New file
@@ -0,0 +1,21 @@
using DTO;
using System;
using System.Collections.Generic;
using System.Text;
namespace IServices
{
    public interface IAdmTongxunluService
    {
        ResultEntity save(AdmTongxunluDTO dto);
        AdmTongxunluDTO Get(string id);
        ResultDataEntity<AdmTongxunluDTO> SearchByPaging(AdmTongxunluDTOSearch searchEntity);
        ResultEntity ModifyStatus(string id, string userid);
        List<AdmTongxunluDTO> GetList();
    }
}
zhengcaioa/IServices/IAdmZhanghaomimaService.cs
New file
@@ -0,0 +1,21 @@
using DTO;
using System;
using System.Collections.Generic;
using System.Text;
namespace IServices
{
    public interface IAdmZhanghaomimaService
    {
        ResultEntity save(AdmZhanghaomimaDTO dto);
        AdmZhanghaomimaDTO Get(string id);
        ResultDataEntity<AdmZhanghaomimaDTO> SearchByPaging(AdmZhanghaomimaDTOSearch searchEntity);
        ResultEntity ModifyStatus(string id, string userid);
        List<AdmZhanghaomimaDTO> GetList();
    }
}
zhengcaioa/Model/AdmTongxunlu.cs
New file
@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace zhengcaioa.Models
{
    public partial class AdmTongxunlu
    {
        public string Id { get; set; }
        public string TypeId { get; set; }
        public string DanweiName { get; set; }
        public string Lianxiren { get; set; }
        public string Lianxidianhua { get; set; }
        public string Beuzhu { 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; }
    }
}
zhengcaioa/Model/AdmZhanghaomima.cs
New file
@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
#nullable disable
namespace zhengcaioa.Models
{
    public partial class AdmZhanghaomima
    {
        public string Id { get; set; }
        public string TypeId { get; set; }
        public string Chanpinxiangmu { get; set; }
        public string Zhanghao { get; set; }
        public string Mima { get; set; }
        public string Mibao { 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; }
    }
}
zhengcaioa/Model/zhengcaioaContext.cs
@@ -51,6 +51,8 @@
        public virtual DbSet<AdmGoodsClassify> AdmGoodsClassifies { get; set; }
        public virtual DbSet<AdmGoodsManage> AdmGoodsManages { get; set; }
        public virtual DbSet<AdmPieceCheck> AdmPieceChecks { get; set; }
        public virtual DbSet<AdmTongxunlu> AdmTongxunlus { get; set; }
        public virtual DbSet<AdmZhanghaomima> AdmZhanghaomimas { get; set; }
        public virtual DbSet<Area> Areas { get; set; }
        public virtual DbSet<Cgf> Cgfs { get; set; }
        public virtual DbSet<CooperOrder> CooperOrders { get; set; }
@@ -1892,6 +1894,116 @@
                    .HasComment("工作时间");
            });
            modelBuilder.Entity<AdmTongxunlu>(entity =>
            {
                entity.ToTable("adm_tongxunlu");
                entity.Property(e => e.Id).HasMaxLength(50);
                entity.Property(e => e.Beuzhu)
                    .HasMaxLength(500)
                    .HasColumnName("beuzhu");
                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.DanweiName)
                    .HasMaxLength(100)
                    .HasColumnName("danwei_name");
                entity.Property(e => e.Lianxidianhua)
                    .HasMaxLength(100)
                    .HasColumnName("lianxidianhua");
                entity.Property(e => e.Lianxiren)
                    .HasMaxLength(100)
                    .HasColumnName("lianxiren");
                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.RecStatus)
                    .IsRequired()
                    .HasMaxLength(1)
                    .HasColumnName("rec_status")
                    .HasDefaultValueSql("('A')");
                entity.Property(e => e.TypeId)
                    .HasMaxLength(50)
                    .HasColumnName("type_id");
            });
            modelBuilder.Entity<AdmZhanghaomima>(entity =>
            {
                entity.ToTable("adm_zhanghaomima");
                entity.Property(e => e.Id).HasMaxLength(50);
                entity.Property(e => e.Chanpinxiangmu)
                    .HasMaxLength(100)
                    .HasColumnName("chanpinxiangmu");
                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.Mibao)
                    .HasMaxLength(100)
                    .HasColumnName("mibao");
                entity.Property(e => e.Mima)
                    .HasMaxLength(100)
                    .HasColumnName("mima");
                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.RecStatus)
                    .IsRequired()
                    .HasMaxLength(1)
                    .HasColumnName("rec_status")
                    .HasDefaultValueSql("('A')");
                entity.Property(e => e.TypeId)
                    .HasMaxLength(50)
                    .HasColumnName("type_id");
                entity.Property(e => e.Zhanghao)
                    .HasMaxLength(100)
                    .HasColumnName("zhanghao");
            });
            modelBuilder.Entity<Area>(entity =>
            {
                entity.HasKey(e => e.CodeId);
zhengcaioa/Services/AdmTongxunluService.cs
New file
@@ -0,0 +1,221 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AutoMapper;
using DTO;
using IServices;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.EntityFrameworkCore;
using zhengcaioa.Models;
namespace Services
{
    public class AdmTongxunluService: IAdmTongxunluService
    {
        private readonly zhengcaioaContext _context;
        private readonly IMapper _mapper;
        public AdmTongxunluService(zhengcaioaContext context, IMapper mapper)
        {
            _context = context;
            _mapper = mapper;
        }
        public ResultEntity save(AdmTongxunluDTO dto)
        {
            ResultEntity resultEntity = new ResultEntity();
            try
            {
                var entity = _mapper.Map<AdmTongxunlu>(dto);
                if (String.IsNullOrEmpty(entity.Id))
                {
                    entity.Id = Guid.NewGuid().ToString();
                    dto.Id = entity.Id;
                    _context.AdmTongxunlus.Add(entity);
                }
                else
                {
                    var updateproject = _context.AdmTongxunlus.Find(entity.Id);
                    updateproject.TypeId = entity.TypeId;
                    updateproject.DanweiName = entity.DanweiName;
                    updateproject.Lianxidianhua = entity.Lianxidianhua;
                    updateproject.Lianxiren = entity.Lianxiren;
                    updateproject.Beuzhu = entity.Beuzhu;
                    updateproject.RecStatus = entity.RecStatus;
                    updateproject.Modifier = entity.Modifier;
                    updateproject.Modifytime = entity.Modifytime;
                }
                _context.SaveChanges();
                resultEntity.ReturnID = entity.Id;
                resultEntity.Result = true;
            }
            catch (Exception ex)
            {
                resultEntity.Result = false;
                resultEntity.Message = "保存失败,请联系管理员";
            }
            return resultEntity;
        }
        public AdmTongxunluDTO Get(string id)
        {
            var entity = _context.AdmTongxunlus.Find(id);
            if (entity.RecStatus != "A")
            {
                entity = new AdmTongxunlu();
            }
            var result = _mapper.Map<AdmTongxunluDTO>(entity);
            return result;
        }
        public ResultDataEntity<AdmTongxunluDTO> SearchByPaging(AdmTongxunluDTOSearch searchEntity)
        {
            ResultDataEntity<AdmTongxunluDTO> data = new ResultDataEntity<AdmTongxunluDTO>();
            List<AdmTongxunluDTO> list = new List<AdmTongxunluDTO>();
            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
                            }
                               );
            ///AdmTongxunlus
            var query = (from a in _context.AdmTongxunlus
                         join e in listCode.Where(x => x.CodeTable == "adm_tongxunlu" && x.CodeField == "type_id")
                        on a.TypeId equals e.CodeSn
                        into esssss
                         from eee in esssss.DefaultIfEmpty()
                         where a.RecStatus == "A"
                           && (string.IsNullOrWhiteSpace(searchEntity.TypeId) || a.TypeId == searchEntity.TypeId.Trim())
                             && (string.IsNullOrWhiteSpace(searchEntity.DanweiName) || a.DanweiName.Contains(searchEntity.DanweiName.Trim()))
                          && (string.IsNullOrWhiteSpace(searchEntity.Creater) || a.Creater == searchEntity.Creater.Trim())
                         select new AdmTongxunluDTO
                         {
                             Id = a.Id,
                             TypeId = a.TypeId,
                             TypeName = eee.Comments,
                             DanweiName = a.DanweiName,
                             Lianxiren = a.Lianxiren,
                             Lianxidianhua = a.Lianxidianhua,
                             // DocContent = a.DocContent,
                             Beuzhu = a.Beuzhu,
                             Creater = a.Creater,
                             Createtime = a.Createtime,
                             RecStatus = a.RecStatus,
                             Modifier = a.Modifier,
                             Modifytime = a.Modifytime,
                         }
                ).OrderByDescending(x => x.Modifytime).ToList();
            //if (searchEntity.totalrows == 0)
            searchEntity.totalrows = query.Count();
            var lianlist = query.Skip((searchEntity.page - 1) * searchEntity.rows).Take(searchEntity.rows).ToList();
            data.LoadData(searchEntity, lianlist);
            return data;
        }
        /// <summary>
        /// 修改主表状态
        /// </summary>
        /// <param name="id">主id</param>
        /// <param name="userid">用户</param>
        /// <returns></returns>
        public ResultEntity ModifyStatus(string id, string userid)
        {
            ResultEntity result = new ResultEntity();
            result.Result = true;
            var model = _context.AdmTongxunlus.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<AdmTongxunluDTO> GetList()
        {
            var listRole = _context.AdmTongxunlus.Where(r => r.RecStatus == "A").ToList();
            var list = _mapper.Map<List<AdmTongxunluDTO>>(listRole);
            return list;
        }
    }
}
zhengcaioa/Services/AdmZhanghaomimaService.cs
New file
@@ -0,0 +1,222 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AutoMapper;
using DTO;
using IServices;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.EntityFrameworkCore;
using zhengcaioa.Models;
namespace Services
{
    public class AdmZhanghaomimaService: IAdmZhanghaomimaService
    {
        private readonly zhengcaioaContext _context;
        private readonly IMapper _mapper;
        public AdmZhanghaomimaService(zhengcaioaContext context, IMapper mapper)
        {
            _context = context;
            _mapper = mapper;
        }
        public ResultEntity save(AdmZhanghaomimaDTO dto)
        {
            ResultEntity resultEntity = new ResultEntity();
            try
            {
                var entity = _mapper.Map<AdmZhanghaomima>(dto);
                if (String.IsNullOrEmpty(entity.Id))
                {
                    entity.Id = Guid.NewGuid().ToString();
                    dto.Id = entity.Id;
                    _context.AdmZhanghaomimas.Add(entity);
                }
                else
                {
                    var updateproject = _context.AdmZhanghaomimas.Find(entity.Id);
                    updateproject.TypeId = entity.TypeId;
                    updateproject.Chanpinxiangmu = entity.Chanpinxiangmu;
                    updateproject.Zhanghao = entity.Zhanghao;
                    updateproject.Mima = entity.Mima;
                    updateproject.Mibao = entity.Mibao;
                    updateproject.RecStatus = entity.RecStatus;
                    updateproject.Modifier = entity.Modifier;
                    updateproject.Modifytime = entity.Modifytime;
                }
                _context.SaveChanges();
                resultEntity.ReturnID = entity.Id;
                resultEntity.Result = true;
            }
            catch (Exception ex)
            {
                resultEntity.Result = false;
                resultEntity.Message = "保存失败,请联系管理员";
            }
            return resultEntity;
        }
        public AdmZhanghaomimaDTO Get(string id)
        {
            var entity = _context.AdmZhanghaomimas.Find(id);
            if (entity.RecStatus != "A")
            {
                entity = new AdmZhanghaomima();
            }
            var result = _mapper.Map<AdmZhanghaomimaDTO>(entity);
            return result;
        }
        public ResultDataEntity<AdmZhanghaomimaDTO> SearchByPaging(AdmZhanghaomimaDTOSearch searchEntity)
        {
            ResultDataEntity<AdmZhanghaomimaDTO> data = new ResultDataEntity<AdmZhanghaomimaDTO>();
            List<AdmZhanghaomimaDTO> list = new List<AdmZhanghaomimaDTO>();
            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
                            }
                               );
            ///AdmZhanghaomimas
            var query = (from a in _context.AdmZhanghaomimas
                         join e in listCode.Where(x => x.CodeTable == "adm_zhanghaomima" && x.CodeField == "type_id")
                        on a.TypeId equals e.CodeSn
                        into esssss
                         from eee in esssss.DefaultIfEmpty()
                         where a.RecStatus == "A"
                          && (string.IsNullOrWhiteSpace(searchEntity.TypeId) || a.TypeId == searchEntity.TypeId.Trim())
                             && (string.IsNullOrWhiteSpace(searchEntity.Chanpinxiangmu) || a.Chanpinxiangmu.Contains(searchEntity.Chanpinxiangmu.Trim()))
                          && (string.IsNullOrWhiteSpace(searchEntity.Creater) || a.Creater == searchEntity.Creater.Trim())
                         select new AdmZhanghaomimaDTO
                         {
                             Id = a.Id,
                             TypeId = a.TypeId,
                             TypeName = eee.Comments,
                             Chanpinxiangmu = a.Chanpinxiangmu,
                             Zhanghao = a.Zhanghao,
                             Mima = a.Mima,
                             // DocContent = a.DocContent,
                             Mibao = a.Mibao,
                             Creater = a.Creater,
                             Createtime = a.Createtime,
                             RecStatus = a.RecStatus,
                             Modifier = a.Modifier,
                             Modifytime = a.Modifytime,
                         }
                ).OrderByDescending(x => x.Modifytime).ToList();
            //if (searchEntity.totalrows == 0)
            searchEntity.totalrows = query.Count();
            var lianlist = query.Skip((searchEntity.page - 1) * searchEntity.rows).Take(searchEntity.rows).ToList();
            data.LoadData(searchEntity, lianlist);
            return data;
        }
        /// <summary>
        /// 修改主表状态
        /// </summary>
        /// <param name="id">主id</param>
        /// <param name="userid">用户</param>
        /// <returns></returns>
        public ResultEntity ModifyStatus(string id, string userid)
        {
            ResultEntity result = new ResultEntity();
            result.Result = true;
            var model = _context.AdmZhanghaomimas.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<AdmZhanghaomimaDTO> GetList()
        {
            var listRole = _context.AdmZhanghaomimas.Where(r => r.RecStatus == "A").ToList();
            var list = _mapper.Map<List<AdmZhanghaomimaDTO>>(listRole);
            return list;
        }
    }
}
zhengcaioa/zhengcaioa/Controllers/admin/AdmGoodsManageController.cs
@@ -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;
@@ -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();
zhengcaioa/zhengcaioa/Controllers/admin/AdmTongxunluController.cs
New file
@@ -0,0 +1,163 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AutoMapper;
using AngleSharp.Html.Parser;
using DTO;
using IServices;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Bot.Builder.Integration.AspNet.Core;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using System.Net.Http;
using System.Threading.Tasks;
using zhengcaioa.Models;
using zhengcaioa.IService;
using CommonToolsCore;
using Services;
using System.Transactions;
namespace zhengcaioa.Controllers.admin
{
    public class AdmTongxunluController : Controller
    {
        private readonly ILogger<AdmTongxunluController> _logger;
        private readonly ILiaotianService _liaotianService;
        private readonly IAdmTongxunluService _admTongxunluService;
        public AdmTongxunluController(ILogger<AdmTongxunluController> logger, ILiaotianService liaotianService, IAdmTongxunluService admTongxunluService) {
            _logger = logger;
            _liaotianService = liaotianService;
            _admTongxunluService = admTongxunluService;
        }
        public IActionResult Index()
        {
            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);
            ActionEntity actionEntity1 = new ActionEntity();
            actionEntity1.OpenType = 0;
            actionEntity1.ActionUrl = "";
            actionEntity1.ActionFun = "Add";
            actionEntity1.PageIco = "fa fa-plus";
            actionEntity1.ActionName = "新增";
            actionlist.Add(actionEntity1);
            ViewData["ActionInfo"] = actionlist;
            ViewBag.TypeId = _liaotianService.GetSYScode("adm_tongxunlu", "type_id").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
            return View();
        }
        public IActionResult GetList(AdmTongxunluDTOSearch search)
        {
            var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
            ViewData["curentuser"] = curentuser;
            search.Creater = curentuser.Id;
            //JsonResult jsonResult =   new JsonResult(_liaotianService.SearchByPaging(search), new Newtonsoft.Json.Serialization.DefaultContractResolver());
            return new JsonResult(_admTongxunluService.SearchByPaging(search));
        }
        public IActionResult Edit(string id = null)
        {
            var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
            ViewData["curentuser"] = curentuser;
            AdmTongxunluDTO dto = new AdmTongxunluDTO();
            if (!String.IsNullOrEmpty(id))
            {
                dto = _admTongxunluService.Get(id);
            }
            ViewBag.TypeId = _liaotianService.GetSYScode("adm_tongxunlu", "type_id");
            ViewData.Model = dto;
            return View();
        }
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="data">岗位实体类对象</param>
        /// <returns></returns>
        ///
        [HttpPost]
        public IActionResult Save(AdmTongxunluDTO data)
        {
            // data.DocContent = data.DocContent.Replace(";", ";");
            ResultEntity resultEntity = new ResultEntity();
            using (TransactionScope scope = new TransactionScope())
            {
                var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
                ViewData["curentuser"] = curentuser;
                data.RecStatus = "A";
                if (String.IsNullOrEmpty(data.Id))
                {
                    data.Creater = curentuser.Id;
                    data.Createtime = DateTime.Now;
                }
                data.Modifier = curentuser.Id;
                data.Modifytime = DateTime.Now;
                resultEntity = _admTongxunluService.save(data);
                scope.Complete();
            }
            return new JsonResult(resultEntity);
        }
        /// <summary>
        /// 删除主信息
        /// </summary>
        /// <param name="info">实体</param>
        /// <returns></returns>
        ///
        public IActionResult Nullify(string Id = "")
        {
            var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
            ViewData["curentuser"] = curentuser;
            return new JsonResult(_admTongxunluService.ModifyStatus(Id, curentuser.Id));
        }
    }
}
zhengcaioa/zhengcaioa/Controllers/admin/AdmZhanghaomimaController.cs
New file
@@ -0,0 +1,163 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AutoMapper;
using AngleSharp.Html.Parser;
using DTO;
using IServices;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Bot.Builder.Integration.AspNet.Core;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using System.Net.Http;
using System.Threading.Tasks;
using zhengcaioa.Models;
using zhengcaioa.IService;
using CommonToolsCore;
using Services;
using System.Transactions;
namespace zhengcaioa.Controllers.admin
{
    public class AdmZhanghaomimaController : Controller
    {
        private readonly ILogger<AdmZhanghaomimaController> _logger;
        private readonly ILiaotianService _liaotianService;
        private readonly IAdmZhanghaomimaService _admZhanghaomimaService;
        public AdmZhanghaomimaController(ILogger<AdmZhanghaomimaController> logger, ILiaotianService liaotianService, IAdmZhanghaomimaService admZhanghaomimaService)
        {
            _logger = logger;
            _liaotianService = liaotianService;
            _admZhanghaomimaService = admZhanghaomimaService;
        }
        public IActionResult Index()
        {
            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);
            ActionEntity actionEntity1 = new ActionEntity();
            actionEntity1.OpenType = 0;
            actionEntity1.ActionUrl = "";
            actionEntity1.ActionFun = "Add";
            actionEntity1.PageIco = "fa fa-plus";
            actionEntity1.ActionName = "新增";
            actionlist.Add(actionEntity1);
            ViewData["ActionInfo"] = actionlist;
            ViewBag.TypeId = _liaotianService.GetSYScode("adm_zhanghaomima", "type_id").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
            return View();
        }
        public IActionResult GetList(AdmZhanghaomimaDTOSearch search)
        {
            var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
            ViewData["curentuser"] = curentuser;
            search.Creater = curentuser.Id;
            //JsonResult jsonResult =   new JsonResult(_liaotianService.SearchByPaging(search), new Newtonsoft.Json.Serialization.DefaultContractResolver());
            return new JsonResult(_admZhanghaomimaService.SearchByPaging(search));
        }
        public IActionResult Edit(string id = null)
        {
            var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
            ViewData["curentuser"] = curentuser;
            AdmZhanghaomimaDTO dto = new AdmZhanghaomimaDTO();
            if (!String.IsNullOrEmpty(id))
            {
                dto = _admZhanghaomimaService.Get(id);
            }
            ViewBag.TypeId = _liaotianService.GetSYScode("adm_zhanghaomima", "type_id");
            ViewData.Model = dto;
            return View();
        }
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="data">岗位实体类对象</param>
        /// <returns></returns>
        ///
        [HttpPost]
        public IActionResult Save(AdmZhanghaomimaDTO data)
        {
            // data.DocContent = data.DocContent.Replace(";", ";");
            ResultEntity resultEntity = new ResultEntity();
            using (TransactionScope scope = new TransactionScope())
            {
                var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
                ViewData["curentuser"] = curentuser;
                data.RecStatus = "A";
                if (String.IsNullOrEmpty(data.Id))
                {
                    data.Creater = curentuser.Id;
                    data.Createtime = DateTime.Now;
                }
                data.Modifier = curentuser.Id;
                data.Modifytime = DateTime.Now;
                resultEntity = _admZhanghaomimaService.save(data);
                scope.Complete();
            }
            return new JsonResult(resultEntity);
        }
        /// <summary>
        /// 删除主信息
        /// </summary>
        /// <param name="info">实体</param>
        /// <returns></returns>
        ///
        public IActionResult Nullify(string Id = "")
        {
            var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
            ViewData["curentuser"] = curentuser;
            return new JsonResult(_admZhanghaomimaService.ModifyStatus(Id, curentuser.Id));
        }
    }
}
zhengcaioa/zhengcaioa/Startup.cs
@@ -146,6 +146,9 @@
            services.AddScoped(typeof(IOrderBanciOrderService), typeof(OrderBanciOrderService));
            services.AddScoped(typeof(ISysBaimingdanService), typeof(SysBaimingdanService));
            services.AddScoped(typeof(IAdmZhanghaomimaService), typeof(AdmZhanghaomimaService));
            services.AddScoped(typeof(IAdmTongxunluService), typeof(AdmTongxunluService));
            services.AddScoped(typeof(IAskService), typeof(AskService)); 
            //zcweb
zhengcaioa/zhengcaioa/Views/AdmGoodsManage/Chuku.cshtml
@@ -107,9 +107,18 @@
                                            @foreach (var item in ClassifyId)
                                            {
                                                <option value="@item.Id" hassubinfo="true">
                                                    @item.ClassifyName
                                                </option>
                                                @if (!item.Id.Equals(Model.ClassifyId))
                                                {
                                                    <option value="@item.Id" hassubinfo="true">
                                                        @item.ClassifyName
                                                    </option>
                                                }
                                                else
                                                {
                                                    <option value="@item.Id" hassubinfo="true" selected="selected">
                                                        @item.ClassifyName
                                                    </option>
                                                }
                                            }
@@ -125,9 +134,18 @@
                                            @foreach (var item in Goods)
                                            {
                                                <option value="@item.Id" hassubinfo="true">
                                                    @item.GoodsName
                                                </option>
                                                @if (!item.Id.Equals(Model.Id))
                                                {
                                                    <option value="@item.Id" hassubinfo="true">
                                                        @item.GoodsName
                                                    </option>
                                                }
                                                else
                                                {
                                                    <option value="@item.Id" hassubinfo="true" selected="selected">
                                                        @item.GoodsName
                                                    </option>
                                                }
                                            }
@@ -144,7 +162,7 @@
                                    <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="" readonly="">
                                        <input class="form-control" label="剩余数量" name="GoodsLeft" id="GoodsLeft" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="number" value="@Model.GoodsLeft" readonly="">
                                    </div>
zhengcaioa/zhengcaioa/Views/AdmGoodsManage/Edit.cshtml
@@ -10,6 +10,8 @@
    List<SysCodeDtl> shifou = ViewData["shifou"] as List<SysCodeDtl>; //物品状态 
    string ClassifyIds = ViewData["ClassifyIds"] as string; //物品类型
}
@{
    Layout = null;
@@ -304,7 +306,11 @@
             }
             else {
                 $("#GoodsStatus").val("A");
                  $("#ClassifyId").val("@ClassifyIds");
             }
            });
@@ -377,7 +383,7 @@
                toastr.warning("是否耗材不能为空");
                return;
            }
@@ -398,7 +404,7 @@
                        if (data.Result) {
                            //  parent._afterSave(true);
                            parent.layer.msg('成功保存', { icon: 6 });
                            window.location = "/AdmGoodsManage/Edit";
                            window.location = "/AdmGoodsManage/Edit?ClassifyIds=" + $("#ClassifyId").val();
                            //try {
zhengcaioa/zhengcaioa/Views/AdmGoodsManage/Index.cshtml
@@ -29,7 +29,18 @@
            { label: '剩余数量', name: 'GoodsLeft', labtype: 'txt', hidden: false, width: 100 },
            { label: '物品状态', name: 'GoodsStatusName', labtype: 'txt', hidden: false, width: 100 },
            {
                label: '入库', name: 'GoodsName', labtype: 'txt', hidden: false, width: 50,
                formatter: function (cellvalue, options, rowObject) {
                    return "<a onclick=\"OpenWindow('入库','98%','100%', '/AdmGoodsManage/Ruku?id=" + rowObject.Id + "')\"  >入库</a>";
                }
            },
            {
                label: '出库', name: 'GoodsName', labtype: 'txt', hidden: false, width: 50,
                formatter: function (cellvalue, options, rowObject) {
                    return "<a onclick=\"OpenWindow('出库','98%','100%', '/AdmGoodsManage/Chuku?id=" + rowObject.Id + "')\"  >出库</a>";
                }
            },
        ];
        dataUrl = "/AdmGoodsManage/GetList";
        searchCol = [
zhengcaioa/zhengcaioa/Views/AdmGoodsManage/Ruku.cshtml
@@ -106,11 +106,20 @@
                                            <option value="" hassubinfo="true">请选择</option>
                                            @foreach (var item in ClassifyId)
                                            {
                                                @if (!item.Id.Equals(Model.ClassifyId))
                                                {
                                                    <option value="@item.Id" hassubinfo="true">
                                                        @item.ClassifyName
                                                    </option>
                                                }
                                                else
                                                {
                                                    <option value="@item.Id" hassubinfo="true" selected="selected">
                                                        @item.ClassifyName
                                                    </option>
                                                }
                                            }
@@ -124,10 +133,21 @@
                                            <option value="" hassubinfo="true">请选择</option>
                                            @foreach (var item in Goods)
                                            {
                                                @if (!item.Id.Equals(Model.Id))
                                                {
                                                    <option value="@item.Id" hassubinfo="true">
                                                        @item.GoodsName
                                                    </option>
                                                }
                                                else
                                                {
                                                    <option value="@item.Id" hassubinfo="true" selected="selected">
                                                        @item.GoodsName
                                                    </option>
                                                }
                                                <option value="@item.Id" hassubinfo="true">
                                                    @item.GoodsName
                                                </option>
                                            }
@@ -144,7 +164,7 @@
                                    <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=""  readonly="">
                                        <input class="form-control" label="剩余数量" name="GoodsLeft" id="GoodsLeft" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="number" value="@Model.GoodsLeft"  readonly="">
                                    </div>
zhengcaioa/zhengcaioa/Views/AdmTongxunlu/Edit.cshtml
New file
@@ -0,0 +1,309 @@
@model DTO.AdmTongxunluDTO
@using DTO;
@using zhengcaioa.Models;
@{
    List<SysCodeDtl> TypeId = ViewData["TypeId"] as List<SysCodeDtl>; //物品状态
}
@{
    Layout = null;
}
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="ThemeBucket">
    <title>@(SiteConfig.SiteName)</title>
    <link href="~/css/bootstrap.min.css" rel="stylesheet">
    <link href="~/css/font-awesome.min.css" rel="stylesheet">
    <link href="~/css/animate.min.css" rel="stylesheet">
    @*<link href="~/css/plugins/iCheck/custom.css" rel="stylesheet">*@
    <link href="~/css/style.min.css" rel="stylesheet">
    <link href="~/css/plugins/chosen/chosen.css" rel="stylesheet">
    @*<link href="~/js/plugins/layer/skin/layer.css" rel="stylesheet">*@
    @*<link href="~/css/plugins/datapicker/datepicker3.css" rel="stylesheet">*@
    <link href="~/css/style.min.css" rel="stylesheet">
    <link href="~/css/plugins/toastr/toastr.min.css" rel="stylesheet" />
    <link href="~/css/plugins/webuploader/webuploader.css" rel="stylesheet" />
    <style type="text/css">
        .webuploader-pick {
            position: relative;
            display: inline-block;
            cursor: pointer;
            background: #00b7ee;
            padding: 8px 14px 7px 14px;
            color: #fff;
            text-align: center;
            border-radius: 3px;
            overflow: hidden;
        }
        div.clearfix > label {
            padding-top: 8px;
        }
        .chosen-container {
            border-radius: 1px;
            border: 1px solid #e5e6e7;
        }
        .col-md-1.control-label {
            padding-right: 0px;
            font-weight: 400;
        }
    </style>
    <!-- jqgrid-->
    @*<link href="~/css/plugins/jqgrid/ui.jqgrid.css" rel="stylesheet">*@
    <script language="javascript" src="~/js/jquery.min.js" type="text/javascript"></script>
    <script src="~/js/bootstrap.min.js"></script>
    @*<script src="~/js/plugins/bootstro/bootstro.js"></script>*@
    <!--容器-->
    @*<script language="javascript" src="~/js/datehelper.js" type="text/javascript"></script>*@
    @*<script language="javascript" src="~/js/plugins/query/jquery.query-object.js" type="text/javascript"></script>*@
    @*<script language="javascript" src="~/js/plugins/iCheck/icheck.min.js" type="text/javascript"></script>*@
    <script language="javascript" src="~/js/plugins/chosen/chosen.jquery.js" type="text/javascript"></script>
    @*<script language="javascript" src="~/js/plugins/datapicker/bootstrap-datepicker.js" type="text/javascript"></script>*@
    <script language="javascript" src="~/js/plugins/layer/layer.js" type="text/javascript"></script>
    @*<script src="~/js/plugins/jqgrid/jquery.jqGrid.min.js" type="text/javascript"></script>*@
    @*<script src="~/js/plugins/jqgrid/i18n/grid.locale-cn.js" type="text/javascript"></script>*@
    <script src="~/js/plugins/toastr/toastr.min.js" type="text/javascript"></script>
    <script src="~/js/plugins/webuploader/webuploader.min.js"></script>
    <script language="javascript" src="~/js/common-layout.js" type="text/javascript"></script>
    <script src="~/js/plugins/layer/laydate/laydate.js" type="text/javascript"></script>
    @*<script src="~/js/plugins/iTexbox/itextbox.js" type="text/javascript"></script>*@
    @*<script src="~/js/plugins/iuploader/iuploader.js"></script>*@
    <script src="~/js/TUJS.js"></script>
</head>
<body class="gray-bg" style="overflow:auto">
    <form id="formtest">
        <div class="wrapper wrapper-content" id="ibox-content" style="padding:15px;">
            <div class="row">
                <div class="col-sm-12">
                    <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <h5>                            <i class="fa fa-list"></i>&nbsp;基本信息</h5>
                        </div>
                        <div id="div_content" class="ibox-content" style="background-color:white;">
                            <div class="row">
                                <div class="clearfix layer-area" style="padding-bottom:15px;">
                                    <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="TypeId" class="form-control" name="TypeId" data-placeholder="选择 序列 ...">
                                            <option value="" hassubinfo="true">请选择</option>
                                            @foreach (var item in TypeId)
                                            {
                                                @if (!item.CodeSn.Equals(Model.TypeId))
                                                {
                                                    <option value="@item.CodeSn" hassubinfo="true">
                                                        @item.Comments
                                                    </option>
                                                }
                                                else
                                                {
                                                    <option value="@item.CodeSn" hassubinfo="true" selected="selected">
                                                        @item.Comments
                                                    </option>
                                                }
                                            }
                                        </select>
                                        <input type="hidden" id="Id" name="Id" value="@Model.Id" />
                                    </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">
                                        <input id="DanweiName" class="form-control" label="单位名称" name="DanweiName" labtype="txt" addvisible="true" editvisible="true" maxlength="100" reg="" ismust="true" type="text" value="@Model.DanweiName">
                                    </div>
                                </div>
                                <div class="clearfix layer-area" style="padding-bottom:15px;">
                                    <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">
                                        <input id="Lianxiren" class="form-control" label="联系人" name="Lianxiren" labtype="txt" addvisible="true" editvisible="true" maxlength="100" reg="" ismust="true" type="text" value="@Model.Lianxiren">
                                    </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">
                                        <input id="Lianxidianhua" class="form-control" label="联系电话" name="Lianxidianhua" labtype="txt" addvisible="true" editvisible="true" maxlength="100" reg="" ismust="true" type="text" value="@Model.Lianxidianhua">
                                    </div>
                                </div>
                                <div class="clearfix layer-area" style="padding-bottom:15px;">
                                    <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">备注</label>
                                    <div class="col-sm-11 col-md-11">
                                        <textarea class="form-control bt" id="Beuzhu" name="Beuzhu" title="备注" isempty="" maxlength="500" length="long" style="resize:none;overflow-y:hidden; min-height:60px;" onpropertychange="this.style.height=this.scrollHeight + 'px'" oninput="this.style.height=this.scrollHeight + 'px'">@Model.Beuzhu</textarea>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        </div>
        <div class="wrapper wrapper-content" style="margin-top:0px"></div>
        <div class="ibox-content" id="top" style="z-index:100; position:fixed; height:50px; width:100%;bottom:0; text-align: right; padding-top:8px ">
            <div class="" style="float:right;" data-bootstro-width="500px" data-bootstro-content="功能按钮:“保存”,“删除”">
                <a class="btn btn-success" href="javascript:void(0)" onclick="savePosition();" style="margin-left:4px; border-radius:4px;">
                    <i class="glyphicon glyphicon-ok"></i>&nbsp;&nbsp;<span class="bold">提交</span>
                </a>
            </div>
        </div>
    </form>
    <script type="text/javascript">
        var hh = document.body.clientHeight - $('.ibox-title').height() - $("#top").height() * 2 - 95;
        $("#div_content").height(hh);
        toastr.options = {
            "closeButton": true,
            "debug": false,
            "progressBar": true,
            "positionClass": "toast-bottom-right",
            "onclick": null,
            "showDuration": "300",
            "hideDuration": "600",
            "timeOut": "4500",
            "extendedTimeOut": "600",
            "showEasing": "swing",
            "hideEasing": "linear",
            "showMethod": "fadeIn",
            "hideMethod": "fadeOut"
        };
        var Beuzhu = document.getElementById("Beuzhu");
        Beuzhu.style.height = Beuzhu.scrollHeight + 'px';
        var id = '@Model.Id';
        // 保存岗位信息
        var savePosition = function () {
            if ($("#TypeId").val() == '') {
                toastr.warning("类别不能为空");
                return;
            }
            if ($.trim($("#DanweiName").val()) == '') {
                toastr.warning("单位名称不能为空");
                return;
            }
            if ($.trim($("#Lianxiren").val()) == '') {
                toastr.warning("联系人不能为空");
                return;
            }
            if ($.trim($("#Lianxidianhua").val()) == '') {
                toastr.warning("联系电话不能为空");
                return;
            }
           // var data = { id: $("#Id").val(), DocType: $("#DocType").val(), DocDept: $("#DocDept").val(), PublishTime: $("#PublishTime").val(), DocNo: $("#DocNo").val(), DocTitle: $("#DocTitle").val(), DocContent: ueue, DocZtc: $("#DocZtc").val(), Printtimes: $("#Printtimes").val(), DocCsdw: $("#DocCsdw").val(), PrintStatus: $("#PrintStatus").val()}
            $.ajax({
                type: "POST",
                url: "/AdmTongxunlu/Save",
                dataType: "json",
                global: false,
                data: $('form').serializeArray(),
                success: function (data) {
                        if (data.Result) {
                            //  parent._afterSave(true);
                            parent.layer.msg('成功保存', { icon: 6 });
                            try {
                                _pageAutoClose();//自动关闭页面方法
                            }
                            catch (err) {
                                parent._CloseTab1("/AdmTongxunlu/Edit/");
                            }
                        }
                        else {
                            // toastr.error("失败");
                            parent.layer.msg(data.Message, { icon: 5 });
                        }
                },
                error: function () {
                    parent.layer.msg('失败', { icon: 5 });
                }
            });
        }
        function _pageAutoClose() {
            parent.window._reloadPageData();
            var index = parent.layer.getFrameIndex(window.name);
            parent.layer.isRefresh = true;
            parent.layer.closeAll('loading');
            parent.layer.close(index);
            return false;
        }
    </script>
</body>
</html>
zhengcaioa/zhengcaioa/Views/AdmTongxunlu/Index.cshtml
New file
@@ -0,0 +1,123 @@
@{
    ViewBag.Title = "AdmTongxunlu";
    Layout = "~/Views/Shared/_Layout_Search.cshtml";
}
@section headerStyle{
    <script type="text/javascript">
        var TypeId = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.TypeId))';
        dataCol = [
            { label: 'id', name: 'Id', labtype: 'txt', hidden: true },
            {
                label: '类别', name: 'TypeName', labtype: 'txt', hidden: false, width: 100
            },
            {
                label: '单位名称', name: 'DanweiName', labtype: 'txt', hidden: false, width: 100
            },
            { label: '联系人', name: 'Lianxiren', labtype: 'txt', hidden: true, width: 100 },
            { label: '联系电话', name: 'Lianxidianhua', labtype: 'txt', hidden: false, width: 100 },
            { label: '备注', name: 'Beuzhu', labtype: 'txt', hidden: false, width: 100 },
            {
                label: '操作', name: 'caozuo', labtype: 'txt', hidden: false, width: 50,
                formatter: function (cellvalue, options, rowObject) {
                    return "<a onclick=\"OpenWindow('修改','98%','100%', '/AdmTongxunlu/Edit?id=" + rowObject.Id + "')\"  >修改</a>&nbsp;&nbsp;&nbsp;<a onclick=\"_pagedel('" + rowObject.Id + "')\"  >删除</a>";
                }
            },
        ];
        dataUrl = "/AdmTongxunlu/GetList";
        searchCol = [
            { label: '类别', name: 'TypeId', labtype: 'combox', hidden: false, data: JSON.parse(TypeId), cwidth: '5%', cccwidth: '15%' },
            { label: '单位名称', name: 'DanweiName', labtype: 'txt', hidden: false },
        ];
        var _pageAdd = function () {
            OpenWindow("新增物品", "98%", "90%", "/AdmTongxunlu/Edit/");
        }
        var _pagedel = function (id) {
            if (confirm('是否删除记录')) {
                $.ajax({
                    type: "GET",
                    url: "/AdmTongxunlu/Nullify?Id=" + id,
                    dataType: "json",
                    global: false,
                    data: '',
                    success: function (data) {
                        if (data.Result) {
                            layer.msg('删除成功', { icon: 6 });
                            window._reloadPageData();
                        }
                        else {
                            // toastr.error("");
                            layer.msg('删除失败', { icon: 5 });
                        }
                    },
                    error: function () {
                        if ($.isNumber(imgLoad)) {
                            layer.close(imgLoad);
                        }
                        //toastr.error("保存失败");
                        layer.msg('保存失败', { icon: 5 });
                    }
                });
            }
        }
        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>
}
zhengcaioa/zhengcaioa/Views/AdmZhanghaomima/Edit.cshtml
New file
@@ -0,0 +1,314 @@
@model DTO.AdmZhanghaomimaDTO
@using DTO;
@using zhengcaioa.Models;
@{
    List<SysCodeDtl> TypeId = ViewData["TypeId"] as List<SysCodeDtl>; //物品状态
}
@{
    Layout = null;
}
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="ThemeBucket">
    <title>@(SiteConfig.SiteName)</title>
    <link href="~/css/bootstrap.min.css" rel="stylesheet">
    <link href="~/css/font-awesome.min.css" rel="stylesheet">
    <link href="~/css/animate.min.css" rel="stylesheet">
    @*<link href="~/css/plugins/iCheck/custom.css" rel="stylesheet">*@
    <link href="~/css/style.min.css" rel="stylesheet">
    <link href="~/css/plugins/chosen/chosen.css" rel="stylesheet">
    @*<link href="~/js/plugins/layer/skin/layer.css" rel="stylesheet">*@
    @*<link href="~/css/plugins/datapicker/datepicker3.css" rel="stylesheet">*@
    <link href="~/css/style.min.css" rel="stylesheet">
    <link href="~/css/plugins/toastr/toastr.min.css" rel="stylesheet" />
    <link href="~/css/plugins/webuploader/webuploader.css" rel="stylesheet" />
    <style type="text/css">
        .webuploader-pick {
            position: relative;
            display: inline-block;
            cursor: pointer;
            background: #00b7ee;
            padding: 8px 14px 7px 14px;
            color: #fff;
            text-align: center;
            border-radius: 3px;
            overflow: hidden;
        }
        div.clearfix > label {
            padding-top: 8px;
        }
        .chosen-container {
            border-radius: 1px;
            border: 1px solid #e5e6e7;
        }
        .col-md-1.control-label {
            padding-right: 0px;
            font-weight: 400;
        }
    </style>
    <!-- jqgrid-->
    @*<link href="~/css/plugins/jqgrid/ui.jqgrid.css" rel="stylesheet">*@
    <script language="javascript" src="~/js/jquery.min.js" type="text/javascript"></script>
    <script src="~/js/bootstrap.min.js"></script>
    @*<script src="~/js/plugins/bootstro/bootstro.js"></script>*@
    <!--容器-->
    @*<script language="javascript" src="~/js/datehelper.js" type="text/javascript"></script>*@
    @*<script language="javascript" src="~/js/plugins/query/jquery.query-object.js" type="text/javascript"></script>*@
    @*<script language="javascript" src="~/js/plugins/iCheck/icheck.min.js" type="text/javascript"></script>*@
    <script language="javascript" src="~/js/plugins/chosen/chosen.jquery.js" type="text/javascript"></script>
    @*<script language="javascript" src="~/js/plugins/datapicker/bootstrap-datepicker.js" type="text/javascript"></script>*@
    <script language="javascript" src="~/js/plugins/layer/layer.js" type="text/javascript"></script>
    @*<script src="~/js/plugins/jqgrid/jquery.jqGrid.min.js" type="text/javascript"></script>*@
    @*<script src="~/js/plugins/jqgrid/i18n/grid.locale-cn.js" type="text/javascript"></script>*@
    <script src="~/js/plugins/toastr/toastr.min.js" type="text/javascript"></script>
    <script src="~/js/plugins/webuploader/webuploader.min.js"></script>
    <script language="javascript" src="~/js/common-layout.js" type="text/javascript"></script>
    <script src="~/js/plugins/layer/laydate/laydate.js" type="text/javascript"></script>
    @*<script src="~/js/plugins/iTexbox/itextbox.js" type="text/javascript"></script>*@
    @*<script src="~/js/plugins/iuploader/iuploader.js"></script>*@
    <script src="~/js/TUJS.js"></script>
</head>
<body class="gray-bg" style="overflow:auto">
    <form id="formtest">
        <div class="wrapper wrapper-content" id="ibox-content" style="padding:15px;">
            <div class="row">
                <div class="col-sm-12">
                    <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <h5>                            <i class="fa fa-list"></i>&nbsp;基本信息</h5>
                        </div>
                        <div id="div_content" class="ibox-content" style="background-color:white;">
                            <div class="row">
                                <div class="clearfix layer-area" style="padding-bottom:15px;">
                                    <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="TypeId" class="form-control" name="TypeId" data-placeholder="选择 序列 ...">
                                            <option value="" hassubinfo="true">请选择</option>
                                            @foreach (var item in TypeId)
                                            {
                                                @if (!item.CodeSn.Equals(Model.TypeId))
                                                {
                                                    <option value="@item.CodeSn" hassubinfo="true">
                                                        @item.Comments
                                                    </option>
                                                }
                                                else
                                                {
                                                    <option value="@item.CodeSn" hassubinfo="true" selected="selected">
                                                        @item.Comments
                                                    </option>
                                                }
                                            }
                                        </select>
                                        <input type="hidden" id="Id" name="Id" value="@Model.Id" />
                                    </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">
                                        <input id="Chanpinxiangmu" class="form-control" label="产品项目" name="Chanpinxiangmu" labtype="txt" addvisible="true" editvisible="true" maxlength="100" reg="" ismust="true" type="text" value="@Model.Chanpinxiangmu">
                                    </div>
                                </div>
                                <div class="clearfix layer-area" style="padding-bottom:15px;">
                                    <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">
                                        <input id="Zhanghao" class="form-control" label="账号" name="Zhanghao" labtype="txt" addvisible="true" editvisible="true" maxlength="100" reg="" ismust="true" type="text" value="@Model.Zhanghao">
                                    </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">
                                        <input id="Mima" class="form-control" label="密码" name="Mima" labtype="txt" addvisible="true" editvisible="true" maxlength="100" reg="" ismust="true" type="text" value="@Model.Mima">
                                    </div>
                                </div>
                                <div class="clearfix layer-area" style="padding-bottom:15px;">
                                    <label class="text-right col-sm-1 col-md-1 control-label">密保</label>
                                    <div class="col-sm-2 col-md-2">
                                        <input id="Mibao" class="form-control" label="密保" name="Mibao" labtype="txt" addvisible="true" editvisible="true" maxlength="100" reg="" ismust="true" type="text" value="@Model.Mibao">
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        </div>
        <div class="wrapper wrapper-content" style="margin-top:0px"></div>
        <div class="ibox-content" id="top" style="z-index:100; position:fixed; height:50px; width:100%;bottom:0; text-align: right; padding-top:8px ">
            <div class="" style="float:right;" data-bootstro-width="500px" data-bootstro-content="功能按钮:“保存”,“删除”">
                <a class="btn btn-success" href="javascript:void(0)" onclick="savePosition();" style="margin-left:4px; border-radius:4px;">
                    <i class="glyphicon glyphicon-ok"></i>&nbsp;&nbsp;<span class="bold">提交</span>
                </a>
            </div>
        </div>
    </form>
    <script type="text/javascript">
        var hh = document.body.clientHeight - $('.ibox-title').height() - $("#top").height() * 2 - 95;
        $("#div_content").height(hh);
        toastr.options = {
            "closeButton": true,
            "debug": false,
            "progressBar": true,
            "positionClass": "toast-bottom-right",
            "onclick": null,
            "showDuration": "300",
            "hideDuration": "600",
            "timeOut": "4500",
            "extendedTimeOut": "600",
            "showEasing": "swing",
            "hideEasing": "linear",
            "showMethod": "fadeIn",
            "hideMethod": "fadeOut"
        };
        var id = '@Model.Id';
        // 保存岗位信息
        var savePosition = function () {
            if ($("#TypeId").val() == '') {
                toastr.warning("类别不能为空");
                return;
            }
            if ($.trim($("#Chanpinxiangmu").val()) == '') {
                toastr.warning("产品项目不能为空");
                return;
            }
            if ($.trim($("#Zhanghao").val()) == '') {
                toastr.warning("账号不能为空");
                return;
            }
            if ($.trim($("#Mima").val()) == '') {
                toastr.warning("密码不能为空");
                return;
            }
           // var data = { id: $("#Id").val(), DocType: $("#DocType").val(), DocDept: $("#DocDept").val(), PublishTime: $("#PublishTime").val(), DocNo: $("#DocNo").val(), DocTitle: $("#DocTitle").val(), DocContent: ueue, DocZtc: $("#DocZtc").val(), Printtimes: $("#Printtimes").val(), DocCsdw: $("#DocCsdw").val(), PrintStatus: $("#PrintStatus").val()}
            $.ajax({
                type: "POST",
                url: "/AdmZhanghaomima/Save",
                dataType: "json",
                global: false,
                data: $('form').serializeArray(),
                success: function (data) {
                        if (data.Result) {
                            //  parent._afterSave(true);
                            parent.layer.msg('成功保存', { icon: 6 });
                            try {
                                _pageAutoClose();//自动关闭页面方法
                            }
                            catch (err) {
                                parent._CloseTab1("/AdmZhanghaomima/Edit/");
                            }
                        }
                        else {
                            // toastr.error("失败");
                            parent.layer.msg(data.Message, { icon: 5 });
                        }
                },
                error: function () {
                    parent.layer.msg('失败', { icon: 5 });
                }
            });
        }
        function _pageAutoClose() {
            parent.window._reloadPageData();
            var index = parent.layer.getFrameIndex(window.name);
            parent.layer.isRefresh = true;
            parent.layer.closeAll('loading');
            parent.layer.close(index);
            return false;
        }
    </script>
</body>
</html>
zhengcaioa/zhengcaioa/Views/AdmZhanghaomima/Index.cshtml
New file
@@ -0,0 +1,123 @@
@{
    ViewBag.Title = "AdmZhanghaomima";
    Layout = "~/Views/Shared/_Layout_Search.cshtml";
}
@section headerStyle{
    <script type="text/javascript">
        var TypeId = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.TypeId))';
        dataCol = [
            { label: 'id', name: 'Id', labtype: 'txt', hidden: true },
            {
                label: '类别', name: 'TypeName', labtype: 'txt', hidden: false, width: 100
            },
            {
                label: '产品项目', name: 'Chanpinxiangmu', labtype: 'txt', hidden: false, width: 100
            },
            { label: '账号', name: 'Zhanghao', labtype: 'txt', hidden: true, width: 100 },
            { label: '密码', name: 'Mima', labtype: 'txt', hidden: false, width: 100 },
            { label: '密保', name: 'Mibao', labtype: 'txt', hidden: false, width: 100 },
            {
                label: '操作', name: 'caozuo', labtype: 'txt', hidden: false, width: 50,
                formatter: function (cellvalue, options, rowObject) {
                    return "<a onclick=\"OpenWindow('修改','98%','100%', '/AdmZhanghaomima/Edit?id=" + rowObject.Id + "')\"  >修改</a>&nbsp;&nbsp;&nbsp;<a onclick=\"_pagedel('" + rowObject.Id + "')\"  >删除</a>";
                }
            },
        ];
        dataUrl = "/AdmZhanghaomima/GetList";
        searchCol = [
            { label: '类别', name: 'TypeId', labtype: 'combox', hidden: false, data: JSON.parse(TypeId), cwidth: '5%', cccwidth: '15%' },
            { label: '产品项目', name: 'Chanpinxiangmu', labtype: 'txt', hidden: false },
        ];
        var _pageAdd = function () {
            OpenWindow("新增物品", "98%", "90%", "/AdmZhanghaomima/Edit/");
        }
        var _pagedel = function (id) {
            if (confirm('是否删除记录')) {
                $.ajax({
                    type: "GET",
                    url: "/AdmZhanghaomima/Nullify?Id=" + id,
                    dataType: "json",
                    global: false,
                    data: '',
                    success: function (data) {
                        if (data.Result) {
                            layer.msg('删除成功', { icon: 6 });
                            window._reloadPageData();
                        }
                        else {
                            // toastr.error("");
                            layer.msg('删除失败', { icon: 5 });
                        }
                    },
                    error: function () {
                        if ($.isNumber(imgLoad)) {
                            layer.close(imgLoad);
                        }
                        //toastr.error("保存失败");
                        layer.msg('保存失败', { icon: 5 });
                    }
                });
            }
        }
        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>
}