username@email.com
2021-12-30 1854e7a1b76b9c63ab232571219642b65074c489
会员提款西要关联账户支出
3个文件已修改
175 ■■■■■ 已修改文件
zhengcaioa/DTO/AdmCustomerWithdrawalDTO.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Controllers/admin/AdmAskController.cs 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/zhengcaioa/Views/AdmAsk/CustomerWithdrawal.cshtml 121 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhengcaioa/DTO/AdmCustomerWithdrawalDTO.cs
@@ -31,5 +31,8 @@
        public string BankAcount { get; set; }
        public string BankName { get; set; }
        public string Username { get; set; }
        public string Accounttype { get; set; }
        public string AccountId { get; set; }
        public string SubjectId { get; set; }
    }
}
zhengcaioa/zhengcaioa/Controllers/admin/AdmAskController.cs
@@ -31,6 +31,10 @@
        private readonly IIntentionCustomerService _intentionCustomerService;
        private readonly IHrPositionService _hrPositionService;
        private readonly IAdmGoodsRecordService _admGoodsRecordService;
        private readonly IFiSubjectService _ifiSubjectService;
        private readonly IFiAccountService _fiAccountService;
        private readonly IFiAccountRecordService _iFiAccountRecordService;
        public AdmAskController(ILogger<AdmAskController> logger, IAskService askService, IHrDeptService hrDeptService, IWfRunProcessService wfRunProcessService
            , IWfHistoryService wfHistoryService, IWfNeeddeelService wfNeeddeelService
@@ -41,7 +45,10 @@
            , ICooperatecustomCustomerService cooperatecustomCustomerService
            , IIntentionCustomerService intentionCustomerService
            , IHrPositionService hrPositionService
            , IAdmGoodsRecordService admGoodsRecordService)
            , IAdmGoodsRecordService admGoodsRecordService
            , IFiSubjectService ifiSubjectService
            , IFiAccountService fiAccountService
            , IFiAccountRecordService iFiAccountRecordService)
        {
            _logger = logger;
            _hrDeptService = hrDeptService;
@@ -57,6 +64,9 @@
            _intentionCustomerService = intentionCustomerService;
            _hrPositionService = hrPositionService;
            _admGoodsRecordService = admGoodsRecordService;
            _ifiSubjectService = ifiSubjectService;
            _fiAccountService = fiAccountService;
            _iFiAccountRecordService = iFiAccountRecordService;
        }
        public IActionResult Askcost(string id = "")
@@ -1293,6 +1303,12 @@
            //ViewBag.CooperatecustomCustomerDTOs = 
            if (dangqianbuzhou == "财务审批")
            {
                ViewBag.accounttype = _liaotianService.GetSYScode("fi_account", "accounttype");
                ViewBag.FiSubject = _ifiSubjectService.GetList().Where(x => x.Subjecttype == "02").ToList();
            }
            ViewData.Model = dto;
            return View();
        }
@@ -1327,6 +1343,39 @@
                    }
                }
                if(data.Step == "财务审批")
                {
                    WfRunProcessDTO wfRunProcessDTO = _wfRunProcessService.GetList(data.Id, "20").FirstOrDefault();
                    FiAccountRecordDTO datafi = new FiAccountRecordDTO();
                    datafi.Creater = curentuser.Id;
                    datafi.Createtime = DateTime.Now;
                    datafi.Modifier = curentuser.Id;
                    datafi.Modifytime = DateTime.Now;
                    datafi.AccountId = data.AccountId;
                    datafi.Accounttype = data.Accounttype;
                    datafi.SubjectId = data.SubjectId;
                    datafi.Money = data.Jine;
                    if(wfRunProcessDTO!=null)
                        datafi.OperationalMatters = data.Tittle + wfRunProcessDTO.Applyno;
                    datafi.PaymentUnit = data.Username;
                    FiAccountDTO firmAccount = _fiAccountService.Get(data.AccountId);
                    datafi.RecordTypeId = "2";//支出
                                            //data.Department = "";
                    //resultEntity = _iFiAccountRecordService.save(data);
                    firmAccount.AllExpenses = (firmAccount.AllExpenses ?? 0) + datafi.Money;
                    firmAccount.Balance = (firmAccount.Balance ?? 0) - datafi.Money;
                    datafi.AccountMoney = firmAccount.Balance;
                    resultEntity = _iFiAccountRecordService.save(datafi);
                    resultEntity = _fiAccountService.save(firmAccount);
                }
                //发起流程相关
