username@email.com
2021-07-13 10ec50f8e9ded45e8b439114a17ed89297c948c7
提交
27个文件已修改
2个文件已添加
10785 ■■■■■ 已修改文件
zhengcaioa/DTO/CooperOrderDTO.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/DTO/CooperatecustomCustomerDTO.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/DTO/ExpertDTO.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/DTO/ProjectDTO.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/DTO/ResultEntity.cs 248 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/IServices/IExpertService.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Model/CooperatecustomCustomer.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Model/zhengcaioaContext.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Services/CooperOrderService.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Services/CooperatecustomCustomerService.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Services/ExpertService.cs 154 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Services/LiaotianService.cs 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/Services/ProjectService.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Controllers/Customer/IntentionCustomerController.cs 71 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Controllers/Customer/IntentionVisitController.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Controllers/Expert/ExpertController.cs 180 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Controllers/Finance/FiOrderrecievemoneyController.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Properties/PublishProfiles/FolderProfile.pubxml.user 9323 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/Expert/Dispatch.cshtml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/Expert/EditJiesuan.cshtml 361 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/Expert/ExpertFeiyong.cshtml 106 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/Expert/ExpertOrderDispatch.cshtml 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/IntentionCustomer/IndexYiXiang.cshtml 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/IntentionVisit/Edit.cshtml 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/Liaotian/Edit.cshtml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/Liaotian/Indexcheck.cshtml 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/Project/Select.cshtml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/Shared/_Layout_Header.cshtml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
表修改.sql 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/DTO/CooperOrderDTO.cs
@@ -93,7 +93,7 @@
        public string HuifangStatussss { get; set; }
        public string HuiyuanId { get; set; }
    }
}
zhengcaioa/DTO/CooperatecustomCustomerDTO.cs
@@ -57,6 +57,7 @@
        public string Weixin { get; set; }
        public string Shifoutianjiaweixin { get; set; }
        public string HuiyuanId { get; set; }
    }
    public class CooperatecustomCustomerDTOSearch : SearchEntity
@@ -74,6 +75,6 @@
        public string Shifouweixin { get; set; }
        
        public string HuiyuanId { get; set; }
    }
}
zhengcaioa/DTO/ExpertDTO.cs
@@ -123,6 +123,7 @@
        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 string sort { get; set; }
@@ -140,7 +141,11 @@
        public string OrderNo { get; set; }
        public string XdTime { get; set; }
        public string KhdwName { get; set; }
        public int isDispatch { get; set; }
        public string isDispatch { get; set; }
        public string PdTime { get; set; }
        public string Sort { get; set; }
    }
    #endregion
zhengcaioa/DTO/ProjectDTO.cs
@@ -122,5 +122,7 @@
        public string Fenchadayu { get; set; }
        public string Baojiachaxiaoyu { get; set; }
    }
}
zhengcaioa/DTO/ResultEntity.cs
@@ -63,4 +63,252 @@
        public int count { get; set; }
        
    }
    /// <summary>
    /// è®¢å•表
    /// </summary>
    [Serializable]
    public class UserOrders
    {
        #region Model
        private int _id;
        private string _order_no = string.Empty;
        private int _payment_id = 0;
        private int _payment_status = 0;
        private DateTime? _payment_time;
        private string _express_no = string.Empty;
        private int _express_status = 0;
        private DateTime? _express_time;
        private string _accept_name = string.Empty;
        private string _mobile = string.Empty;
        private string _area = string.Empty;
        private string _address = string.Empty;
        private int _is_invoice = 0;
        private string _invoice_title = string.Empty;
        private decimal _invoice_taxes = 0M;
        private decimal _payable_amount = 0M;
        private decimal _real_amount = 0M;
        private decimal _order_amount = 0M;
        private int _status = 1;
        private DateTime _add_time = DateTime.Now;
        private DateTime? _complete_time;
        /// <summary>
        /// è®¢å•类型
        /// </summary>
        public string order_type { get; set; }
        /// <summary>
        /// è‡ªå¢žID
        /// </summary>
        public int id
        {
            set { _id = value; }
            get { return _id; }
        }
        /// <summary>
        /// è®¢å•号
        /// </summary>
        public string order_no
        {
            set { _order_no = value; }
            get { return _order_no; }
        }
        /// <summary>
        /// æ”¯ä»˜æ–¹å¼
        /// </summary>
        public int payment_id
        {
            set { _payment_id = value; }
            get { return _payment_id; }
        }
        /// <summary>
        /// æ”¯ä»˜çŠ¶æ€0未支付1待支付2已支付
        /// </summary>
        public int payment_status
        {
            set { _payment_status = value; }
            get { return _payment_status; }
        }
        /// <summary>
        /// å¿«é€’单号
        /// </summary>
        public string express_no
        {
            set { _express_no = value; }
            get { return _express_no; }
        }
        /// <summary>
        /// æ”¶è´§äººå§“名
        /// </summary>
        public string accept_name
        {
            set { _accept_name = value; }
            get { return _accept_name; }
        }
        /// <summary>
        /// æ‰‹æœº
        /// </summary>
        public string mobile
        {
            set { _mobile = value; }
            get { return _mobile; }
        }
        /// <summary>
        /// æ‰€å±žçœå¸‚区
        /// </summary>
        public string area
        {
            set { _area = value; }
            get { return _area; }
        }
        /// <summary>
        /// æ”¶è´§åœ°å€
        /// </summary>
        public string address
        {
            set { _address = value; }
            get { return _address; }
        }
        /// <summary>
        /// æ˜¯å¦ç´¢è¦å‘票
        /// </summary>
        public int is_invoice
        {
            set { _is_invoice = value; }
            get { return _is_invoice; }
        }
        /// <summary>
        /// å‘票抬头
        /// </summary>
        public string invoice_title
        {
            set { _invoice_title = value; }
            get { return _invoice_title; }
        }
        /// <summary>
        /// è®¢å•总金额
        /// </summary>
        public decimal order_amount
        {
            set { _order_amount = value; }
            get { return _order_amount; }
        }
        /// <summary>
        /// çŠ¶æ€è¯´æ˜Ž
        /// </summary>
        public string statusChs
        {
            get; set;
        }
        /// <summary>
        /// ä¸‹å•æ—¶é—´
        /// </summary>
        public DateTime add_time
        {
            set { _add_time = value; }
            get { return _add_time; }
        }
        private List<usercart_items> _order_goods;
        /// <summary>
        /// å•†å“åˆ—表
        /// </summary>
        public List<usercart_items> order_goods
        {
            set { _order_goods = value; }
            get { return _order_goods; }
        }
        #endregion
    }
    /// <summary>
    /// è´­ç‰©è½¦åˆ—表
    /// </summary>
    [Serializable]
    public class usercart_items
    {
        #region Model
        private string _img_url = string.Empty;
        private decimal _sell_price = 0M;
        private int _quantity = 1;
        private int _stock_quantity = 0;
        /// <summary>
        /// ID
        /// </summary>
        public int id
        {
            get; set;
        }
        /// <summary>
        /// å•†å“ID
        /// </summary>
        public int good_id
        {
            get; set;
        }
        /// <summary>
        /// å•†å“åç§°
        /// </summary>
        public string name
        {
            get; set;
        }
        /// <summary>
        /// å›¾ç‰‡è·¯å¾„
        /// </summary>
        public string img_url
        {
            set { _img_url = value; }
            get { return _img_url; }
        }
        /// <summary>
        /// é”€å”®å•ä»·
        /// </summary>
        public decimal sell_price
        {
            set { _sell_price = value; }
            get { return _sell_price; }
        }
        /// <summary>
        /// è´­ä¹°æ•°é‡
        /// </summary>
        public int quantity
        {
            get { return _quantity; }
            set { _quantity = value; }
        }
        /// <summary>
        /// åº“存数量
        /// </summary>
        public int stock_quantity
        {
            set { _stock_quantity = value; }
            get { return _stock_quantity; }
        }
        #endregion
    }
}
zhengcaioa/IServices/IExpertService.cs
@@ -22,5 +22,11 @@
        ResultDataEntity<ExpertPromoteDTO> SearchExpPromote(ExpertPromoteDTOSearch searchEntity);
        ResultDataEntity<ExpertOrderDipatchDTO> SearchOrderDispatch(ExpertOrderDipatchDTOSearch searchEntity);
        ResultEntity SaveDispatch(ExpertOrderDipatchDTO dipatchDTO);
        ResultDataEntity<ExpertOrderDipatchDTO> SearchJiesuan(ExpertOrderDipatchDTOSearch searchEntity);
        ExpertOrderDipatchDTO GetDispatch(string id);
    }
}
zhengcaioa/Model/CooperatecustomCustomer.cs
@@ -43,5 +43,7 @@
        public DateTime Modifytime { get; set; }
        public string Weixin { get; set; }
        public string Shifoutianjiaweixin { get; set; }
        public string HuiyuanId { get; set; }
    }
}
zhengcaioa/Model/zhengcaioaContext.cs
@@ -1637,6 +1637,11 @@
                    .HasColumnName("f_tel")
                    .HasComment("联系电话");
                entity.Property(e => e.HuiyuanId)
                   .HasMaxLength(50)
                   .HasColumnName("huiyuanId")
                   .HasComment("会员Id");
                entity.Property(e => e.Hyfl)
                    .HasMaxLength(50)
                    .HasColumnName("hyfl")
