コード例 #1
0
        public ActionResult EditProviderName(string BillNos, string Name)
        {
            var list = BillNos.ToUpper().Replace(",", "").Replace(",", "").Replace(" ", "").Replace("/", "").Replace("F", ",F").Replace("J", ",J").Replace("H", ",H").Split(',').ToList();

            list.Remove("");

            string str = string.Empty;

            foreach (var item in list)
            {
                var Notice_BLL = new NoticeBill();
                if (item.Contains("FT"))
                {
                    var Model = Notice_BLL.GetBillModel(item);
                    Model.ProviderInfo.ProviderName = Name.Replace(" ", "");
                    Dictionary <string, ProviderInfo> dic = new Dictionary <string, ProviderInfo>();
                    dic.Add("ProviderInfo", Model.ProviderInfo);

                    var result = Notice_BLL.PublicEditMethod <ProviderInfo>(item, dic);
                    if (string.IsNullOrEmpty(result))
                    {
                        str += "单号" + item + ",";
                    }
                }
            }

            if (!string.IsNullOrEmpty(str))
            {
                str += "未修改成功";
            }

            return(Json(new { Msg = str, Status = "success" }, JsonRequestBehavior.AllowGet));
        }
コード例 #2
0
        public ActionResult NoticeBill(string BillNo = null, string Mode = null, string IsCopy = null)
        {
            NoticeBill             NB_Bl     = new NoticeBill();
            List <NoticeBillModel> modellist = NB_Bl.FindSuitableData("良");
            FeeBillModelRef        model     = new FeeBillModelRef();

            if (!string.IsNullOrEmpty(BillNo))
            {
                //草稿箱功能(暂时还没有)
                if (BillNo.Contains("CK"))
                {
                    //暂时没处理
                }
                //编辑功能
                else if (BillNo.Contains("FT"))
                {
                    NoticeBillModel NoticeModel = NB_Bl.GetBillModel(BillNo);
                    model.ModelString     = Public.JsonSerializeHelper.SerializeToJson(NoticeModel);
                    model.BillNo          = NoticeModel.BillNo;
                    model.PersonInfo      = NoticeModel.PersonInfo;
                    model.Owner           = NoticeModel.Owner;
                    model.WorkNumber      = NoticeModel.WorkNumber;
                    model.Remark          = NoticeModel.Remark;
                    model.TransactionDate = NoticeModel.TransactionDate;
                    if (!string.IsNullOrEmpty(IsCopy))
                    {
                        model.IsCopy = 1;

                        //复制即累加次数
                        Dictionary <string, string> dic = new Dictionary <string, string>();
                        dic.Add("CopyCount", (model.CopyCount + 1).ToString());
                        var status = NB_Bl.PublicEditMethod(model.BillNo, dic);
                    }
                }
            }
            model.PageName   = "Notice";
            model.CommitType = CommitType.付款通知书;
            return(View(model));
        }
コード例 #3
0
        public string EditPrividerInfo(string billno, string name, string bankname, string bankcode, string swift, string iban, string num, string providercode, string companycode)
        {
            string error = string.Empty;
            string msg   = string.Empty;

            if (string.IsNullOrEmpty(name) || string.IsNullOrEmpty(bankname) || string.IsNullOrEmpty(bankcode))
            {
                error = "1";
                msg   = "供应商信息缺失";
                return(Public.JsonSerializeHelper.SerializeToJson(new { error = error, msg = msg }));
            }

            if (string.IsNullOrEmpty(num))
            {
                var grade = GetSubjectCode(name);
                //只有外汇可以没有联行号
                if (grade != 3)
                {
                    error = "1";
                    msg   = "支行数据错误";
                    return(Public.JsonSerializeHelper.SerializeToJson(new { error = error, msg = msg }));
                }
            }


            billno = billno.ToUpper().Replace(",", "").Replace(" ", "").Replace("/", "").Replace("F", ",F").Replace("J", ",J").Replace("H", ",H");
            var list = billno.Split(',').ToList();

            var FT = new NoticeBill();

            ProviderInfo provider = new ProviderInfo();

            provider.ProviderName      = name;
            provider.BankName          = bankname;
            provider.BankNo            = bankcode;
            provider.CompanyCode       = companycode;
            provider.IBAN              = iban;
            provider.BankCode          = swift;
            provider.ProviderCode      = providercode;
            provider.SubbranchBankCode = num;

            Dictionary <string, ProviderInfo> dic = new Dictionary <string, ProviderInfo>();

            dic.Add("ProviderInfo", provider);

            foreach (var item in list)
            {
                if (item.Contains("FT"))
                {
                    //通过的单不处理
                    var model = FT.GetBillModel(item);
                    if (model != null & model.ApprovalStatus != 2)
                    {
                        FT.PublicEditMethod <ProviderInfo>(item, dic);
                    }
                    else
                    {
                        msg += "单号" + item + "未做处理;";
                    }
                }
                //不处理
            }

            error = "0";
            if (string.IsNullOrEmpty(msg))
            {
                msg = "修改成功";
            }

            return(Public.JsonSerializeHelper.SerializeToJson(new { error = error, msg = msg }));
        }
