username@email.com
2022-11-11 4deba85ff3417a76b4cfef1874effa6a2be1fd40
撤单退款修改
2个文件已修改
39 ■■■■ 已修改文件
zhengcaioa/zhengcaioa/Controllers/BusinessOrder/CooperOrderController.cs 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/CooperOrder/Chedan.cshtml 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Controllers/BusinessOrder/CooperOrderController.cs
@@ -1338,8 +1338,9 @@
        {
            var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User"));
            ViewData["curentuser"] = curentuser;
            var cooperOrderDTO = _cooperOrderService.Get(id);
            ViewData["Chedanid"] = id;
            ViewData["Money"] = cooperOrderDTO.Money.Value.ToString();
            return View();
@@ -1420,8 +1421,8 @@
                if (fiAccountRecordDTOs!= null && fiAccountRecordDTOs.Count > 0)
                {
                    var sysCodeDtls = _liaotianService.GetSYScode("CooperVisit", "jtype");
                    foreach (var fiAccountRecordDTO in fiAccountRecordDTOs)
                    {
                    //foreach (var fiAccountRecordDTO in fiAccountRecordDTOs)
                    //{
                       
                        CooperatecustomCustomerDTO cooperatecustomCustomerDTO = _cooperatecustomCustomerService.Get(dto.Khdw);
                        FiAccountRecordDTO data1 = new FiAccountRecordDTO();
@@ -1430,10 +1431,10 @@
                        data1.Createtime = DateTime.Now;
                        data1.Modifier = curentuser.Id;
                        data1.Modifytime = DateTime.Now;
                        data1.SubjectId = fiAccountRecordDTO.SubjectId;
                        data1.SubjectId = fiAccountRecordDTOs[0].SubjectId;
                        data1.AccountId = fiAccountRecordDTO.AccountId;
                        data1.Money = -fiAccountRecordDTO.Money;
                        data1.AccountId = fiAccountRecordDTOs[0].AccountId;
                        data1.Money = Price;
                        data1.PaymentUnit = cooperatecustomCustomerDTO.Name;
                        var ssss = sysCodeDtls.Where(x => x.CodeSn == dto.OrderType).FirstOrDefault();
                        if (ssss!=null)
@@ -1457,18 +1458,18 @@
                        FiAccountDTO firmAccount = _fiAccountService.Get(data1.AccountId);
                        data1.RecordTypeId = "1";//退款
                        data1.RecordTypeId = "2";//退款
                        data1.Department = "";
                        firmAccount.AllIncome = (firmAccount.AllIncome ?? 0) - fiAccountRecordDTO.Money;
                        firmAccount.Balance = (firmAccount.Balance ?? 0) - fiAccountRecordDTO.Money;
                        firmAccount.AllIncome = (firmAccount.AllIncome ?? 0) - Price;
                        firmAccount.Balance = (firmAccount.Balance ?? 0) - Price;
                        data1.AccountMoney = firmAccount.Balance;
                        resultEntity = _iFiAccountRecordService.save(data1);
                        resultEntity = _fiAccountService.save(firmAccount);
                    }
                    //}
                }
                scope.Complete();
            }
zhengcaioa/zhengcaioa/Views/CooperOrder/Chedan.cshtml
@@ -3,7 +3,7 @@
@using zhengcaioa.Models;
@{
    string Chedanid = ViewData["Chedanid"] as string; //拜访方式
    string Money = ViewData["Money"] as string; //拜访方式
}
@{
@@ -99,16 +99,16 @@
                                @*<div class="clearfix layer-area" style="padding-bottom:15px;">
                                <div class="clearfix layer-area" style="padding-bottom:15px;">
                                    
                                    <div class="col-sm-12 col-md-12">
                                        <input class="form-control" label="客户名称" name="Price" id="Price" labtype="txt" addvisible="true"   editvisible="true" reg="" ismust="true" type="number" value="" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">
                                        <input class="form-control" label="客户名称" name="Price" id="Price" labtype="txt" addvisible="true"   editvisible="true" reg="" ismust="true" type="number" value="@Money" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">
                                    </div>
                                </div>*@
                                </div>
                                <input type="hidden"  name="Price" id="Price" value="0" />
                                @*<input type="hidden"  name="Price" id="Price" value="0" />*@
@@ -163,10 +163,10 @@
            //if ($.trim($("#Price").val()) == '') {
            //    toastr.warning("撤单退还金额不能为空");
            //    return;
            //}
            if ($.trim($("#Price").val()) == '') {
                toastr.warning("撤单退还金额不能为空");
                return;
            }