zhengcaioa/Services/CooperOrderService.cs
@@ -237,8 +237,7 @@
                                          && (string.IsNullOrWhiteSpace(searchEntity.WangongStatus) || a.WangongStatus == searchEntity.WangongStatus.Trim())
                                           && (string.IsNullOrWhiteSpace(searchEntity.SonghuoStatus) || a.SonghuoStatus == searchEntity.SonghuoStatus.Trim())
                                            && (string.IsNullOrWhiteSpace(searchEntity.HuifangStatussss) || a.HuifangStatus == searchEntity.HuifangStatussss.Trim())
                                              && (string.IsNullOrWhiteSpace(searchEntity.HuiyuanId) || ggg.HuiyuanId == searchEntity.HuiyuanId.Trim())
zhengcaioa/Services/CooperatecustomCustomerService.cs
@@ -94,7 +94,7 @@
                    updateproject.Modifier = cooperatecustomCustomer.Modifier;
                    updateproject.Modifytime = cooperatecustomCustomer.Modifytime;
                    updateproject.Weixin = cooperatecustomCustomer.Weixin;
                    updateproject.HuiyuanId = cooperatecustomCustomer.HuiyuanId;
                    updateproject.Shifoutianjiaweixin = cooperatecustomCustomer.Shifoutianjiaweixin;
                }
@@ -204,7 +204,7 @@
                               && (string.IsNullOrWhiteSpace(searchEntity.City) || a.City == searchEntity.City.Trim())
                                && (string.IsNullOrWhiteSpace(searchEntity.AreaId) || a.AreaId == searchEntity.AreaId.Trim())
                                 && (string.IsNullOrWhiteSpace(searchEntity.Shifouweixin) || (searchEntity.Shifouweixin == "A" && a.Weixin != null) || (searchEntity.Shifouweixin != "A" && a.Weixin == null) ) 
                                 && (string.IsNullOrWhiteSpace(searchEntity.HuiyuanId) || a.HuiyuanId == searchEntity.HuiyuanId.Trim())
                         select new CooperatecustomCustomerDTO
                         {
@@ -254,6 +254,7 @@
                             CreatetimeName = a.Createtime.ToString("yyyy-MM-dd"),
                             Weixin = a.Weixin,
                             Shifoutianjiaweixin = a.Shifoutianjiaweixin,
                             HuiyuanId = a.HuiyuanId,
                         }
                        ).OrderByDescending(x => x.Modifytime).ToList();
zhengcaioa/Services/ExpertService.cs
@@ -412,6 +412,10 @@
                         && (string.IsNullOrWhiteSpace(searchEntity.OrderNo) || a.OrderNo.Contains(searchEntity.OrderNo.Trim()))
                         && (string.IsNullOrWhiteSpace(searchEntity.KhdwName) || ggg.Name.Contains(searchEntity.KhdwName.Trim()))
                         && (string.IsNullOrWhiteSpace(searchEntity.Khlx) || ggg.Khlx == searchEntity.Khlx.Trim())
                          && (string.IsNullOrWhiteSpace(searchEntity.isDispatch) || (searchEntity.isDispatch == "1" && hod.Id!=null) || (searchEntity.isDispatch == "0" && hod.Id == null) )
                           && (string.IsNullOrWhiteSpace(searchEntity.ExpertId) ||  hod.ExpertId == searchEntity.ExpertId.Trim())
                         // && (string.IsNullOrWhiteSpace(searchEntity.HuifangStatus) || a.HuifangStatus.Contains(searchEntity.HuifangStatus.Trim()))
                         //  && (string.IsNullOrWhiteSpace(searchEntity.PingjiaStatus) || a.PingjiaStatus.Contains(searchEntity.PingjiaStatus.Trim()))
@@ -466,7 +470,19 @@
                if (string.IsNullOrEmpty(dispatch.Id))
                {
                    dispatch.Id = Guid.NewGuid().ToString();
                    dipatchDTO.Id = dispatch.Id;
                    _context.ExpertOrderDispatches.Add(dispatch);
                }
                else
                {
                   var model = _context.ExpertOrderDispatches.Find(dispatch.Id);
                    model.Orderid = dipatchDTO.OrderId;
                    model.ExpertId = dipatchDTO.ExpertId;
                    model.Money = dipatchDTO.Money;
                    model.RecStatus = dipatchDTO.RecStatus;
                    model.Modifier = dipatchDTO.Modifier;
                    model.Modifytime = dipatchDTO.Modifytime.Value;
                    model.Sort = dipatchDTO.sort;
                }
                _context.SaveChanges();
                resultEntity.ReturnID = dispatch.Id;