コード例 #4
0
        public string GetEditPayCodeList(string BillNo)
        {
            BillNo = BillNo.ToUpper().Replace(",", "").Replace(" ", "").Replace("/", "").Replace("F", ",F").Replace("J", ",J").Replace("H", ",H");
            var list = BillNo.Split(',').ToList();

            list.Remove("");

            var FB = new FeeBill();
            var FT = new NoticeBill();
            var JS = new BorrowBill();
            var RB = new RefundBill();

            List <PublicClass> ReturnModel = new List <PublicClass>();

            foreach (var item in list)
            {
                PublicClass model = new PublicClass();
                if (item.Contains("FB"))
                {
                    var isFee = FB.GetBillModel(item);
                    if (isFee != null)
                    {
                        model.c1 = isFee.BillNo;
                        model.c2 = "费用报销单";
                        model.c3 = AjaxGetName(isFee.Creator);
                        model.c4 = isFee.Owner;
                        model.c5 = isFee.CreateTime.ToString("yyyy-mm-dd");
                        model.c6 = isFee.ApprovalTime;
                        model.c7 = ReturnPayCode(isFee.PaymentCompanyCode, isFee.PersonInfo.CostCenter, isFee.PersonInfo.IsHeadOffice);
                        model.c8 = isFee.Remark;
                    }
                    else
                    {
                        var IsRB = RB.GetBillModel(BillNo);
                        if (IsRB != null)
                        {
                            model.c1 = IsRB.BillNo;
                            model.c2 = "费用还款单";
                            model.c3 = AjaxGetName(IsRB.Creator);
                            model.c4 = IsRB.Owner;
                            model.c5 = IsRB.CreateTime.ToString("yyyy-mm-dd");
                            model.c6 = IsRB.ApprovalTime;
                            model.c7 = ReturnPayCode(IsRB.PaymentCompanyCode, IsRB.PersonInfo.CostCenter, IsRB.PersonInfo.IsHeadOffice);
                            model.c8 = IsRB.Remark;
                        }
                    }
                }
                else if (item.Contains("FT"))
                {
                    var isFT = FT.GetBillModel(BillNo);
                    if (isFT != null)
                    {
                        model.c1 = isFT.BillNo;
                        model.c2 = "付款通知书";
                        model.c3 = AjaxGetName(isFT.Creator);
                        model.c4 = isFT.Owner;
                        model.c5 = isFT.CreateTime.ToString("yyyy-mm-dd");
                        model.c6 = isFT.ApprovalTime;
                        model.c8 = isFT.Remark;
                    }
                }
                else if (item.Contains("JS"))
                {
                    var isJS = JS.GetBillModel(BillNo);
                    if (isJS != null)
                    {
                        model.c1 = isJS.BillNo;
                        model.c2 = "借款单";
                        model.c3 = AjaxGetName(isJS.Creator);
                        model.c4 = isJS.Owner;
                        model.c5 = isJS.CreateTime.ToString("yyyy-mm-dd");
                        model.c6 = isJS.ApprovalTime;
                        model.c7 = ReturnPayCode(isJS.PaymentCompanyCode, isJS.PersonInfo.CostCenter, isJS.PersonInfo.IsHeadOffice);
                        model.c8 = isJS.Remark;
                    }
                }
                if (!string.IsNullOrEmpty(model.c1))
                {
                    ReturnModel.Add(model);
                }
            }
            return(Public.JsonSerializeHelper.SerializeToJson(ReturnModel));
        }