/// <summary> /// 增加构件的尺寸,如勒口,书脊 /// </summary> /// <param name="length"></param> public void ReSetCover(int length) { Cover.Size.Id = -1; if (Cover.Size.Num == 4) { Cover.Size.Length = Cover.Size.Length * 2 + length; } else { Cover.Size.Length += length; } Cover.PageNum = 2; Cover.ReCaculation(); }
/// <summary> /// 计算一个部件的印刷费用,含开机费和印工费; /// </summary> /// <param name="color"></param> /// <returns></returns> public void CaculationPrintProcess(ProductUnit pu) { if (Process == null) { Process = new List <Model.P_ProcessList>(); } int PrintId, PrintPsId; if (pu.PrintPs == null) { pu.ReCaculation(); } if (pu.PrintPs.Color > 2) { PrintId = ConstantValue.Process.ColorPrint; PrintPsId = ConstantValue.Process.MakeColorPs; } else { PrintId = ConstantValue.Process.BlackPrint; PrintPsId = ConstantValue.Process.MakeBlackPs; } Model.P_ProcessList w1 = new Model.P_ProcessList(); Model.P_ProcessList w2 = new Model.P_ProcessList(); int printnum = pu.PrintPs.AllPrintNum + pu.PrintPs.HalfPrintNum + pu.PrintPs.QuarPrintNum; int tie = pu.PrintPs.AllPsNum * 2 + pu.PrintPs.HalfPsNum + pu.PrintPs.QuarPsNum; int makenum = tie; //插入并计算印工费 if (pu.Color > 0) { w1.ProcessId = PrintId; w1.Num = printnum; if (pu.Size.Num > 1) { w1.Num = w1.Num * 2; } w1.ProcessName = "印工费"; if (w1.Num > 1) { w1.Price = DAL.C_ProcessPrice.GetPrice(w1.ProcessId, w1.Num); } else { w1.Price = 0; } w1.GroupId = pu.GroupId; w1.PType = 1; w1.ListCode = pu.UnitName; //增加印刷的损耗; pu.ExtendRatio = ConstantValue.Process.ExtendRatio; pu.ExtendNum += tie * ConstantValue.Process.ExtendBase / pu.PrintPaper.Kaidu; //插入并计算开机费 if (pu.ContentRepeat < 2) { w2.ProcessId = PrintPsId; w2.ProcessName = "开机费"; w2.Num = tie; w2.GroupId = pu.GroupId; w2.PType = 1; w2.Price = DAL.C_ProcessPrice.GetPrice(w2.ProcessId, w2.Num); w2.ListCode = pu.UnitName; Process.Add(w2); } Process.Add(w1); } }