@@ -483,7 +499,145 @@
        #endregion
        #region ä¸“家结算
        /// <summary>
        /// æŸ¥è¯¢ä¸“家结算
        /// </summary>
        /// <param name="searchEntity"></param>
        /// <returns></returns>
        public ResultDataEntity<ExpertOrderDipatchDTO> SearchJiesuan(ExpertOrderDipatchDTOSearch searchEntity)
        {
            ResultDataEntity<ExpertOrderDipatchDTO> data = new ResultDataEntity<ExpertOrderDipatchDTO>();
            List<ExpertOrderDipatchDTO> list = new List<ExpertOrderDipatchDTO>();
            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 PdTimestart = DateTime.Now;
            DateTime PdTimeend = DateTime.Now;
            if (!string.IsNullOrWhiteSpace(searchEntity.PdTime))
            {
                string[] PdTimes = searchEntity.PdTime.Split("|");
                DateTime.TryParse(PdTimes[0], out PdTimestart);
                DateTime.TryParse(PdTimes[1], out PdTimeend);
                PdTimeend = PdTimeend.AddDays(1);
            }
            var query = (from hod in _context.ExpertOrderDispatches.Where(x => x.RecStatus == "A")
                         join  a in _context.CooperOrders on hod.Orderid equals a.Id
                         join b in listCode.Where(x => x.CodeTable == "CooperOrder" && x.CodeField == "shouli_status")
                         on a.ShouliStatus equals b.CodeSn
                         into bsss
                         from bbb in bsss.DefaultIfEmpty()
                         join f in listCode.Where(x => x.CodeTable == "CooperVisit" && x.CodeField == "jtype")
                         on a.OrderType equals f.CodeSn
                          into fsssss
                         from fff in fsssss.DefaultIfEmpty()
                         join k in listCode.Where(x => x.CodeTable == "system" && x.CodeField == "shifou")
                        on hod.Sort equals k.CodeSn
                         into ksssss
                         from kkk in ksssss.DefaultIfEmpty()
                         join ggg in _context.CooperatecustomCustomers
                          on a.Khdw equals ggg.Id
                         join expt in _context.Experts
                           on hod.ExpertId equals expt.Id
                         where a.RecStatus == "A"
                          && (string.IsNullOrWhiteSpace(searchEntity.PdTime) || (hod.Createtime >= PdTimestart && hod.Createtime <= PdTimeend))
                             && (string.IsNullOrWhiteSpace(searchEntity.ExpertId) || hod.ExpertId == searchEntity.ExpertId.Trim())
                               && (string.IsNullOrWhiteSpace(searchEntity.OrderNo) || a.OrderNo.Contains(searchEntity.OrderNo.Trim()))
                                && (string.IsNullOrWhiteSpace(searchEntity.Sort) || hod.Sort == searchEntity.Sort.Trim())
                         select new ExpertOrderDipatchDTO
                         {
                             Id = hod.Id,
                             XdTime = a.XdTime,
                             XdTimeName = a.XdTime.ToString("yyyy-MM-dd"),
                             OrderId = a.Id,
                             OrderNo = a.OrderNo,
                             Khdw = a.Khdw,
                             KhdwName = ggg.Name,
                             OrderType = a.OrderType,
                             OrderTypeName = fff.Comments,
                             //OrderPro = a.OrderPro,
                             //OrderProName = hhh.Name,
                             //OrderNum = a.OrderNum,
                             Shr = a.Shr,
                             ShrAddress = a.ShrAddress,
                             ShrTel = a.ShrTel,
                             Money = hod.Money,
                             Creater = hod.Creater,
                             Createtime = hod.Createtime,
                             CreatetimeName = hod.Createtime.ToString("yyyy-MM-dd"),
                             ExpertId = hod.ExpertId,
                             ExpertName = expt.Name,
                             RecStatus = hod.RecStatus,
                             Modifier = hod.Modifier,
                             Modifytime = hod.Modifytime,
                             sort = kkk.Comments,
                         }
                ).OrderByDescending(x => x.XdTime).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;
        }
        #endregion
        public ExpertOrderDipatchDTO GetDispatch(string id)
        {
            var entity = _context.ExpertOrderDispatches.Find(id);
            if (entity.RecStatus != "A")
            {
                entity = new ExpertOrderDispatch();
            }
            var exDTO = _mapper.Map<ExpertOrderDipatchDTO>(entity);
            return exDTO;
        }
    }
}
zhengcaioa/Services/LiaotianService.cs
@@ -120,14 +120,23 @@
                DateTime.TryParse(Createtimes[1], out Createtimeend);
                Createtimeend = Createtimeend.AddDays(1);
            }
            //var query1 = _context.Liaotians.Where(a => a.RecStatus == "A");
            //筛选
            var query = (from a in _context.Liaotians
                         join h in _context.LiaotianShoucangs.Where(x => x.RecStatus == "A" && x.Creater == searchEntity.ShouCangCreater)
                      on a.Id equals h.LiaotianId
                     into hsss
                         from hhh in hsss.DefaultIfEmpty()
                     //    join h in _context.LiaotianShoucangs.Where(x => x.RecStatus == "A" && x.Creater == searchEntity.ShouCangCreater)
                     // on a.Id equals h.LiaotianId
                     //into hsss
                     //    from hhh in hsss.DefaultIfEmpty()
                         where a.RecStatus == "A"
@@ -139,7 +148,7 @@
   && (string.IsNullOrWhiteSpace(searchEntity.Shifoushenhe) || (a.Clientid == searchEntity.Shifoushenhe.Trim()))
    && (string.IsNullOrWhiteSpace(searchEntity.ChushuStatus) || (a.ChushuStatus == searchEntity.ChushuStatus.Trim()))
     && (string.IsNullOrWhiteSpace(searchEntity.Creater) || (a.Creater == searchEntity.Creater.Trim()))
      && (string.IsNullOrWhiteSpace(searchEntity.ShouCangStatus) || (searchEntity.ShouCangStatus == "A" && hhh.Id !=null) || (searchEntity.ShouCangStatus != "A" && hhh.Id == null))
      //&& (string.IsNullOrWhiteSpace(searchEntity.ShouCangStatus) || (searchEntity.ShouCangStatus == "A" && hhh.Id !=null) || (searchEntity.ShouCangStatus != "A" && hhh.Id == null))
                         select new LiaotianDTO
                         {
                             Id = a.Id,
@@ -174,7 +183,7 @@
                searchEntity.totalrows = query.Count();
            var lianlist = query.Skip((searchEntity.page - 1) * searchEntity.rows).Take(searchEntity.rows).ToList();
            //list = _mapper.Map<List<LiaotianDTO>>(lianlist);
            data.LoadData(searchEntity, query);
            data.LoadData(searchEntity, lianlist);
            return data;
        }
zhengcaioa/Services/ProjectService.cs
@@ -333,6 +333,16 @@
                    sql.Append(" and exists ( select b.[ProjectId] from [Projectzhongbiao] b  where  a.[Id]=b.[ProjectId] and  (b.[defen]-a.[drhx_defen])  <= " + aaaa + " ) ");
                }
            }
            if (!string.IsNullOrWhiteSpace(searchEntity.Baojiachaxiaoyu))
            {
                decimal aaaa = 0;
                decimal.TryParse(searchEntity.Baojiachaxiaoyu, out aaaa);
                if (aaaa > 0)
                {
                    sql.Append(" and exists ( select b.[ProjectId] from [Projectzhongbiao] b  where  a.[Id]=b.[ProjectId] and  (convert(numeric(10,2),b.[price] )-convert(numeric(10,2),a.[drhx_price] ))  <= " + aaaa + " ) ");
                }
            }
            if (!string.IsNullOrWhiteSpace(searchEntity.Fenchadayu))
            {
zhengcaioa/zhengcaioa/Controllers/Customer/IntentionCustomerController.cs
@@ -30,9 +30,11 @@
        private readonly ICooperatecustomCustomerService _cooperatecustomCustomerService;
        private readonly IMapper _mapper;
        private readonly IHrDeptService _hrDeptService;
        private readonly IPltPageService _pltPageService;
        public IntentionCustomerController(ILogger<IntentionCustomerController> logger, IProjectService projectService, ILiaotianService liaotianService, IIntentionCustomerService intentionCustomerService, IUserService userService, ICooperatecustomCustomerService cooperatecustomCustomerService, IMapper mapper, IHrDeptService hrDeptService)
        public IntentionCustomerController(ILogger<IntentionCustomerController> logger, IProjectService projectService, ILiaotianService liaotianService, IIntentionCustomerService intentionCustomerService, IUserService userService
            , ICooperatecustomCustomerService cooperatecustomCustomerService, IMapper mapper, IHrDeptService hrDeptService, IPltPageService pltPageService)
        {
            _logger = logger;
            _projectService = projectService;
@@ -42,6 +44,7 @@
            _cooperatecustomCustomerService = cooperatecustomCustomerService;
            _mapper = mapper;
            _hrDeptService = hrDeptService;
            _pltPageService = pltPageService;
        }
        public IActionResult Index()
@@ -141,18 +144,28 @@
            var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
            ViewData["curentuser"] = curentuser;
            List<ActionEntity> actionlist = new List<ActionEntity>();
            List<PageEntity> pageEntities = _pltPageService.GetUserPage(curentuser.Id, "/IntentionCustomer/IndexYiXiang/");
            foreach(var pageEntity in pageEntities)
            {
            ActionEntity actionEntity = new ActionEntity();
            actionEntity.OpenType = 0;
                actionEntity.OpenType = pageEntity.OpenType;
            actionEntity.ActionUrl = "";
            actionEntity.ActionFun = "Search";
            actionEntity.PageIco = "fa fa-search";
            actionEntity.ActionName = "查询";
                actionEntity.ActionFun = pageEntity.PageShortcut;
                actionEntity.PageIco = pageEntity.PageIco;
                actionEntity.ActionName = pageEntity.PageName;
            actionlist.Add(actionEntity);
            }
            ViewData["ActionInfo"] = actionlist;
            ViewBag.khly = _liaotianService.GetSYScode("IntentionCustomer", "khly").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
            ViewBag.ywjl = _userService.GetList().Where(x => x.IsYwjl == "A").Select(x => new { code = x.Id, label = x.UserName }).ToList();
@@ -168,6 +181,38 @@
            //ViewBag.ShengDropDown = _projectService.Getsheng().Select(x => new { code = x.CodeId, label = x.Name }).ToList();
            return View();
        }
        /// <summary>
        /// è§£ç»‘
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        [HttpPost]
        public JsonResult UnBind(string id)
        {
            var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
            ResultEntity resultEntity = new ResultEntity();
            using (TransactionScope scope = new TransactionScope())
            {
                string[] ids = id.Split(',');
                foreach (var iddd in ids)
                {
                    var intentionCustomerDTO = _intentionCustomerService.Get(iddd);
                    intentionCustomerDTO.Yixiang = null;
                    intentionCustomerDTO.Yixiangtime = null;
                    resultEntity =  _intentionCustomerService.save(intentionCustomerDTO);
                    if (!resultEntity.Result)
                    {
                        return new JsonResult(resultEntity);
                    }
                }
                scope.Complete();
            }
            return new JsonResult(resultEntity);
        }
        public IActionResult Edit(string id = null,string namecus = null)