zhengcaioa/zhengcaioa/Views/AdmAsk/CustomerWithdrawal.cshtml
@@ -11,8 +11,11 @@
    List<WfHistoryDTO> lishiyijian = ViewData["lishiyijian"] as List<WfHistoryDTO>; //审批进度
    List<FiSubjectDTO> FiSubject = ViewData["FiSubject"] as List<FiSubjectDTO>; //科目
    List<SysCodeDtl> accounttype = ViewData["accounttype"] as List<SysCodeDtl>; //账户类型
}
<!DOCTYPE html>
@@ -127,6 +130,60 @@
                                    </div>
                                </div>
                                @if (dangqianbuzhou == "财务审批")
                                {
                                    <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">
                                            <select id="Accounttype" class="form-control" name="Accounttype" data-placeholder="选择 序列 ..." style="font-weight:normal;">
                                                @foreach (var item in accounttype)
                                                {
                                                        <option value="@item.CodeSn" hassubinfo="true" >
                                                            @item.Comments
                                                        </option>
                                                }
                                            </select>
                                        </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>
                                    </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="SubjectId" class="form-control" name="SubjectId" data-placeholder="选择 序列 ...">
                                                <option value="" hassubinfo="true">请选择</option>
                                                @foreach (var item in FiSubject)
                                                {
                                                        <option value="@item.Id" hassubinfo="true" >
                                                            @item.Subjectname
                                                        </option>
                                                }
                                            </select>
                                        </div>
                                    </div>
                                }
                                <div class="clearfix layer-area" style="padding-bottom:15px;" id="shenpiyijian">
                                    <label class="text-right col-sm-1 col-md-1 control-label">审批意见</label>
@@ -162,6 +219,8 @@
                                        </table>
                                    </div>
                                </div>
                                <div class="clearfix layer-area" style="padding-bottom:60px;">
                                </div>
@@ -246,6 +305,10 @@
                     $('#shenpiyijian').hide();
                 }
                 $("#Accounttype").attr('disabled', false);
                 $("#AccountId").attr('disabled', false);
                 $("#SubjectId").attr('disabled', false);
            } else {
@@ -254,7 +317,7 @@
                 if ("@sifoudangqian" == "A") {
                     $('#tongyi').hide();
                     $('#jujue').hide();
                     $(".ldate").each(function (el) {
                         laydate({
@@ -270,7 +333,7 @@
                                 // console.log("234234234234324");
                                 // end.min = datas; //开始日选好后,重置结束日的最小日期
                                 // end.start = datas //将结束日的初始值设定为开始日
                                 checktime();
                                 //checktime();
                             }
                         });
@@ -299,13 +362,28 @@
                toastr.warning("会员名称不能为空");
                return;
            }
            if ($.trim($("#Jine").val()) == '') {
                toastr.warning("提现金额不能为空");
                return;
            }
            if ("@Html.Raw(dangqianbuzhou)" == "财务审批") {
                if ($.trim($("#Accounttype").val()) == '') {
                    toastr.warning("账户类型不能为空");
                    return;
                }
                if ($.trim($("#AccountId").val()) == '') {
                    toastr.warning("账户名称不能为空");
                    return;
                }
                if ($.trim($("#SubjectId").val()) == '') {
                    toastr.warning("科目名称不能为空");
                    return;
                }
            }
            $("#Tongguojujue").val(tongyi);
@@ -356,6 +434,39 @@
            }
        }
        $("#Accounttype").change(function () {
            var Accounttype = $("#Accounttype").val();
            $.ajax({
                type: "GET",
                url: "/FiAccountIncome/getAccount?Accounttype=" + Accounttype,
                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 });
                }
            });
        });
        $("#Accounttype").trigger("change");
    </script>
</body>
</html>