| | |
| | | /// </summary> |
| | | public static readonly string DictionaryAchievementSet = "dictionaryAchievementSet"; |
| | | |
| | | /// <summary> |
| | | /// 推广费用 |
| | | /// </summary> |
| | | public static readonly string DictionaryTuiGuangFeiYong = "dictionaryTuiGuangFeiYong"; |
| | | /// <summary> |
| | | /// 业绩门槛 |
| | | /// </summary> |
| | | public static readonly string DictionaryYeJiMenKan = "dictionaryYeJiMenKan"; |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | |
| | | di.Add(SystemSettingConstVars.PointDiscountedProportion, new DictionaryKeyValues() { sKey = "订单积分折现比例", sValue = "100" }); |
| | | di.Add(SystemSettingConstVars.OrdersPointProportion, new DictionaryKeyValues() { sKey = "订单积分使用比例", sValue = "10" }); |
| | | di.Add(SystemSettingConstVars.OrdersRewardProportion, new DictionaryKeyValues() { sKey = "订单积分奖励比例", sValue = "1" }); |
| | | di.Add(SystemSettingConstVars.OrdersRewardProportion, new DictionaryKeyValues() { sKey = "订单积分奖励比例", sValue = "10" }); |
| | | |
| | | di.Add(SystemSettingConstVars.SignAppointDateStatus, new DictionaryKeyValues() { sKey = "指定特殊日期状态", sValue = "false" }); |
| | | di.Add(SystemSettingConstVars.SignAppointDate, new DictionaryKeyValues() { sKey = "指定特殊日期", sValue = "" }); |
| | |
| | | //业绩奖励技术因子 |
| | | di.Add(SystemSettingConstVars.DictionaryAchievementSet, new DictionaryKeyValues() { sKey = "业绩奖励", sValue = "2" }); |
| | | |
| | | //推广费用 |
| | | di.Add(SystemSettingConstVars.DictionaryTuiGuangFeiYong, new DictionaryKeyValues() { sKey = "推广费用", sValue = "3" }); |
| | | //业绩门槛 |
| | | di.Add(SystemSettingConstVars.DictionaryYeJiMenKan, new DictionaryKeyValues() { sKey = "业绩门槛", sValue = "10000" }); |
| | | |
| | | return di; |
| | | } |
| | | |
| | |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | Task<bool> CreateDistributionAchievementOrder(CreateDAOrderInParam Parma); |
| | | |
| | | |
| | | /// <summary> |
| | | /// 结算所有供应商的绩效奖励 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | Task<bool> SettledAllAchievement(); |
| | | |
| | | /// <summary> |
| | | /// 获取经销商推广费 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | List<DistributionRankingDTO> QueryAchievement(int UserId); |
| | | } |
| | | /// <summary> |
| | | /// 创建经销商订单业绩输出参数 |
| | |
| | | /// 金额 |
| | | /// </summary> |
| | | public decimal Money { get; set; } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | /// 上级序列 |
| | | /// </summary> |
| | | [Required(ErrorMessage = "请输入上级序列")] |
| | | public int parentId { get; set; } |
| | | public string parentId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 原上级序列 |
| | |
| | | * Description: 暂无 |
| | | ***********************************************************************/ |
| | | |
| | | using SqlSugar; |
| | | using System; |
| | | |
| | | namespace CoreCms.Net.Model.ViewModels.DTO.Distribution |
| | |
| | | /// 订单数 |
| | | /// </summary> |
| | | public decimal orderCount { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 开始时间 |
| | | /// </summary> |
| | | public string startTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 结束时间 |
| | | /// </summary> |
| | | public string endTime { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 绩效总额 |
| | | /// </summary> |
| | | public string achievementTotals { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 绩效奖励总和 |
| | | /// </summary> |
| | | public string achievementBonus { get; set; } |
| | | |
| | | } |
| | | } |
| | |
| | | using CoreCms.Net.IServices; |
| | | using CoreCms.Net.Loging; |
| | | using CoreCms.Net.Model.Entities; |
| | | using CoreCms.Net.Model.Entities.baifenbingfa.apply; |
| | | using CoreCms.Net.Model.Entities.Distribution; |
| | | using CoreCms.Net.Model.ViewModels.Basics; |
| | | using CoreCms.Net.Model.ViewModels.DTO.Distribution; |
| | |
| | | private readonly ICoreCmsSettingServices _settingServices; |
| | | private readonly IUnitOfWork _unitOfWork; |
| | | private readonly ICoreCmsUserBalanceServices _userBalanceServices; |
| | | private readonly ICoreCmsUserServices _coreCmsUserServices; |
| | | |
| | | public CoreCmsDistributionServices(IUnitOfWork unitOfWork, ICoreCmsDistributionRepository dal, ICoreCmsDistributionOrderRepository distributionOrderRepository, ICoreCmsUserRepository userRepository, ICoreCmsGoodsRepository goodsRepository, ICoreCmsUserGradeRepository userGradeRepository, ICoreCmsSettingServices settingServices, ICoreCmsOrderRepository orderRepository, ICoreCmsDistributionGradeRepository distributionGradeRepository, ICoreCmsDistributionResultRepository distributionResultRepository, ICoreCmsDistributionConditionServices coreCmsDistributionConditionServices, ICoreCmsUserBalanceServices userBalanceServices) |
| | | public CoreCmsDistributionServices(IUnitOfWork unitOfWork, ICoreCmsDistributionRepository dal, ICoreCmsDistributionOrderRepository distributionOrderRepository, ICoreCmsUserRepository userRepository, ICoreCmsGoodsRepository goodsRepository, ICoreCmsUserGradeRepository userGradeRepository, ICoreCmsSettingServices settingServices, ICoreCmsOrderRepository orderRepository, ICoreCmsDistributionGradeRepository distributionGradeRepository, ICoreCmsDistributionResultRepository distributionResultRepository, ICoreCmsDistributionConditionServices coreCmsDistributionConditionServices, ICoreCmsUserBalanceServices userBalanceServices |
| | | , ICoreCmsUserServices coreCmsUserServices) |
| | | { |
| | | this._dal = dal; |
| | | _distributionOrderRepository = distributionOrderRepository; |
| | |
| | | base.BaseDal = dal; |
| | | _unitOfWork = unitOfWork; |
| | | _userBalanceServices = userBalanceServices; |
| | | |
| | | _coreCmsUserServices = coreCmsUserServices; |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | public async Task<bool> SettledAllAchievement() |
| | | { |
| | | |
| | | |
| | | //查询用户 |
| | | var coreCmsUsers = await _userRepository.QueryListByClauseAsync(x => x.isDelete == false && x.status == 1); |
| | | |
| | | foreach(var coreCmsUser in coreCmsUsers) |
| | | { //非供应商,停止 |
| | | var da = await _dal.GetCountAsync(x => x.userId == coreCmsUser.id && x.verifyStatus == (int)GlobalEnumVars.DistributionVerifyStatus.VerifyYes, isDataCache: true, cacheTimes: 1); |
| | | if (da == 0) |
| | | continue; |
| | | |
| | | //查询是否已经计算过了 |
| | | DateTime StartTime = new DateTime(DateTime.Now.AddYears(-1).Year, 1, 1); |
| | | DateTime endTime = new DateTime(DateTime.Now.Year, 1, 1).AddDays(-1); |
| | | var total = _unitOfWork.GetDbClient().Queryable<DistributionAchievement>().Where(x => |
| | | x.isdelete == false |
| | | && x.userID == coreCmsUser.id |
| | | && x.startTime == StartTime |
| | | && x.endTime == endTime |
| | | ).ToList(); |
| | | if (total != null && total.Count > 0) |
| | | continue; |
| | | |
| | | var att = await AchievementTotalAll(coreCmsUser.id); |
| | | if (att.Item1 > 0) |
| | | { |
| | | DistributionAchievement oder = new DistributionAchievement |
| | | { |
| | | achievementTotals = att.Item1, |
| | | achievementBonus = await AchievementBonuscount(att.Item1), |
| | | createBy = "系统结算", |
| | | createTime = DateTime.Now, |
| | | startTime = att.Item2, |
| | | endTime = att.Item3, |
| | | userID = coreCmsUser.id |
| | | |
| | | }; |
| | | //建立结算单 |
| | | var id = await _unitOfWork.GetDbClient().Insertable(oder).ExecuteCommandIdentityIntoEntityAsync(); |
| | | if (oder.achievementBonus > 0) |
| | | { |
| | | var jm = await _coreCmsUserServices.UpdateBalance(coreCmsUser.id, oder.achievementBonus, "经销商推广费用写入余额"); |
| | | if (jm.code != 0) |
| | | { |
| | | NLogUtil.WriteAll(NLog.LogLevel.Fatal, LogType.DataBase, "经销商推广费用写入余额失败", jm.msg); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | public async Task<(decimal, DateTime?, DateTime?)> AchievementTotalAll(int UserId) |
| | | { |
| | | |
| | | |
| | | DateTime StartTime = new DateTime(DateTime.Now.AddYears(-1).Year, 1, 1); |
| | | DateTime endTime = new DateTime(DateTime.Now.Year, 1, 1); |
| | | |
| | | |
| | | var total = await _unitOfWork.GetDbClient().Queryable<CoreCmsOrder>().Where(x => x.status == (int)GlobalEnumVars.OrderStatus.Complete |
| | | && (x.payStatus != (int)GlobalEnumVars.OrderPayStatus.No || x.payStatus != (int)GlobalEnumVars.OrderPayStatus.Refunded) |
| | | && x.isdel == false |
| | | && x.userId == UserId |
| | | && x.updateTime > StartTime |
| | | && x.updateTime < endTime |
| | | ).SumAsync(x => x.orderAmount); |
| | | |
| | | return (total, StartTime, endTime.AddDays(-1)); |
| | | } |
| | | |
| | | |
| | | public async Task<decimal> AchievementBonuscount(decimal AttributeTotal) |
| | | { |
| | | |
| | | var allConfigs = await _settingServices.GetConfigDictionaries(); |
| | | var tuiGuangFeiYong = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.DictionaryTuiGuangFeiYong).ObjectToInt(0); |
| | | var yeJiMenKan = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.DictionaryYeJiMenKan).ObjectToInt(0); |
| | | if(AttributeTotal <= yeJiMenKan) |
| | | { |
| | | return 0; |
| | | } |
| | | return (AttributeTotal - (decimal)yeJiMenKan) * (decimal)tuiGuangFeiYong / 100; |
| | | } |
| | | |
| | | |
| | | public async Task<bool> CreateDistributionAchievementOrder(CreateDAOrderInParam Parma) |
| | | { |
| | | //非供应商,停止 |
| | |
| | | return await _unitOfWork.GetDbClient().Updateable(oder).ExecuteCommandAsync()>0; |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取经销商推广费 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public List<DistributionRankingDTO> QueryAchievement(int UserId) |
| | | { |
| | | var totals = _unitOfWork.GetDbClient().Queryable<DistributionAchievement>().Where(x => |
| | | x.isdelete == false |
| | | && x.userID == UserId |
| | | ).OrderByDescending(x=>x.startTime).ToList(); |
| | | |
| | | var distributionRankingDTOs = new List<DistributionRankingDTO>(); |
| | | foreach(var distributionAchievement in totals) |
| | | { |
| | | var distributionRankingDTO = new DistributionRankingDTO(); |
| | | distributionRankingDTO.startTime = distributionAchievement.startTime.HasValue ? distributionAchievement.startTime.Value.ToString("yyyy-MM-dd") : ""; |
| | | distributionRankingDTO.endTime = distributionAchievement.endTime.HasValue ? distributionAchievement.endTime.Value.ToString("yyyy-MM-dd") : ""; |
| | | distributionRankingDTO.achievementTotals = distributionAchievement.achievementTotals.ToString("F2"); |
| | | distributionRankingDTO.achievementBonus = distributionAchievement.achievementBonus.ToString("F2"); |
| | | distributionRankingDTOs.Add(distributionRankingDTO); |
| | | } |
| | | |
| | | return distributionRankingDTOs; |
| | | } |
| | | } |
| | | } |
| | |
| | | using CoreCms.Net.Utility.Helper; |
| | | using Microsoft.Extensions.DependencyInjection; |
| | | using Microsoft.Extensions.Hosting; |
| | | using NPOI.SS.Formula.Functions; |
| | | using SqlSugar; |
| | | |
| | | |
| | |
| | | var settingServices = container.ServiceProvider.GetService<ICoreCmsSettingServices>(); |
| | | var orderItemServices = container.ServiceProvider.GetService<ICoreCmsOrderItemServices>(); |
| | | var productsServices = container.ServiceProvider.GetService<ICoreCmsProductsServices>(); |
| | | var distributionServices = container.ServiceProvider.GetService<ICoreCmsDistributionServices>(); |
| | | var allConfigs = await settingServices.GetConfigDictionaries(); |
| | | //获取积分获取模式 |
| | | var pointGetModel = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.PointGetModel).ObjectToInt(); |
| | |
| | | var ordersRewardProportion = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.OrdersRewardProportion).ObjectToInt(); |
| | | if (ordersRewardProportion > 0) |
| | | { |
| | | var point = Convert.ToInt32(money / ordersRewardProportion); |
| | | await SetPoint(userId, point, (int)GlobalEnumVars.UserPointSourceTypes.PointTypeRebate, |
| | | "订单:" + orderId + " 奖励"); |
| | | //如果是经销商就不能获得积分 |
| | | var user = await distributionServices.QueryListByClauseAsync(x => x.userId == userId && x.verifyStatus == 1 && x.isDelete == false );//(int)GlobalEnumVars.DistributionVerifyStatus.VerifyYes |
| | | |
| | | if (user == null || user.Count == 0) |
| | | { |
| | | //如果是普通用户则货得积分 |
| | | var point = Convert.ToInt32(money / ordersRewardProportion); |
| | | await SetPoint(userId, point, (int)GlobalEnumVars.UserPointSourceTypes.PointTypeRebate, |
| | | "订单:" + orderId + " 奖励"); |
| | | } |
| | | } |
| | | } |
| | | else if (pointGetModel == 2) |
New file |
| | |
| | | using CoreCms.Net.IServices; |
| | | using CoreCms.Net.Services; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace CoreCms.Net.Task |
| | | { |
| | | /// <summary> |
| | | /// 定时计算经销商推广费用 |
| | | /// </summary> |
| | | public class AutoSettleAchievementTotal |
| | | { |
| | | private readonly ICoreCmsDistributionServices _coreCmsDistributionServices; |
| | | |
| | | public AutoSettleAchievementTotal(ICoreCmsDistributionServices coreCmsDistributionServices) |
| | | { |
| | | _coreCmsDistributionServices = coreCmsDistributionServices; |
| | | } |
| | | |
| | | public async System.Threading.Tasks.Task Execute() |
| | | { |
| | | DateTime datenow = DateTime.Now.Date; |
| | | DateTime januaryTenth = new DateTime(datenow.Year, 1, 10); |
| | | //每天的0点开始计算 |
| | | if (datenow == januaryTenth && DateTime.Now.Hour >= 0 && DateTime.Now.Hour <= 2) |
| | | //if (true) |
| | | { |
| | | await _coreCmsDistributionServices.SettledAllAchievement(); |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | //自动取消服务器订单任务 |
| | | RecurringJob.AddOrUpdate<AutoCancelServiceOrderJob>("AutoCancelServiceOrderJob", s => s.Execute(), "0 0/5 * * * ? ", new RecurringJobOptions { TimeZone = TimeZoneInfo.Local }); // 每5分钟取消一次订单 |
| | | |
| | | |
| | | //定时计算经销商推广费用 |
| | | RecurringJob.AddOrUpdate<AutoSettleAchievementTotal>("AutoSettleAchievementTotal", s => s.Execute(), "0 0 0/1 * * ? ", new RecurringJobOptions { TimeZone = TimeZoneInfo.Local }); // 每小时计算经销商推广费用 |
| | | } |
| | | |
| | | #endregion |
| | |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region 预览数据============================================================ |
| | | |
| | | // POST: Api/CoreCmsDistribution/GetDetailsAchievement/10 |
| | | /// <summary> |
| | | /// 预览数据 |
| | | /// </summary> |
| | | /// <param name="entity"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | [Description("预览数据")] |
| | | public async Task<AdminUiCallBack> GetDetailsAchievement([FromBody] FMIntId entity) |
| | | { |
| | | var jm = new AdminUiCallBack(); |
| | | |
| | | var model = await _coreCmsDistributionServices.QueryByIdAsync(entity.id); |
| | | if (model == null) |
| | | { |
| | | jm.msg = "不存在此信息"; |
| | | return jm; |
| | | } |
| | | var distributionRankingDTOs = _coreCmsDistributionServices.QueryAchievement(model.userId); |
| | | |
| | | |
| | | |
| | | |
| | | jm.code = 0; |
| | | jm.data = distributionRankingDTOs; |
| | | |
| | | return jm; |
| | | } |
| | | |
| | | #endregion |
| | | } |
| | | } |
| | |
| | | { |
| | | var jm = new AdminUiCallBack(); |
| | | |
| | | if (entity.id == entity.parentId) |
| | | { |
| | | jm.msg = "禁止设置自己为自己的推荐人"; |
| | | return jm; |
| | | } |
| | | |
| | | |
| | | var model = await _coreCmsUserServices.QueryByIdAsync(entity.id); |
| | | if (model == null) |
| | |
| | | jm.msg = "不存在此信息"; |
| | | return jm; |
| | | } |
| | | |
| | | if (entity.parentId > 0) |
| | | var parentId = 0; |
| | | if (!string.IsNullOrEmpty(entity.parentId)) |
| | | { |
| | | var parentObj = await _coreCmsUserServices.QueryByIdAsync(entity.parentId); |
| | | var parentObj = await _coreCmsUserServices.QueryByClauseAsync( x=> x.mobile == entity.parentId && x.isDelete == false && x.status == 1); |
| | | if (parentObj == null) |
| | | { |
| | | jm.msg = "不存在此上级信息"; |
| | |
| | | jm.msg = "不允许双方互相设置为上级"; |
| | | return jm; |
| | | } |
| | | |
| | | if (entity.id == parentObj.id) |
| | | { |
| | | jm.msg = "禁止设置自己为自己的推荐人"; |
| | | return jm; |
| | | } |
| | | |
| | | parentId = parentObj.id; |
| | | } |
| | | else |
| | | { |
| | | entity.parentId = 0; |
| | | jm.msg = "必须填写上级手机"; |
| | | return jm; |
| | | } |
| | | |
| | | // var bl = await _coreCmsUserServices.UpdateAsync(p => new CoreCmsUser() { parentId = entity.parentId }, p => p.id == model.id); |
| | |
| | | entity1.dec = "用户" + model.nickName + "推荐人调整"; |
| | | entity1.reMake = ""; |
| | | entity1.oldData = entity.oldparentId + ""; |
| | | entity1.data = entity.parentId + ""; |
| | | entity1.data = parentId + ""; |
| | | entity1.createTime = DateTime.Now; |
| | | entity1.upDataTime = entity1.createTime; |
| | | entity1.createBy = name; |
| | |
| | | <script type="text/html" template lay-done="layui.data.done(d);"> |
| | | <table class="layui-table layui-form" lay-filter="LAY-app-CoreCmsDistribution-detailsForm" id="LAY-app-CoreCmsDistribution-detailsForm"> |
| | | <colgroup> |
| | | <col width="150"> |
| | | <col> |
| | | </colgroup> |
| | | <tbody> |
| | | <tr> |
| | | <td style="width:30%;"> |
| | | 开始时间 |
| | | </td> |
| | | <td style="width:30%;"> |
| | | 结束时间 |
| | | </td> |
| | | <td style="width:20%;"> |
| | | 绩效总额 |
| | | </td> |
| | | <td style="width:20%;"> |
| | | 推广费用 |
| | | </td> |
| | | </tr> |
| | | |
| | | {{# layui.each(d.params.data, function(index, item){ }} |
| | | <tr> |
| | | <td> |
| | | {{ item.startTime }} |
| | | </td> |
| | | <td> |
| | | {{ item.endTime }} |
| | | </td> |
| | | <td> |
| | | {{ item.achievementTotals }} |
| | | </td> |
| | | <td> |
| | | {{ item.achievementBonus }} |
| | | </td> |
| | | </tr> |
| | | {{# }); }} |
| | | |
| | | </tbody> |
| | | </table> |
| | | </script> |
| | | |
| | | <script> |
| | | var debug = layui.setter.debug; |
| | | layui.data.done = function (d) { |
| | | //开启调试情况下获取接口赋值数据 |
| | | if (debug) { console.log(d.params.data); } |
| | | |
| | | layui.use(['admin', 'form', 'coreHelper'], function () { |
| | | var $ = layui.$ |
| | | , setter = layui.setter |
| | | , admin = layui.admin |
| | | , coreHelper = layui.coreHelper |
| | | , form = layui.form; |
| | | form.render(null, 'LAY-app-CoreCmsDistribution-detailsForm'); |
| | | }); |
| | | }; |
| | | </script> |
New file |
| | |
| | | <script type="text/html" template lay-done="layui.data.done(d);"> |
| | | <table class="layui-table layui-form" lay-filter="LAY-app-CoreCmsDistribution-detailsForm" id="LAY-app-CoreCmsDistribution-detailsForm"> |
| | | <colgroup> |
| | | <col width="150"> |
| | | <col> |
| | | </colgroup> |
| | | <tbody> |
| | | <tr> |
| | | <td style="width: 30%;"> |
| | | 开始时间 |
| | | </td> |
| | | <td style="width: 30%;"> |
| | | 结束时间 |
| | | </td> |
| | | <td style="width: 20%;"> |
| | | 绩效总额(元) |
| | | </td> |
| | | <td style="width: 20%;"> |
| | | 推广费用(元) |
| | | </td> |
| | | </tr> |
| | | |
| | | {{# layui.each(d.params.data, function(index, item){ }} |
| | | <tr> |
| | | <td> |
| | | {{ item.startTime }} |
| | | </td> |
| | | <td> |
| | | {{ item.endTime }} |
| | | </td> |
| | | <td> |
| | | {{ item.achievementTotals }} |
| | | </td> |
| | | <td> |
| | | {{ item.achievementBonus }} |
| | | </td> |
| | | </tr> |
| | | {{# }); }} |
| | | </tbody> |
| | | </table> |
| | | </script> |
| | | |
| | | <script> |
| | | var debug = layui.setter.debug; |
| | | layui.data.done = function (d) { |
| | | //开启调试情况下获取接口赋值数据 |
| | | if (debug) { console.log(d.params.data); } |
| | | |
| | | layui.use(['admin', 'form', 'coreHelper'], function () { |
| | | var $ = layui.$ |
| | | , setter = layui.setter |
| | | , admin = layui.admin |
| | | , coreHelper = layui.coreHelper |
| | | , form = layui.form; |
| | | form.render(null, 'LAY-app-CoreCmsDistribution-detailsForm'); |
| | | }); |
| | | }; |
| | | </script> |
| | |
| | | |
| | | <script type="text/html" id="LAY-app-CoreCmsDistribution-tableBox-bar"> |
| | | <!-- <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="qrcode">小程序码</a> --> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="achievement">业绩</a> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="achievement">推广费</a> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a> |
| | | <a class="layui-btn layui-btn-xs" lay-event="edit">审核</a> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs" data-dropdown="#CoreCmsDistributionTbDelDrop{{d.LAY_NUM}}" no-shade="true">删除</a> |
| | |
| | | } |
| | | } |
| | | }, |
| | | { field: 'DistributionAchievementTotals', title: '历史业绩总和(元)', sort: false, width: 100 }, |
| | | { field: 'distributionAchievementTotals', title: '历史推广费总和(元)', sort: false, width: 100 }, |
| | | //{ field: 'storeDesc', title: '店铺简介', sort: false, width: 105 }, |
| | | { |
| | | field: 'verifyStatus', title: '审核状态', sort: false, width: 80, templet: function (data) { |
| | |
| | | } |
| | | //执行预览操作 |
| | | function achievement(obj) { |
| | | coreHelper.Post("Api/CoreCmsDistribution/GetDetails", { id: obj.data.id }, function (e) { |
| | | coreHelper.Post("Api/CoreCmsDistribution/GetDetailsAchievement", { id: obj.data.id }, function (e) { |
| | | if (e.code === 0) { |
| | | admin.popup({ |
| | | shadeClose: false, |
| | | title: '查看详情', |
| | | area: ['700px', '550px'], |
| | | id: 'LAY-popup-CoreCmsDistribution-details', |
| | | id: 'LAY-popup-CoreCmsDistribution-detailsAchievement', |
| | | success: function (layero, index) { |
| | | view(this.id).render('distribution/distributor/details', { data: e.data }).done(function () { |
| | | view(this.id).render('distribution/distributor/achievementdetails', { data: e.data }).done(function () { |
| | | form.render(); |
| | | }); |
| | | // 禁止弹窗出现滚动条 |
| | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">{{d.data.configs['dictionaryUserGroupKey']['sKey']}}:</label> |
| | | <div class="layui-input-inline "> |
| | | <input type="text" name="dictionaryUserGroupKey" value="{{d.data.configs['dictionaryUserGroupKey']['sValue']}}" autocomplete="off" placeholder="" class="layui-input"> |
| | | <input type="text" name="dictionaryUserGroupKey" value="{{d.data.configs['dictionaryUserGroupKey']['sValue']}}" autocomplete="off" placeholder="" class="layui-input"> |
| | | </div> |
| | | <div class="layui-form-mid layui-word-aux">*非必要不修改*</div> |
| | | </div> |
| | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">{{d.data.configs['dictionaryAchievementSet']['sKey']}}:</label> |
| | | <div class="layui-input-inline layui-inline-2"> |
| | | <input type="text" name="dictionaryAchievementSet" value="{{d.data.configs['dictionaryAchievementSet']['sValue']}}" autocomplete="off" placeholder="" class="layui-input" lay-verify="title|number" > |
| | | <input type="text" name="dictionaryAchievementSet" value="{{d.data.configs['dictionaryAchievementSet']['sValue']}}" autocomplete="off" placeholder="" class="layui-input" lay-verify="title|number"> |
| | | </div> |
| | | <div class="layui-form-mid layui-word-aux">%</div> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">{{d.data.configs['dictionaryTuiGuangFeiYong']['sKey']}}:</label> |
| | | <div class="layui-input-inline layui-inline-2"> |
| | | <input type="text" name="dictionaryTuiGuangFeiYong" value="{{d.data.configs['dictionaryTuiGuangFeiYong']['sValue']}}" autocomplete="off" placeholder="" class="layui-input" lay-verify="title|number"> |
| | | </div> |
| | | <div class="layui-form-mid layui-word-aux">%</div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">{{d.data.configs['dictionaryYeJiMenKan']['sKey']}}:</label> |
| | | <div class="layui-input-inline layui-inline-2"> |
| | | <input type="text" name="dictionaryYeJiMenKan" value="{{d.data.configs['dictionaryYeJiMenKan']['sValue']}}" autocomplete="off" placeholder="" class="layui-input" lay-verify="title|number"> |
| | | </div> |
| | | <div class="layui-form-mid layui-word-aux">元</div> |
| | | </div> |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label"> </label> |
| | |
| | | |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">新上级序列:</label> |
| | | <label class="layui-form-label">新上级电话:</label> |
| | | <div class="layui-input-inline layui-inline-3"> |
| | | <input type="number" name="parentId" id="parentId" class="layui-input" value="0" lay-verify="required|number"> |
| | | <input type="text" name="parentId" id="parentId" class="layui-input" value="" lay-verify="required"> |
| | | </div> |
| | | </div> |
| | | </div> |