@@ -321,11 +366,11 @@
                    for (int i = 0; i < result.Count; i++)
                    {
                        //resultEntity = _intentionCustomerService.ModifyStatus(result[i].Id, curentuser.Id);
                        //if (!resultEntity.Result)
                        //{
                        //    return new JsonResult(resultEntity);
                        //}
                        resultEntity = _intentionCustomerService.ModifyStatus(result[i].Id, curentuser.Id);
                        if (!resultEntity.Result)
                        {
                            return new JsonResult(resultEntity);
                        }
                        var dto = _mapper.Map<CooperatecustomCustomerDTO>(result[i]);
                        dto.Id = "";
zhengcaioa/zhengcaioa/Controllers/Customer/IntentionVisitController.cs
@@ -113,6 +113,17 @@
                if (!string.IsNullOrWhiteSpace(Viscustomer))
                {
                    dto.Viscustomer = Viscustomer;
                    IntentionVisitDTOSearch searchEntity = new IntentionVisitDTOSearch();
                    searchEntity.page = 1;
                    searchEntity.rows = 1000;
                    searchEntity.Viscustomer = Viscustomer;
                   var resultDataEntity =  _intentionVisitService.SearchByPaging(searchEntity);
                    ViewData["visitlishi"] = resultDataEntity.DataList;
                }
                else
                {
                    ViewData["visitlishi"] = new List<IntentionVisitDTO>();
                }
                dto.VisType = "01";
zhengcaioa/zhengcaioa/Controllers/Expert/ExpertController.cs
@@ -11,6 +11,7 @@
using zhengcaioa.IService;
using System.IO;
using Microsoft.Extensions.Configuration;
using System.Transactions;
namespace zhengcaioa.Controllers.Expert
{
@@ -22,13 +23,22 @@
        private readonly ILiaotianService _liaotianService;
        private readonly IProjectService _projectService;
        private readonly IUserService _userService;
        public ExpertController(ILogger<ExpertController> logger, IExpertService expertService, IProjectService projectService, ILiaotianService liaotianService, IUserService userService)
        private readonly IFiSubjectService _ifiSubjectService;
        private readonly ICooperOrderService _cooperOrderService;
        private readonly IFiAccountService _fiAccountService;
        private readonly IFiAccountRecordService _iFiAccountRecordService;
        public ExpertController(ILogger<ExpertController> logger, IExpertService expertService, IProjectService projectService, ILiaotianService liaotianService, IUserService userService
            , IFiSubjectService ifiSubjectService, ICooperOrderService cooperOrderService, IFiAccountService fiAccountService, IFiAccountRecordService iFiAccountRecordService)
        {
            _logger = logger;
            _expertService = expertService;
            _projectService = projectService;
            _liaotianService = liaotianService;
            _userService = userService;
            _ifiSubjectService = ifiSubjectService;
            _cooperOrderService = cooperOrderService;
            _fiAccountService = fiAccountService;
            _iFiAccountRecordService = iFiAccountRecordService;
        }
        [CheckLogin]
        public IActionResult Index()
@@ -317,7 +327,7 @@
            ViewBag.HuifangStatus = _liaotianService.GetSYScode("CooperOrder", "huifang_status").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
            ViewBag.PingjiaStatus = _liaotianService.GetSYScode("CooperOrder", "pingjia_status").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
            ViewBag.Expert = _expertService.GetList().Select(x => new { code = x.Id, label = x.Name }).ToList();
            return View();
        }
        [CheckLogin]
@@ -344,6 +354,7 @@
            {
                data.Creater = curentuser.Id;
                data.Createtime = DateTime.Now;
                data.sort = "D";
            }
            data.Modifier = curentuser.Id;
            data.Modifytime = DateTime.Now;
@@ -356,9 +367,174 @@
        #region ä¸“家费用结算
        [CheckLogin]
        public IActionResult ExpertFeiyong()
        {
            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 = "Jiesuan";
            actionEntity1.PageIco = "fa fa-plus-square";
            actionEntity1.ActionName = "结算";
            actionlist.Add(actionEntity1);
            ViewData["ActionInfo"] = actionlist;
            ViewBag.Expert = _expertService.GetList().Select(x => new { code = x.Id, label = x.Name }).ToList();
            ViewBag.shifou = _liaotianService.GetSYScode("system", "shifou").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
            return View();
        }
        [CheckLogin]
        public string GetJiesuanList(ExpertOrderDipatchDTOSearch search)
        {
            return JsonConvert.SerializeObject(_expertService.SearchJiesuan(search));
        }
        public IActionResult EditJiesuan(string id)
        {
            var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
            ViewData["curentuser"] = curentuser;
            decimal Money = 0;
            FiOrderrecievemoneyDTO dto = new FiOrderrecievemoneyDTO();
            if (!String.IsNullOrEmpty(id))
            {
                string[] ids = id.Split(',');
                foreach(var iddd in ids)
                {
                   var expertOrderDipatchDTO =  _expertService.GetDispatch(iddd);
                    if(expertOrderDipatchDTO.sort != "A")
                    {
                        Money += expertOrderDipatchDTO.Money.Value;
                    }
                }
            }
            dto.PayTime = DateTime.Now;
            dto.Id = id;
            dto.Money = Money;
            ViewData.Model = dto;
            ViewBag.PayType = _liaotianService.GetSYScode("fi_account", "accounttype");
            ViewBag.accounttype = _liaotianService.GetSYScode("fi_account", "accounttype");
            ViewBag.FiSubject = _ifiSubjectService.GetList().Where(x => x.Subjecttype == "02").ToList();
       
            ViewData.Model = dto;
            return View();
        }
        /// <summary>
        /// ä¿å­˜
        /// </summary>
        /// <param name="data">岗位实体类对象</param>
        /// <returns></returns>
        ///
        [HttpPost]
        public IActionResult SaveJiesuan(FiOrderrecievemoneyDTO data)
        {
            ResultEntity resultEntity = new ResultEntity();
            var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
            ViewData["curentuser"] = curentuser;
            using (TransactionScope scope = new TransactionScope())
            {
                string[] ids = data.Id.Split(',');
                foreach (var iddd in ids)
                {
                    var expertOrderDipatchDTO = _expertService.GetDispatch(iddd);
                    if(expertOrderDipatchDTO.sort == "A")
                    {
                        resultEntity.Result = false;
                        resultEntity.Message = "存在已经结算的订单";
                        return new JsonResult(resultEntity);
                    }
                    expertOrderDipatchDTO.sort = "A";
                    expertOrderDipatchDTO.Modifier = curentuser.Id;
                    expertOrderDipatchDTO.Modifytime = DateTime.Now;
                    resultEntity = _expertService.SaveDispatch(expertOrderDipatchDTO);
                    if (!resultEntity.Result)
                    {
                        return new JsonResult(resultEntity);
                    }
                    var expertDTO  =  _expertService.Get(expertOrderDipatchDTO.ExpertId);
                   var orderDTO = _cooperOrderService.Get(expertOrderDipatchDTO.OrderId);
                    //插入支出记录
                    FiAccountRecordDTO data1 = new FiAccountRecordDTO();
                    data1.RecStatus = "A";
                    data1.Creater = curentuser.Id;
                    data1.Createtime = data.PayTime;
                    data1.Modifier = curentuser.Id;
                    data1.Modifytime = data.PayTime;
                    data1.SubjectId = data.SubjectId;
                    data1.AccountId = data.AccountId;
                    data1.Money = expertOrderDipatchDTO.Money;
                    data1.PaymentUnit = expertDTO.Name;
                    data1.OperationalMatters = expertDTO.Name +"  " +orderDTO.OrderNo+ "结算费用" ;
                    FiAccountDTO firmAccount = _fiAccountService.Get(data1.AccountId);
                    data1.RecordTypeId = "2";//收入
                    data1.Department = "";
                    firmAccount.AllExpenses = (firmAccount.AllExpenses ?? 0) + data1.Money;
                    firmAccount.Balance = (firmAccount.Balance ?? 0) - data1.Money;
                    data1.AccountMoney = firmAccount.Balance;
                    resultEntity = _iFiAccountRecordService.save(data1);
                    if (!resultEntity.Result)
                    {
                        return new JsonResult(resultEntity);
                    }
                    resultEntity = _fiAccountService.save(firmAccount);
                    if (!resultEntity.Result)
                    {
                        return new JsonResult(resultEntity);
                    }
                }
                scope.Complete();
            }
            return new JsonResult(resultEntity);
        }
        #endregion
    }
}
zhengcaioa/zhengcaioa/Controllers/Finance/FiOrderrecievemoneyController.cs
@@ -180,11 +180,13 @@
                data1.RecordTypeId = "1";//收入
                data1.Department = "";
                resultEntity = _iFiAccountRecordService.save(data1);
                firmAccount.AllIncome = (firmAccount.AllIncome ?? 0) + data1.Money;
                firmAccount.Balance = (firmAccount.Balance ?? 0) + data1.Money;
                data1.AccountMoney = firmAccount.Balance;
                resultEntity = _iFiAccountRecordService.save(data1);
                resultEntity = _fiAccountService.save(firmAccount);
                scope.Complete();
            }
