王 垚
2021-03-14 b9eecc02632b2047c8bf8bff77c3caccec582970
日计划用料清单表单插件
1个文件已添加
3个文件已修改
69 ■■■■■ 已修改文件
src/BLL/Demo.BillView/Demo.BillView.csproj 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/BLL/Demo.BillView/PRD/Pro_RjhylqdDatachange.cs 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/BLL/Demo.BillView/PRD/Pro_SCLLSH.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/BLL/Demo.BillView/PRD/Pro_WorkBillPlatform.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/BLL/Demo.BillView/Demo.BillView.csproj
@@ -225,6 +225,7 @@
    <Compile Include="PRD\Pro_SCLLFSH.cs" />
    <Compile Include="PRD\Pro_SCHBSH.cs" />
    <Compile Include="PRD\Pro_SCLLSH.cs" />
    <Compile Include="PRD\Pro_RjhylqdDatachange.cs" />
    <Compile Include="PRD\Pro_WorkBillPlatformXNQT.cs" />
    <Compile Include="PRD\Pro_ShowParameter.cs" />
    <Compile Include="PRD\Pro_ZJDBSH.cs" />
src/BLL/Demo.BillView/PRD/Pro_RjhylqdDatachange.cs
New file
@@ -0,0 +1,46 @@
using Kingdee.BOS.Core.Bill;
using Kingdee.BOS.Core.Bill.PlugIn;
using Kingdee.BOS.Core.DynamicForm;
using Kingdee.BOS.Core.DynamicForm.PlugIn;
using Kingdee.BOS.Core.DynamicForm.PlugIn.Args;
using Kingdee.BOS.Core.Metadata;
using Kingdee.BOS.Orm.DataEntity;
using Kingdee.BOS.Util;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZD.Cloud.Logger;
namespace Demo.BillView.PRD
{
    [Description("[日计划用料清单]Datachange事件分子分母更改")]
    [HotUpdate]
    public class Pro_RjhylqdDatachange : AbstractBillPlugIn
    {
        public override void DataChanged(DataChangedEventArgs e)
        {
            //if (!isSearched) return;
            base.DataChanged(e);
            var model = this.View.Model;
            double FHQty = Convert.ToDouble(model.GetValue("FHQty"));
            //分子
            if (e.Field.Key.Contains("FNumerator") || e.Field.Key.Contains("FDenominator"))
            {
                double FNumerator = Convert.ToDouble(model.GetValue("FNumerator", e.Row));//分子
                double FDenominator = Convert.ToDouble(model.GetValue("FDenominator", e.Row));//分母
                if (FNumerator == 0 || FDenominator == 0)
                    return;
                var Hqty = Math.Ceiling((FNumerator / FDenominator) * FHQty);
                this.View.Model.SetValue("FHQtySub", Hqty, e.Row);//计划数量
                this.View.Model.SetValue("FHQtyMust", Hqty, e.Row);//应发数量
                this.View.Model.SetValue("FDwyl", FNumerator / FDenominator, e.Row);//单位用量
            }
        }
    }
}
src/BLL/Demo.BillView/PRD/Pro_SCLLSH.cs
@@ -12,6 +12,7 @@
using System.ComponentModel;
using Kingdee.BOS.ServiceHelper;
using Kingdee.K3.SCM.App;
using ZD.Cloud.Logger;
namespace Demo.DynamicForm.PRD
{
@@ -56,6 +57,7 @@
                        continue;
                    string fentryId = entryRow["FDayPlanFentryId"].ToString();
                    sql = string.Format($"/*dialect*/update Sc_DayPlanPPBomBillSub set  FPickedQty = (select sum(FBaseActualQty) from T_PRD_PICKMTRLDATA where FDayPlanFentryId = { fentryId})where FEntryID = { fentryId} ");
                    LogHelper.Info("领料单的日计划用料清单ID:" + fentryId);
                    sqlList.Add(sql);
                }
            }
src/BLL/Demo.BillView/PRD/Pro_WorkBillPlatform.cs
@@ -2,11 +2,13 @@
using Demo.Model.Model.PODemandPlan;
using K3Cloud.Extend.Utils;
using Kingdee.BOS.Core;
using Kingdee.BOS.Core.Bill;
using Kingdee.BOS.Core.Const;
using Kingdee.BOS.Core.DynamicForm;
using Kingdee.BOS.Core.DynamicForm.PlugIn;
using Kingdee.BOS.Core.DynamicForm.PlugIn.Args;
using Kingdee.BOS.Core.DynamicForm.PlugIn.ControlModel;
using Kingdee.BOS.Core.Metadata;
using Kingdee.BOS.Core.Metadata.EntityElement;
using Kingdee.BOS.JSON;
using Kingdee.BOS.KDThread;
@@ -210,15 +212,31 @@
                //生产计划平台拖期明细跳转
                formPa.FormId = "paez_TardinessDetails";
                formPa.CustomParams.Add("FID", Convert.ToString(this.View.Model.GetValue("FDayPlanWorkID", e.Row).ToString()));
                this.View.ShowForm(formPa);
            }
            else if (e.ColKey == "FQTYLS")
            {
                //生产计划平台
                string pageId = Guid.NewGuid().ToString();
                BillShowParameter showParameter = new BillShowParameter();
                showParameter.FormId = "Paez_Sc_WorkBillAutoSortBill";
                showParameter.OpenStyle.ShowType = ShowType.MainNewTabPage;
                showParameter.PageId = pageId;
                showParameter.Status = OperationStatus.EDIT;
                // 传入需要修改的日计划工单内码,
                showParameter.PKey =Convert.ToString(this.View.Model.GetValue("FDayPlanWorkID", e.Row).ToString());
                this.View.ShowForm(showParameter);
            }
            else
            {
                //齐套分析明细列表跳转
                formPa.FormId = "paez_CompleteAnalysisDetail";
                formPa.CustomParams.Add("FHICMOInterID", Convert.ToString(this.View.Model.GetValue("FDayPlanWorkID", e.Row).ToString()));
            }
            this.View.ShowForm(formPa);
        }
        }
        /// <summary>
        /// 查看虚拟齐套
        /// </summary>