zhengcaioa/zhengcaioa/Properties/PublishProfiles/FolderProfile.pubxml.user
Diff too large
zhengcaioa/zhengcaioa/Views/Expert/Dispatch.cshtml
@@ -163,7 +163,7 @@
        var imgLoad = new Object();
        $("#ExpertId").chosen();
        // ä¿å­˜å²—位信息
zhengcaioa/zhengcaioa/Views/Expert/EditJiesuan.cshtml
New file
@@ -0,0 +1,361 @@
@model DTO.FiOrderrecievemoneyDTO
@using DTO;
@using zhengcaioa.Models;
@{
    List<SysCodeDtl> PayType = ViewData["PayType"] as List<SysCodeDtl>; //付款类型
    List<FiSubjectDTO> FiSubject = ViewData["FiSubject"] as List<FiSubjectDTO>; //科目
    List<SysCodeDtl> accounttype = ViewData["accounttype"] 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 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="Money" id="Money" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="number" value="@Model.Money.ToString("F2")"  readonly="readonly">
                                    </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="PayType" class="form-control" name="PayType" data-placeholder="选择 åºåˆ— ...">
                                            @foreach (var item in PayType)
                                            {
                                                @if (!item.CodeSn.Equals(Model.PayType))
                                                {
                                                    <option value="@item.CodeSn" hassubinfo="true">
                                                        @item.Comments
                                                    </option>
                                                }
                                                else
                                                {
                                                    <option value="@item.CodeSn" hassubinfo="true" selected="selected">
                                                        @item.Comments
                                                    </option>
                                                }
                                            }
                                            }
                                        </select>
                                    </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="PayTime" class="form-control" label="收款日期" name="PayTime" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="text" value="@Model.PayTime.ToString("yyyy/MM/dd")" readonly="readonly">
                                        <input type="hidden" id="Id" name="Id" value="@Model.Id" />
                                    </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">账户名称<i class="red">*</i></label>
                                    <div class="col-sm-2 col-md-2" grouptype="Vdata">
                                        <select id="AccountId" class="form-control" name="AccountId" data-placeholder="选择 åºåˆ— ...">
                                            <option value="" hassubinfo="true">请选择</option>
                                        </select>
                                    </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">
                                        <select id="SubjectId" class="form-control" name="SubjectId" data-placeholder="选择 åºåˆ— ...">
                                            <option value="" hassubinfo="true">请选择</option>
                                            @foreach (var item in FiSubject)
                                            {
                                                @if (!item.Id.Equals(Model.SubjectId))
                                                {
                                                    <option value="@item.Id" hassubinfo="true">
                                                        @item.Subjectname
                                                    </option>
                                                }
                                                else
                                                {
                                                    <option value="@item.Id" hassubinfo="true" selected="selected">
                                                        @item.Subjectname
                                                    </option>
                                                }
                                            }
                                            }
                                        </select>
                                    </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"
        };
        laydate({ elem: "#PayTime", format: 'YYYY/MM/DD', istime: true, event: "focus" });
        // ä¿å­˜å²—位信息
        var savePosition = function () {
            if ($("#Money").val() == '') {
                toastr.warning("收款金额不能为空");
                return;
            }
            if ($("#PayType").val() == '') {
                toastr.warning("收款方式不能为空");
                return;
            }
            if ($("#PayTime").val() == '') {
                toastr.warning("收款日期不能为空");
                return;
            }
            if ($("#AccountId").val() == '') {
                toastr.warning("收款账户不能为空");
                return;
            }
            if ($("#SubjectId").val() == '') {
                toastr.warning("收款科目不能为空");
                return;
            }
            if (parseFloat($("#Money").val()) <= 0) {
                toastr.warning("收款金额不能小于0");
                return;
            }
            //var data = { id: $("#Id").val(), StartTime:$("#StartTime").val(), Sheng: $("#Sheng").val(), job_level: $("#Job_level").val().toString(), ExistsAttachment: fileId != "" }
            $.ajax({
                type: "POST",
                url: "/Expert/SaveJiesuan",
                dataType: "json",
                global: false,
                data: $('form').serializeArray(),
                success: function (data) {
                        if (data.Result) {
                            //  parent._afterSave(true);
                            parent.layer.msg('成功保存', { icon: 6 });
                            //window.location = "/Project/add?id=" + data.ReturnID;
                            try {
                                _pageAutoClose();//自动关闭页面方法
                            }
                            catch (err) {
                                parent._CloseTab1("/Expert/EditJiesuan/");
                            }
                        }
                        else {
                            // toastr.error("失败");
                            parent.layer.msg(data.Message, { icon: 5 });
                        }
                },
                error: function () {
                    parent.layer.msg('失败', { icon: 5 });
                }
            });
        }
        $("#PayType").change(function () {
            var PayType = $("#PayType").val();
            $.ajax({
                type: "GET",
                url: "/FiAccountIncome/getAccount?Accounttype=" + PayType,
                dataType: "json",
                global: false,
                data: "",
                success: function (data) {
                    var city = $("#AccountId");
                    city.find('option').remove();
                    var aaa = '<option value="" hassubinfo="true">请选择</option>';
                    city.append(aaa);
                    if (data.length > 0) {
                        for (var i = 0; i < data.length; i++) {
                            var o = '<option value="' + data[i].Id + '" hassubinfo="true">' + data[i].Accountname + '</option>';
                            city.append(o);
                        }
                    }
                },
                error: function () {
                    parent.layer.msg('失败', { icon: 5 });
                }
            });
        });
        $("#PayType").trigger("change");
        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/Expert/ExpertFeiyong.cshtml
New file
@@ -0,0 +1,106 @@
@{
    ViewBag.Title = "CooperOrder";
    Layout = "~/Views/Shared/_Layout_Search.cshtml";
}
@section headerStyle{
    <script type="text/javascript">
        var Expert = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.Expert))';
        var shifou = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.shifou))';
        gridConfig = { multiselect: true, selectcol: "Id" };
        //var Dispatch = [{ code: "1", label: "是" }, { code: "0", label: "否" }];
        //loseherght = 60;
        dataCol = [
            { label: 'id', name: 'Id', labtype: 'txt', hidden: true },
            { label: '派单时间', name: 'CreatetimeName', labtype: 'txt', hidden: false, width: 100 },
            {
                label: '订单号', name: 'OrderNo', labtype: 'txt', hidden: false, width: 100 ,
                //formatter: function (cellvalue, options, rowObject) {
                //    return "<a onclick=\"OpenWindow('" + cellvalue.replace(/'/g, '') + "','98%','100%', '/CooperOrder/Edit?id=" + rowObject.Id + "')\"  >" + cellvalue + "</a>";
                //}
            },
            { label: '订单类别', name: 'OrderTypeName', labtype: 'txt', hidden: false, width: 100  },
            { label: '客户名称', name: 'KhdwName', labtype: 'txt', hidden: false, width: 100 },
            { label: '收货地址', name: 'ShrAddress', labtype: 'txt', hidden: false, width: 200 },
            { label: '联系人', name: 'Shr', labtype: 'txt', hidden: false, width: 100 },
            { label: '联系电话', name: 'ShrTel', labtype: 'txt', hidden: false, width: 100 },
            //{ label: '业务经理', name: 'Youhui', labtype: 'txt', hidden: false, width: 100 },
            {
                label: '派工专家', ExpertId: 'id', labtype: 'txt', hidden: false, width: 100,
                formatter: function (cellvalue, options, rowObject) {
                        return rowObject.ExpertName;
                }
            },
            { label: '劳务费(元)', name: 'Money', labtype: 'txt', hidden: false, width: 100 },
            { label: '是否结算', name: 'sort', labtype: 'txt', hidden: false, width: 100 },
        ];
        dataUrl = "/Expert/GetJiesuanList";
        searchCol = [
            { label: '派单时间', name: 'PdTime', labtype: 'datearea', hidden: false, cwidth: '5%', cccwidth: '15%'},
            { label: '订单编号', name: 'OrderNo', labtype: 'txt', hidden: false, cwidth: '5%', cccwidth: '8%' },
            {
                label: '专家', name: 'ExpertId', labtype: 'combox', hidden: false, data: JSON.parse(Expert), cwidth: '5%', cccwidth: '8%'
            },
            {
                label: '是否结算', name: 'Sort', labtype: 'combox', hidden: false, data: JSON.parse(shifou), cwidth: '5%', cccwidth: '8%'
            },
        ];
        var _pageJiesuan = function () {
            var duanxin = GetGridSelect();
            var baifangid = "";
            if (duanxin != '') {
                for (var i = 0; i < duanxin.length; i++) {
                    baifangid += duanxin[i] + ','
                }
                baifangid = baifangid.substring(0, baifangid.length - 1);
            } else {
                toastr.error("请选择订单");
                return;
            }
            OpenWindow('结算', '98%', '100%', '/Expert/EditJiesuan?id=' + baifangid )    ;
            ///Expert/JiesuanOperate ? id = " + baifangid,
        }
        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/Expert/ExpertOrderDispatch.cshtml
@@ -10,6 +10,9 @@
        var Khlx = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.Khlx))';
        var HuifangStatus = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.HuifangStatus))';
        var PingjiaStatus = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.PingjiaStatus))';
        var Expert = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.Expert))';
        var Dispatch = [{ code: "1", label: "是" }, { code: "0", label: "否" }];
        loseherght = 60;
        dataCol = [
@@ -52,11 +55,15 @@
            {
                label: '是否派工', name: 'isDispatch', labtype: 'combox', hidden: false, data: Dispatch /*JSON.parse(HuifangStatus)*/, cwidth: '5%', cccwidth: '8%'
            },
            {
                label: '专家', name: 'ExpertId', labtype: 'combox', hidden: false, data: JSON.parse(Expert), cwidth: '5%', cccwidth: '8%'
            },
           
        ];
        
        function ExpertDispatch(orderid, orderNo) {
            OpenWindow("专家派工", "400px", "230px", "/Expert/Dispatch/?orderid=" + orderid);
            OpenWindow("专家派工", "400px", "600px", "/Expert/Dispatch/?orderid=" + orderid);
        }
     
       
zhengcaioa/zhengcaioa/Views/IntentionCustomer/IndexYiXiang.cshtml
@@ -12,7 +12,7 @@
        
        loseherght = 60;
        //gridConfig = { multiselect: true, selectcol: "Id" };
        gridConfig = { multiselect: true, selectcol: "Id" };
        dataCol = [
            { label: 'id', name: 'Id', labtype: 'txt', hidden: true },
            { label: '意向时间', name: 'YixiangtimeName', labtype: 'txt', hidden: false, width: 100 },
@@ -56,7 +56,76 @@
        var _pageDelete = function () {
            var duanxin = GetGridSelect();
            var baifangid = "";
            if (duanxin != '') {
                for (var i = 0; i < duanxin.length; i++) {
                    baifangid += duanxin[i] + ','
                }
                baifangid = baifangid.substring(0, baifangid.length - 1);
            } else {
                toastr.error("请选择意向订单");
                return;
            }
            // 1、打开弹出层
            var index = layer.open({
                type: 1,  //基本层类型
                icon: 0, //图标
                content: '确定要删除意向订单吗?',   //内容
                shade: 0.3,  //遮罩,如果想定义别的颜色,可以shade:[0.5,'#fff']
                shadeClose: 1,   //是否点击遮罩关闭
                skin: 'demoClass',    //样式类名
                moveType: 1, //拖拽风格,默认为0(会有个过度的透明框)
                btn: ['确定', '取消'],    //按钮
                btn1: function () { //按钮一的回调
                    layer.close(index);
                    $.ajax({
                        type: "POST",
                        url: "/IntentionCustomer/UnBind?id=" + baifangid,
                        dataType: "json",
                        global: false,
                        data: "",
                        success: function (data) {
                            if (data.Result) {
                                toastr.success("删除成功");
                                jQuery('#jqGrid').jqGrid().trigger('reloadGrid');
                            } else {
                                toastr.error("删除失败" + data.Message);
                            }
                        },
                        error: function () {
                            toastr.error("删除失败");
                        }
                    });
                },
                //                btn2:function(){    //按钮二的回调
                //
                //                }
            });
        }
zhengcaioa/zhengcaioa/Views/IntentionVisit/Edit.cshtml
@@ -15,6 +15,8 @@
    List<IntentionVisitDuanxinDTO> Duanxin = ViewData["Duanxin"] as List<IntentionVisitDuanxinDTO>; //短信
    List<IntentionVisitDTO> visitlishi = ViewData["visitlishi"] as List<IntentionVisitDTO>; //意向客户
}
@{
    Layout = null;
@@ -67,6 +69,24 @@
            padding-right: 0px;
            font-weight: 400;
        }
        table {
            border-collapse: collapse;
            border: none;
            width: 900px;
            margin-left: 0px;
            text-align: center;
        }
        td {
            border: solid #000000 1px;
            height: 30px;
        }
    </style>
    <!-- jqgrid-->
@@ -332,7 +352,48 @@
                                </div>
                                <div class="clearfix layer-area" style="padding-bottom:15px;">
                                    @if (visitlishi.Count > 0)
                                    {
                                        <table class="col-sm-12 col-md-12">
                                            @{
                                                int i = 1;
                                            }
                                            <tr>
                                                <td style="width:4%;">  ç¼–号</td>
                                                <td style="width:7%;"> æ‹œè®¿æ—¶é—´</td>
                                                <td style="width:14%;"> å®¢æˆ·å•位</td>
                                                <td style="width:7%;"> æ‹œè®¿æ–¹å¼</td>
                                                <td style="width:7%;"> æŽ¥å¾…人</td>
                                                <td style="width:7%;"> èŒåŠ¡</td>
                                                <td style="width:14%;"> äº¤è°ˆç±»å®¹</td>
                                                <td style="width:14%;"> å®¢æˆ·åé¦ˆ</td>
                                                <td style="width:7%;"> æˆäº¤æ„å‘</td>
                                                <td style="width:7%;"> è·Ÿè¸ªå»ºè®®</td>
                                                <td style="width:7%;"> è®¿é—®äºº</td>
                                            </tr>
                                            @foreach (var visitDTO in visitlishi)
                                            {
                                                <tr>
                                                    <td>  @i</td>
                                                    <td>   @visitDTO.VistimeName</td>
                                                    <td>   @visitDTO.Name</td>
                                                    <td>   @visitDTO.VisTypeName</td>
                                                    <td>   @visitDTO.Jdr</td>
                                                    <td>   @visitDTO.ZwName</td>
                                                    <td>   @visitDTO.Talk</td>
                                                    <td>   @visitDTO.Khfk</td>
                                                    <td>   @visitDTO.YxName</td>
                                                    <td>   @visitDTO.JyName</td>
                                                    <td>   @visitDTO.CreaterName</td>
                                                </tr>
                                                i++;
                                            }
                                        </table>
                                    }
                                </div>
                            </div>
                            </div>
@@ -353,6 +414,8 @@
            </div>
        </div>
    </form>
    <script type="text/javascript">
zhengcaioa/zhengcaioa/Views/Liaotian/Edit.cshtml
@@ -175,7 +175,7 @@
                                    </div>
                                    <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">
                                    @*<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">
@@ -189,7 +189,7 @@
                                        }
                                        <input type="hidden" id="ShouCangStatus" name="ShouCangStatus" value="" />
                                    </div>
                                    </div>*@
                                    
                                </div>
                                <div class="clearfix layer-area" style="padding-bottom:15px;">
zhengcaioa/zhengcaioa/Views/Liaotian/Indexcheck.cshtml
@@ -65,7 +65,7 @@
            { label: '录入时间', name: 'Createtime', labtype: 'datearea', hidden: false },
            { label: '录入人', name: 'Creater', labtype: 'combox', hidden: false, data: JSON.parse(Creater), cwidth: '5%', cccwidth: '8%' },
            { label: '是否出书', name: 'ChushuStatus', labtype: 'combox', hidden: false, data: JSON.parse(shifou), cwidth: '5%', cccwidth: '8%' },
            { label: '是否收藏', name: 'ShouCangStatus', labtype: 'combox', hidden: false, data: JSON.parse(shifou), cwidth: '5%', cccwidth: '8%' },
            //{ label: '是否收藏', name: 'ShouCangStatus', labtype: 'combox', hidden: false, data: JSON.parse(shifou), cwidth: '5%', cccwidth: '8%' },
        ];
        var _pageAdd = function () {
            OpenWindow("新增问题", "98%", "90%", "/Liaotian/Edit/");
@@ -192,29 +192,39 @@
       
        function sendHuidaStatus() {
        //function sendHuidaStatus() {
            var msg = $("#PBSShifoushenhe");
        //    var msg = $("#PBSShifoushenhe");
            if (msg.length > 0) {
        //    if (msg.length > 0) {
        //        $("#PBSShifoushenhe").val("D");
        //        $("#PBSShifoushenhe").trigger('chosen:updated');//更新选项
        //        //_pageSearch();
        //    } else {
        //        setTimeout(sendHuidaStatus, 1000);
        //    }
        //}
        //sendHuidaStatus();
        send();
        $(document).ready(function () {
            setTimeout(
                function () {
                $("#PBSShifoushenhe").val("D");
                $("#PBSShifoushenhe").trigger('chosen:updated');//更新选项
                _pageSearch();
            } else {
                setTimeout(sendHuidaStatus, 1000);
            }
        }
        send();
        sendHuidaStatus();
                }, 2000);
       
        });
       
zhengcaioa/zhengcaioa/Views/Project/Select.cshtml
@@ -111,6 +111,9 @@
            { label: '分差小于', name: 'Fencha', labtype: 'txt', hidden: false/*, cwidth: '8.5%', cccwidth: '15%' */ },
            { label: '分差大于', name: 'Fenchadayu', labtype: 'txt', hidden: false/*, cwidth: '8.5%', cccwidth: '15%' */ },
            { label: '供应商数量', name: 'Shuliang', labtype: 'txt', hidden: false/*, cwidth: '8.5%', cccwidth: '15%' */ },
            //{ label: '价差小于', name: 'Baojiachaxiaoyu', labtype: 'txt', hidden: false/*, cwidth: '8.5%', cccwidth: '15%' */ },
        ];
        var _pageAdd = function () {
zhengcaioa/zhengcaioa/Views/Shared/_Layout_Header.cshtml
@@ -72,7 +72,7 @@
                    </a>
                </li>
                <li class="hidden-xs">
                    <a href="http://47.108.235.38:8082/admin/login.aspx?user=test&pwd=123456" target="_blank" class="J_menuItem" title="商城后台跳转" data-index="0">
                    <a href="http://47.108.235.38:8082/admin/login.aspx?user=@actionlist.UserSn&pwd=@actionlist.Password&username=@actionlist.UserName" target="_blank" class="J_menuItem" title="商城后台跳转" data-index="0">
                        <i class="fa fa-lock"></i>商城后台跳转
                    </a>
                </li>
±íÐÞ¸Ä.sql
@@ -1,6 +1,71 @@
USE [zhengcaioa]
GO
ALTER TABLE [dbo].[CooperatecustomCustomer] ADD  [huiyuanId] [nvarchar](50) NULL
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'会员Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CooperatecustomCustomer', @level2type=N'COLUMN',@level2name=N'huiyuanId'
GO
USE [zhengcaioa]
GO
ALTER TABLE [dbo].[CooperOrder] ADD  [songhuo_gongsi] [nvarchar](100) NULL
GO
ALTER TABLE [dbo].[CooperOrder] ADD  [songhuo_danhao] [nvarchar](100) NULL