/// <summary> /// 获取列表 /// </summary> private void GetExtList() { string CompanyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD;//公司代码 DataTable dt = TableExtFieldsBus.GetAllList(CompanyCD, "", this.TableName); if (dt != null && dt.Rows.Count > 0) { SelExtValue.DataTextField = "EFDesc"; SelExtValue.DataValueField = "EFIndex"; SelExtValue.DataSource = dt; SelExtValue.DataBind(); } else { divBillAttr.Style.Add("display", "none"); } }
protected void LoadPrintInfo() { PrintParameterSettingModel model = new PrintParameterSettingModel(); model.CompanyCD = UserInfo.CompanyCD; model.BillTypeFlag = int.Parse(ConstUtil.BILL_TYPEFLAG_PURCHASE); model.PrintTypeFlag = ConstUtil.PRINTBILL_TYPEFLAG_PurchaseArrive; /*此处需注意在模板设置表里的字段和取基本信息的字段是否一致*/ Dictionary <string, string> dic = new Dictionary <string, string>(); dic.Add("ExtField1", "{ExtField1}"); dic.Add("ExtField2", "{ExtField2}"); dic.Add("ExtField3", "{ExtField3}"); dic.Add("ExtField4", "{ExtField4}"); dic.Add("ExtField5", "{ExtField5}"); dic.Add("ExtField6", "{ExtField6}"); dic.Add("ExtField7", "{ExtField7}"); dic.Add("ExtField8", "{ExtField8}"); dic.Add("ExtField9", "{ExtField9}"); dic.Add("ExtField10", "{ExtField10}"); dic.Add("ArriveNo", "单据编号"); dic.Add("Title", "主题"); dic.Add("TypeIDName", "采购类别"); dic.Add("ProviderName", "供应商"); dic.Add("DeptName", "部门"); dic.Add("CheckUserName", "点收人"); dic.Add("PurchaserName", "采购员"); dic.Add("CheckDate", "点收日期"); dic.Add("FromTypeName", "源单类型"); dic.Add("MoneyTypeName", "支付方式"); dic.Add("SendAddress", "发货地址"); dic.Add("ReceiveOverAddress", "收货地址"); dic.Add("isAddTaxName", "是否为增值税"); dic.Add("TakeTypeName", "交货方式"); dic.Add("CarryTypeName", "运送方式"); dic.Add("PayTypeName", "结算方式"); dic.Add("CurrencyTypeName", "币种"); dic.Add("Rate", "汇率"); dic.Add("ArriveDate", "到货时间"); dic.Add("ProjectName", "所属项目"); dic.Add("CountTotal", "数量总计"); if (UserInfo.IsDisplayPrice) {// 出入库显示单价 dic.Add("TotalMoney", "金额总计"); dic.Add("TotalTax", "税额合计"); dic.Add("TotalFee", "含税总额总计"); dic.Add("Discount", "整单折扣"); dic.Add("DiscountTotal", "折扣金额"); dic.Add("RealTotal", "折后含税额"); dic.Add("OtherTotal", "其他费用支出合计"); } dic.Add("BillStatusName", "单据状态"); dic.Add("CreatorName", "制单人"); dic.Add("CreateDate", "制单日期"); dic.Add("ConfirmorName", "确认人"); dic.Add("ConfirmDate", "确认日期"); dic.Add("CloserName", "结单人"); dic.Add("CloseDate", "结单日期"); dic.Add("ModifiedUserID", "最后更新人"); dic.Add("ModifiedDate", "最后更新日期"); dic.Add("Remark", "备注"); string[,] aBase = ConvertDictionaryToString(dic, out _sbase); dic.Clear(); dic.Add("SortNo", "序号"); dic.Add("ProductNo", "物品编号"); dic.Add("ProductName", "物品名称"); dic.Add("Specification", "规格"); dic.Add("ColorName", "颜色"); if (_isMoreUnit) {// 启用多计量单位 dic.Add("UnitName", "基本单位"); dic.Add("ProductCount", "基本数量"); dic.Add("UsedUnitName", "单位"); dic.Add("UsedUnitCount", "到货数量"); } else { dic.Add("UnitName", "单位"); dic.Add("ProductCount", "到货数量"); } if (UserInfo.IsDisplayPrice) {// 出入库显示单价 dic.Add("TotalPrice", "金额"); dic.Add("UnitPrice", "单价"); dic.Add("TaxPrice", "含税价"); dic.Add("TaxRate", "税率"); dic.Add("TotalFee", "含税金额"); dic.Add("TotalTax", "税额"); } string[,] aDetail = ConvertDictionaryToString(dic, out _sdetail); #region 1.扩展属性 int countExt = 0; DataTable dtExtTable = TableExtFieldsBus.GetAllList(UserInfo.CompanyCD, "", "officedba." + ConstUtil.CODING_RULE_TABLE_PURCHASEARRIVE); if (dtExtTable.Rows.Count > 0) { for (int i = 0; i < dtExtTable.Rows.Count; i++) { for (int x = 0; x < (aBase.Length / 2) - 15; x++) { if (x == i) { aBase[x, 0] = dtExtTable.Rows[i]["EFDesc"].ToString(); countExt++; } } } } #endregion DataTable dbPrint = XBase.Business.Common.PrintParameterSettingBus.GetPrintParameterSettingInfo(model); DataTable dtMRP = PurchaseArriveBus.SelectArrive(this.intMrpID); DataTable dtDetail = PurchaseArriveBus.Details(this.intMrpID); string strBaseFields = ""; string strDetailFields = ""; if (dbPrint.Rows.Count > 0) { isSeted.Value = "1"; strBaseFields = dbPrint.Rows[0]["BaseFields"].ToString(); strDetailFields = dbPrint.Rows[0]["DetailFields"].ToString(); } else { isSeted.Value = "0"; strBaseFields = GetDefaultFields(aBase); /*基本信息字段+扩展信息字段*/ if (countExt > 0) { for (int i = 0; i < countExt; i++) { strBaseFields = strBaseFields + "|" + "ExtField" + (i + 1); } } strDetailFields = GetDefaultFields(aDetail); } #region 2.主表信息 if (!string.IsNullOrEmpty(strBaseFields)) { tableBase.InnerHtml = WritePrintPageTable("采购到货", strBaseFields, strDetailFields, aBase, aDetail, dtMRP, dtDetail, true); } #endregion #region 3.明细信息 if (!string.IsNullOrEmpty(strDetailFields)) { tableDetail.InnerHtml = WritePrintPageTable("采购到货", strBaseFields, strDetailFields, aBase, aDetail, dtMRP, dtDetail, false); } #endregion }
protected void LoadPrintInfo() { PrintParameterSettingModel model = new PrintParameterSettingModel(); model.CompanyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD;//UserInfo.CompanyCD; model.BillTypeFlag = int.Parse(ConstUtil.BILL_TYPEFLAG_SALE); model.PrintTypeFlag = ConstUtil.PRINTBILL_TYPEFLAG_SELLGATHERING; // /*接受参数*/ string GatheringNo = Request.QueryString["no"].ToString(); #region 基本信息 明细信息 /*此处需注意在模板设置表里的字段和取基本信息的字段是否一致*/ string[,] aBase = { { "{ExtField1}", "ExtField1" }, { "{ExtField2}", "ExtField2" }, { "{ExtField3}", "ExtField3" }, { "{ExtField4}", "ExtField4" }, { "{ExtField5}", "ExtField5" }, { "{ExtField6}", "ExtField6" }, { "{ExtField7}", "ExtField7" }, { "{ExtField8}", "ExtField8" }, { "{ExtField9}", "ExtField9" }, { "{ExtField10}", "ExtField10" }, { "回款计划编号", "GatheringNo" }, { "主题", "Title" }, { "源单类型", "fromTypeName" }, { "源单编号", "BillNo" }, { "客户名称", "CustName" }, { "客户类型", "TypeName" }, { "客户电话", "Tel" }, { "币种", "CurrencyName" }, { "业务员", "SellerName" }, { "部门", "DeptName" }, { "计划回款金额", "PlanPrice" }, { "计划回款时间", "PlanGatherDate" }, { "实际回款金额", "FactPrice" }, { "实际回款时间", "FactGatherDate" }, { "回款相关单号", "LinkBillNo" }, { "期次", "GatheringTime" }, { "状态", "stateName" }, { "制单人", "CreatorName" }, { "制单日期", "CreateDate" }, { "最后更新人", "ModifiedUserID" }, { "最后更新日期", "ModifiedDate" }, { "备注", "Remark" }, }; #endregion #region 1.扩展属性 int countExt = 0; DataTable dtExtTable = TableExtFieldsBus.GetAllList(((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD, "", "officedba.SellGathering"); if (dtExtTable.Rows.Count > 0) { for (int i = 0; i < dtExtTable.Rows.Count; i++) { for (int x = 0; x < (aBase.Length / 2) - 22; x++) { if (x == i) { aBase[x, 0] = dtExtTable.Rows[i]["EFDesc"].ToString(); countExt++; } } } } #endregion DataTable dbPrint = XBase.Business.Common.PrintParameterSettingBus.GetPrintParameterSettingInfo(model); DataTable dtMain = SellGatheringBus.GetRepOrder(GatheringNo); string strBaseFields = ""; if (dbPrint.Rows.Count > 0) { isSeted.Value = "1"; strBaseFields = dbPrint.Rows[0]["BaseFields"].ToString(); } else { isSeted.Value = "0"; strBaseFields = "GatheringNo|Title|fromTypeName|BillNo|CustName|TypeName|Tel|CurrencyName|SellerName|DeptName|PlanPrice|PlanGatherDate|FactPrice|"; strBaseFields = strBaseFields + "FactGatherDate|LinkBillNo|GatheringTime|stateName|CreatorName|CreateDate|ModifiedUserID|ModifiedDate|Remark"; /*基本信息字段+扩展信息字段*/ if (countExt > 0) { for (int i = 0; i < countExt; i++) { strBaseFields = strBaseFields + "|" + "ExtField" + (i + 1); } } } #region 2.主表信息 if (!string.IsNullOrEmpty(strBaseFields)) { //第一个是打印页面的正标题,strBaseFields是在PrintParameterSetting表里设置的主表字段, //strDetailFields是在PrintParameterSetting表里设置的明细表的字段, //aBase,是打印设置页面上定义取出来的字段及对应的名称, //aDetail是打印设置页面上定义取出来的字段及对应的名称, //例如明细中的物品编号,对应的就是物品编号及取数据的字段ProdNo, //dtMRP是主表的数据集, //dtDetail是明细表的数据集,最后一个参数,用来区别是主表信息还是明细信息.. tableBase.InnerHtml = WritePrintPageTable("销售回款计划", strBaseFields, "", aBase, null, dtMain, null, true); } #endregion }
protected void LoadPrintInfo() { PrintParameterSettingModel model = new PrintParameterSettingModel(); model.CompanyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD; model.BillTypeFlag = int.Parse(ConstUtil.BILL_TYPEFLAG_PURCHASE); model.PrintTypeFlag = ConstUtil.PRINTBILL_TYPEFLAG_PurchaseApply; //PurchaseApplyModel modelMRP = new PurchaseApplyModel(); //PurchaseApplyModel.CompanyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD; //PurchaseApplyModel.ID = this.intMrpID; /*此处需注意在模板设置表里的字段和取基本信息的字段是否一致*/ string[,] aBase = { { "{ExtField1}", "ExtField1" }, { "{ExtField2}", "ExtField2" }, { "{ExtField3}", "ExtField3" }, { "{ExtField4}", "ExtField4" }, { "{ExtField5}", "ExtField5" }, { "{ExtField6}", "ExtField6" }, { "{ExtField7}", "ExtField7" }, { "{ExtField8}", "ExtField8" }, { "{ExtField9}", "ExtField9" }, { "{ExtField10}", "ExtField10" }, { "单据编号", "ApplyNo" }, { "主题", "Title" }, { "采购类别", "TypeName" }, { "申请人", "ApplyUserName" }, { "部门", "DeptName" }, { "源单类型", "FromTypeName" }, { "申请日期", "ApplyDate" }, { "到货地址", "Address" }, { "数量总计", "CountTotal" }, { "单据状态", "BillStatusName" }, { "制单人", "CreatorName" }, { "制单日期", "CreateDate" }, { "确认人", "ConfirmorName" }, { "确认日期", "ConfirmDate" }, { "结单人", "CloserName" }, { "结单日期", "CloseDate" }, { "最后更新人", "ModifiedUserID" }, { "最后更新日期", "ModifiedDate" }, { "备注", "Remark" }, }; string[,] aDetail; if (((UserInfoUtil)SessionUtil.Session["UserInfo"]).IsMoreUnit) { aDetail = new string[, ] { { "序号", "SortNo" }, { "物品编号", "ProductNo" }, { "物品名称", "ProductName" }, { "规格", "Specification" }, { "颜色", "ColorName" }, { "基本单位", "UnitName" }, { "基本数量", "PlanCount" }, { "单位", "UsedUnitName" }, { "需求数量", "UsedUnitCount" }, { "需求日期", "PlanTakeDate" }, { "申请原因", "ApplyReasonName" }, { "源单编号", "FromBillNo" }, { "源单序号", "FromLineNo" }, }; } else { aDetail = new string[, ] { { "序号", "SortNo" }, { "物品编号", "ProductNo" }, { "物品名称", "ProductName" }, { "规格", "Specification" }, { "颜色", "ColorName" }, { "单位", "UnitName" }, { "需求数量", "PlanCount" }, { "需求日期", "PlanTakeDate" }, { "申请原因", "ApplyReasonName" }, { "源单编号", "FromBillNo" }, { "源单序号", "FromLineNo" }, }; } string[,] aSecondDetail; /*第二明细*/ if (((UserInfoUtil)SessionUtil.Session["UserInfo"]).IsMoreUnit) { aSecondDetail = new string[, ] { { "序号", "SortNo" }, { "物品编号", "ProductNo" }, { "物品名称", "ProductName" }, { "规格", "Specification" }, { "颜色", "ColorName" }, { "基本单位", "UnitName" }, { "基本数量", "ProductCount" }, { "单位", "UsedUnitName" }, { "申请数量", "UsedUnitCount" }, { "需求日期", "RequireDate" }, }; } else { aSecondDetail = new string[, ] { { "序号", "SortNo" }, { "物品编号", "ProductNo" }, { "物品名称", "ProductName" }, { "规格", "Specification" }, { "颜色", "ColorName" }, { "单位", "UnitName" }, { "申请数量", "ProductCount" }, { "需求日期", "RequireDate" }, }; } #region 1.扩展属性 int countExt = 0; DataTable dtExtTable = TableExtFieldsBus.GetAllList(((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD, "", "officedba." + ConstUtil.CODING_RULE_TABLE_PURCHASEAPPLY); if (dtExtTable.Rows.Count > 0) { for (int i = 0; i < dtExtTable.Rows.Count; i++) { for (int x = 0; x < (aBase.Length / 2) - 15; x++) { if (x == i) { aBase[x, 0] = dtExtTable.Rows[i]["EFDesc"].ToString(); countExt++; } } } } #endregion DataTable dbPrint = XBase.Business.Common.PrintParameterSettingBus.GetPrintParameterSettingInfo(model); DataTable dtMRP = PurchaseApplyBus.GetPurchaseApply(this.intMrpID.ToString()); DataTable dtDetail = PurchaseApplyBus.GetPurchaseApplySource(this.intMrpID.ToString()); //DataTable PurchaseApplyPrimary = PurchaseApplyBus.GetPurchaseApply(ID); //DataTable PurchaseApplySource = PurchaseApplyBus.GetPurchaseApplySource(ID); DataTable PurchaseApplyDetail2 = PurchaseApplyBus.GetPurchaseApplyDetail(this.intMrpID.ToString()); string strBaseFields = ""; string strDetailFields = ""; /*第二明细*/ string strDetailSecondFields = ""; if (dbPrint.Rows.Count > 0) { isSeted.Value = "1"; strBaseFields = dbPrint.Rows[0]["BaseFields"].ToString(); strDetailFields = dbPrint.Rows[0]["DetailFields"].ToString(); /*第二明细*/ strDetailSecondFields = dbPrint.Rows[0]["DetailSecondFields"].ToString(); } else { isSeted.Value = "0"; strBaseFields = "ApplyNo|Title|TypeName|ApplyUserName|DeptName|FromTypeName|ApplyDate|Address|CountTotal|CreatorName|CreateDate|BillStatusName|ConfirmorName|ConfirmDate|CloserName|CloseDate|ModifiedUserID|ModifiedDate|Remark"; /*基本信息字段+扩展信息字段*/ if (countExt > 0) { for (int i = 0; i < countExt; i++) { strBaseFields = strBaseFields + "|" + "ExtField" + (i + 1); } } if (((UserInfoUtil)SessionUtil.Session["UserInfo"]).IsMoreUnit) { strDetailFields = "SortNo|ProductNo|ProductName|Specification|ColorName|UnitName|PlanCount|UsedUnitName|UsedUnitCount|PlanTakeDate|ApplyReasonName|FromBillNo|FromLineNo"; } else { strDetailFields = "SortNo|ProductNo|ProductName|Specification|ColorName|UnitName|PlanCount|PlanTakeDate|ApplyReasonName|FromBillNo|FromLineNo"; } /*第二明细*/ if (((UserInfoUtil)SessionUtil.Session["UserInfo"]).IsMoreUnit) { strDetailSecondFields = "SortNo|ProductNo|ProductName|Specification|ColorName|UnitName|ProductCount|UsedUnitName|UsedUnitCount|RequireDate"; } else { strDetailSecondFields = "SortNo|ProductNo|ProductName|Specification|ColorName|UnitName|ProductCount|RequireDate"; } } #region 2.主表信息 if (!string.IsNullOrEmpty(strBaseFields)) { tableBase.InnerHtml = WritePrintPageTable("采购申请", strBaseFields, strDetailFields, aBase, aDetail, dtMRP, dtDetail, true); } #endregion #region 3.明细信息 if (!string.IsNullOrEmpty(strDetailFields)) { tableDetail.InnerHtml = WritePrintPageTable("采购申请", strBaseFields, strDetailFields, aBase, aDetail, dtMRP, dtDetail, false); } #endregion /*第二明细*/ #region 4.明细信息2 if (!string.IsNullOrEmpty(strDetailSecondFields)) { tableDetail2.InnerHtml = WritePrintPageTable("采购申请", strBaseFields, strDetailSecondFields, aBase, aSecondDetail, dtMRP, PurchaseApplyDetail2, false); } #endregion }
protected void LoadPrintInfo() { PrintParameterSettingModel model = new PrintParameterSettingModel(); model.CompanyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD;//UserInfo.CompanyCD; model.BillTypeFlag = int.Parse(ConstUtil.BILL_TYPEFLAG_SALE); model.PrintTypeFlag = ConstUtil.PRINTBILL_TYPEFLAG_SELLCHANNELSTTL; // /*接受参数*/ string SttlNo = Request.QueryString["no"].ToString(); #region 基本信息 明细信息 /*此处需注意在模板设置表里的字段和取基本信息的字段是否一致*/ string[,] aBase = { { "{ExtField1}", "ExtField1" }, { "{ExtField2}", "ExtField2" }, { "{ExtField3}", "ExtField3" }, { "{ExtField4}", "ExtField4" }, { "{ExtField5}", "ExtField5" }, { "{ExtField6}", "ExtField6" }, { "{ExtField7}", "ExtField7" }, { "{ExtField8}", "ExtField8" }, { "{ExtField9}", "ExtField9" }, { "{ExtField10}", "ExtField10" }, { "单据编号", "SttlNo" }, { "主题", "Title" }, { "源单类型", "FromTypeText" }, { "源单编号", "SendNo" }, { "客户名称", "CustName" }, { "客户电话", "Tel" }, { "结算方式", "PayTypeName" }, { "支付方式", "MoneyTypeName" }, { "币种", "CurrencyName" }, { "汇率", "Rate" }, { "业务员", "SellerName" }, { "部门", "DeptName" }, { "结算日期", "SttlDate" }, { "代销金额", "TotalFee" }, { "代销提成率(%)", "PushMoneyPercent" }, { "代销提成额", "PushMoney" }, { "手续费合计", "HandFeeTotal" }, { "应结算金额合计", "SttlTotal" }, { "代销数量合计", "CountTotal" }, { "单据状态", "BillStatusText" }, { "制单人", "CreatorName" }, { "制单日期", "CreateDate" }, { "确认人", "ConfirmorName" }, { "确认日期", "ConfirmDate" }, { "结单人", "CloserName" }, { "结单日期", "CloseDate" }, { "最后更新人", "ModifiedUserID" }, { "最后更新日期", "ModifiedDate" }, { "建单情况", "IsOpenbillText" }, { "回款状态", "IsAccText" }, { "已回款金额", "YAccounts" }, }; string[,] aDetail; //多计量单位 if (((UserInfoUtil)SessionUtil.Session["UserInfo"]).IsMoreUnit) { aDetail = new string[, ] { //{ "序号", "SortNo"}, { "物品编号", "ProdNo" }, { "物品名称", "ProductName" }, { "规格", "Specification" }, { "基本单位", "UnitName" }, { "基本数量", "SttlNumber" }, { "单位", "UsedUnitName" }, { "代销数量", "ProductCount" }, { "已结算数量", "SttlCount" }, { "本次结算数量", "UsedUnitCount" }, { "单价", "UsedPrice" }, { "本次结算代销金额", "TotalPrice" }, { "备注", "Remark" }, }; } else { aDetail = new string[, ] { //{ "序号", "SortNo"}, { "物品编号", "ProdNo" }, { "物品名称", "ProductName" }, { "规格", "Specification" }, { "单位", "UnitName" }, { "代销数量", "ProductCount" }, { "已结算数量", "SttlCount" }, { "本次结算数量", "SttlNumber" }, { "单价", "UnitPrice" }, { "本次结算代销金额", "TotalPrice" }, { "备注", "Remark" }, }; } #endregion #region 1.扩展属性 int countExt = 0; DataTable dtExtTable = TableExtFieldsBus.GetAllList(((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD, "", "officedba.SellChannelSttl"); if (dtExtTable.Rows.Count > 0) { for (int i = 0; i < dtExtTable.Rows.Count; i++) { for (int x = 0; x < (aBase.Length / 2) - 31; x++) { if (x == i) { aBase[x, 0] = dtExtTable.Rows[i]["EFDesc"].ToString(); countExt++; } } } } #endregion DataTable dbPrint = XBase.Business.Common.PrintParameterSettingBus.GetPrintParameterSettingInfo(model); DataTable dtMain = SellChannelSttlBus.GetRepOrder(SttlNo); //获取主表数据 DataTable dtDetail = SellChannelSttlBus.GetRepOrderDetail(SttlNo); //获取明细表数据 string strBaseFields = ""; string strDetailFields = ""; if (dbPrint.Rows.Count > 0) { isSeted.Value = "1"; strBaseFields = dbPrint.Rows[0]["BaseFields"].ToString(); strDetailFields = dbPrint.Rows[0]["DetailFields"].ToString(); } else { isSeted.Value = "0"; strBaseFields = "SttlNo|Title|FromTypeText|SendNo|CustName|Tel|PayTypeName|MoneyTypeName|CurrencyName|Rate|"; strBaseFields = strBaseFields + "SellerName|DeptName|SttlDate|TotalFee|PushMoneyPercent|PushMoney|HandFeeTotal|SttlTotal|CountTotal|"; strBaseFields = strBaseFields + "BillStatusText|CreatorName|CreateDate|ConfirmorName|ConfirmDate|CloserName|CloseDate|ModifiedUserID|ModifiedDate|Remark|"; strBaseFields = strBaseFields + "IsOpenbillText|IsAccText|YAccounts"; /*基本信息字段+扩展信息字段*/ if (countExt > 0) { for (int i = 0; i < countExt; i++) { strBaseFields = strBaseFields + "|" + "ExtField" + (i + 1); } } //多计量单位 if (((UserInfoUtil)SessionUtil.Session["UserInfo"]).IsMoreUnit) { /*订单明细SortNo|*/ strDetailFields = "ProdNo|ProductName|Specification|UnitName|ProductCount|UsedUnitName|UsedUnitCount|SttlCount|SttlNumber|UsedPrice|TotalPrice|Remark"; } else { /*订单明细SortNo|*/ strDetailFields = "ProdNo|ProductName|Specification|UnitName|ProductCount|SttlCount|SttlNumber|UnitPrice|TotalPrice|Remark"; } } #region 2.主表信息 if (!string.IsNullOrEmpty(strBaseFields)) { //第一个是打印页面的正标题,strBaseFields是在PrintParameterSetting表里设置的主表字段, //strDetailFields是在PrintParameterSetting表里设置的明细表的字段, //aBase,是打印设置页面上定义取出来的字段及对应的名称, //aDetail是打印设置页面上定义取出来的字段及对应的名称, //例如明细中的物品编号,对应的就是物品编号及取数据的字段ProdNo, //dtMRP是主表的数据集, //dtDetail是明细表的数据集,最后一个参数,用来区别是主表信息还是明细信息.. tableBase.InnerHtml = WritePrintPageTable("委托代销结算单", strBaseFields, strDetailFields, aBase, aDetail, dtMain, dtDetail, true); } #endregion #region 3.明细信息 if (!string.IsNullOrEmpty(strDetailFields)) { tableDetail.InnerHtml = WritePrintPageTable("委托代销结算单", strBaseFields, strDetailFields, aBase, aDetail, dtMain, dtDetail, false); } #endregion }
protected void LoadPrintInfo() { PrintParameterSettingModel pModel = new PrintParameterSettingModel(); pModel.CompanyCD = UserInfo.CompanyCD; pModel.BillTypeFlag = int.Parse(ConstUtil.BILL_TYPEFLAG_SUBSTORAGE); pModel.PrintTypeFlag = ConstUtil.PRINTBILL_TYPEFLAG_SUBSELLBACK; /*此处需注意在模板设置表里的字段和取基本信息的字段是否一致*/ string[,] aBase = { { "{ExtField1}", "ExtField1" }, { "{ExtField2}", "ExtField2" }, { "{ExtField3}", "ExtField3" }, { "{ExtField4}", "ExtField4" }, { "{ExtField5}", "ExtField5" }, { "{ExtField6}", "ExtField6" }, { "{ExtField7}", "ExtField7" }, { "{ExtField8}", "ExtField8" }, { "{ExtField9}", "ExtField9" }, { "{ExtField10}", "ExtField10" }, { "单据编号", "BackNo" }, { "单据主题", "Title" }, { "销售分店", "DeptName" }, { "源单类型", "FromType" }, { "对应分店销售订单", "OrderID" }, { "发货模式", "SendModeName" }, { "发货时间", "OutDate" }, { "发货人", "OutUserIDName" }, { "是否增值税", "isAddTax" }, { "客户名称", "CustName" }, { "客户联系电话", "CustTel" }, { "客户手机号", "CustMobile" }, { "币种", "CurrencyTypeName" }, { "汇率", "Rate" }, { "业务状态", "BusiStatusName" }, { "退货时间", "BackDate" }, { "退货处理人", "SellerName" }, { "入库时间", "InDate" }, { "入库人", "InUserIDName" }, { "结算时间", "SttlDate" }, { "结算人", "SttlUserIDName" }, { "客户地址", "CustAddr" }, { "退货理由描述", "BackReason" }, { "退货数量合计", "CountTotal" }, { "金额合计", "TotalPrice" }, { "税额合计", "Tax" }, { "含税金额合计", "TotalFee" }, { "整单折扣(%)", "Discount" }, { "折扣金额合计", "DiscountTotal" }, { "折后含税金额", "RealTotal" }, { "应退货款", "WairPayTotal" }, { "已退货款", "PayedTotal" }, { "应退货款余额", "WairPayTotalOverage" }, { "单据状态", "BillStatusName" }, { "制单人", "CreatorName" }, { "制单日期", "CreateDate" }, { "确认人", "ConfirmorName" }, { "确认日期", "ConfirmDate" }, { "结单人", "CloserName" }, { "结单日期", "CloseDate" }, { "最后更新人", "ModifiedUserID" }, { "最后更新日期", "ModifiedDate" }, { "备注", "Remark" }, }; string[,] aDetail = { { "序号", "SortNo" }, { "产品编号", "ProductNo" }, { "产品名称", "ProductName" }, { "批次", "BatchNo" }, { "规格", "standard" }, { "单位", "UnitName" }, { "发货数量", "ProductCount" }, { "退货数量", "BackCount" }, { "单价", "UnitPrice" }, { "含税价", "TaxPrice" }, { "折扣", "Discount" }, { "税率", "TaxRate" }, { "金额", "TotalPrice" }, { "含税金额", "TotalFee" }, { "仓库", "StorageName" }, { "备注", "Remark" } }; if (_isMoreUnit) {// 启用多计量单位 aDetail = new string[, ] { { "序号", "SortNo" }, { "产品编号", "ProductNo" }, { "产品名称", "ProductName" }, { "批次", "BatchNo" }, { "规格", "standard" }, { "基本单位", "UnitName" }, { "基本数量", "BackCount" }, { "单位", "UsedUnitName" }, { "发货数量", "ProductCount" }, { "退货数量", "UsedUnitCount" }, { "单价", "UnitPrice" }, { "含税价", "TaxPrice" }, { "折扣", "Discount" }, { "税率", "TaxRate" }, { "金额", "TotalPrice" }, { "含税金额", "TotalFee" }, { "仓库", "StorageName" }, { "备注", "Remark" } }; } #region 扩展属性 DataTable dtExtTable = TableExtFieldsBus.GetAllList(UserInfo.CompanyCD, "", "officedba.SubSellBack"); int countExt = 0; for (int i = 0; i < dtExtTable.Rows.Count; i++) { aBase[i, 0] = dtExtTable.Rows[i]["EFDesc"].ToString(); countExt++; } #endregion DataTable dbPrint = XBase.Business.Common.PrintParameterSettingBus.GetPrintParameterSettingInfo(pModel); DataTable dt = SubSellBackBus.SubSellBack(intID); ConvertDataTable(dt); DataTable dtDetail = SubSellBackBus.Details(intID); string strBaseFields = ""; string strDetailFields = ""; if (dbPrint.Rows.Count > 0) { isSeted.Value = "1"; strBaseFields = dbPrint.Rows[0]["BaseFields"].ToString(); strDetailFields = dbPrint.Rows[0]["DetailFields"].ToString(); } else { isSeted.Value = "0"; strBaseFields = GetDefaultFields(aBase); /*基本信息字段+扩展信息字段*/ if (countExt > 0) { for (int i = 0; i < countExt; i++) { strBaseFields += "|ExtField" + (i + 1); } } strDetailFields = GetDefaultFields(aDetail); } #region 主表信息 if (!string.IsNullOrEmpty(strBaseFields)) { tableBase.InnerHtml = WritePrintPageTable("销售退货单", strBaseFields, strDetailFields, aBase, aDetail, dt, dtDetail, true); } #endregion #region 明细信息 if (!string.IsNullOrEmpty(strDetailFields)) { tableDetail.InnerHtml = WritePrintPageTable("销售退货单", strBaseFields, strDetailFields, aBase, aDetail, dt, dtDetail, false); } #endregion }
protected void LoadPrintInfo() { PrintParameterSettingModel pModel = new PrintParameterSettingModel(); pModel.CompanyCD = UserInfo.CompanyCD; pModel.BillTypeFlag = int.Parse(ConstUtil.BILL_TYPEFLAG_SUBSTORAGE); pModel.PrintTypeFlag = ConstUtil.PRINTBILL_TYPEFLAG_SUBSELLORDER; #region 初始化 取基本信息及明细信息的字段以及对应的标题 /*此处需注意在模板设置表里的字段和取基本信息的字段是否一致*/ string[,] aBase = { { "{ExtField1}", "ExtField1" }, { "{ExtField2}", "ExtField2" }, { "{ExtField3}", "ExtField3" }, { "{ExtField4}", "ExtField4" }, { "{ExtField5}", "ExtField5" }, { "{ExtField6}", "ExtField6" }, { "{ExtField7}", "ExtField7" }, { "{ExtField8}", "ExtField8" }, { "{ExtField9}", "ExtField9" }, { "{ExtField10}", "ExtField10" }, { "单据编号", "OrderNo" }, { "主题", "Title" }, { "销售分店", "DeptName" }, { "发货模式", "SendModeName" }, { "业务员", "SellerName" }, { "客户名称", "CustName" }, { "客户联系电话", "CustTel" }, { "客户手机号", "CustMobile" }, { "下单日期", "OrderDate" }, { "币种", "CurrencyName" }, { "汇率", "Rate" }, { "订货方式", "OrderMethodTypeName" }, { "交货方式", "TakeTypeTypeName" }, { "结算方式", "PayTypeTypeName" }, { "支付方式", "MoneyTypeTypeName" }, { "是否为增值税", "isAddTax" }, { "预约发货时间", "PlanOutDate" }, { "运送方式", "CarryTypeTypeName" }, { "配送部门", "OutDeptName" }, { "实际发货时间", "OutDate" }, { "发货人", "OutUserName" }, { "业务状态", "BusiStatusName" }, { "发货地址", "CustAddr" }, { "是否需要安装", "NeedSetup" }, { "预约安装时间", "PlanSetDate" }, { "实际安装时间", "SetDate" }, { "安装工人及联系电话", "SetUserInfo" }, { "数量总计", "CountTotal" }, { "金额合计", "TotalPrice" }, { "税额合计", "Tax" }, { "含税金额合计", "TotalFee" }, { "整单折扣", "Discount" }, { "折扣金额合计", "DiscountTotal" }, { "折后含税金额", "RealTotal" }, { "已结金额", "PayedTotal" }, { "货款余额", "WairPayTotal" }, { "制单人", "CreatorName" }, { "制单日期", "CreateDate" }, { "单据状态", "BillStatusName" }, { "确认人", "ConfirmorName" }, { "确认日期", "ConfirmDate" }, { "最后更新人", "ModifiedUserID" }, { "结单人", "CloserName" }, { "结单日期", "CloseDate" }, { "最后更新日期", "ModifiedDate" }, { "备注", "Remark" }, { "是否已建单", "isOpenbill" }, { "结算人", "SttlUserName" }, { "结算时间", "SttlDate" }, }; string[,] aDetail = { { "序号", "SortNo" }, { "物品编号", "ProductNo" }, { "物品名称", "ProductName" }, { "批次", "BatchNo" }, { "规格", "Specification" }, { "仓库", "StorageID" }, { "数量", "ProductCount" }, { "退货数量", "BackCount" }, { "单位", "UnitName" }, { "单价", "UnitPrice" }, { "含税价", "TaxPrice" }, { "折扣", "Discount" }, { "税率", "TaxRate" }, { "金额", "TotalPrice" }, { "含税金额", "TotalFee" }, { "税额", "TotalTax" } }; if (_isMoreUnit) {// 启用多计量单位 aDetail = new string[, ] { { "序号", "SortNo" }, { "物品编号", "ProductNo" }, { "物品名称", "ProductName" }, { "批次", "BatchNo" }, { "规格", "Specification" }, { "基本单位", "UnitName" }, { "基本数量", "ProductCount" }, { "仓库", "StorageID" }, { "数量", "UsedUnitCount" }, { "退货数量", "BackCount" }, { "单位", "UsedUnitName" }, { "单价", "UnitPrice" }, { "含税价", "TaxPrice" }, { "折扣", "Discount" }, { "税率", "TaxRate" }, { "金额", "TotalPrice" }, { "含税金额", "TotalFee" }, { "税额", "TotalTax" } }; } #endregion #region 1.扩展属性 DataTable dtExtTable = TableExtFieldsBus.GetAllList(UserInfo.CompanyCD, "", "officedba.SubSellOrder"); int countExt = 0; for (int i = 0; i < dtExtTable.Rows.Count; i++) { aBase[i, 0] = dtExtTable.Rows[i]["EFDesc"].ToString(); countExt++; } #endregion #region 2.所设的打印模板设置 DataTable dbPrint = XBase.Business.Common.PrintParameterSettingBus.GetPrintParameterSettingInfo(pModel); DataTable dt = SubSellOrderBus.GetSubSellOrderPrint(BillID); DataTable dtDetail = SubSellOrderBus.GetSubSellOrderDetailPrint(BillID); string strBaseFields = ""; string strDetailFields = ""; if (dbPrint.Rows.Count > 0) { isSeted.Value = "1"; strBaseFields = dbPrint.Rows[0]["BaseFields"].ToString(); strDetailFields = dbPrint.Rows[0]["DetailFields"].ToString(); } else { isSeted.Value = "0"; strBaseFields = GetDefaultFields(aBase); /*基本信息字段+扩展信息字段*/ if (countExt > 0) { for (int i = 0; i < countExt; i++) { strBaseFields += "|ExtField" + (i + 1); } } strDetailFields = GetDefaultFields(aDetail); } #endregion #region 3.主表信息 if (!string.IsNullOrEmpty(strBaseFields)) { tableBase.InnerHtml = WritePrintPageTable("销售订单", strBaseFields, strDetailFields, aBase, aDetail, dt, dtDetail, true); } #endregion #region 4.明细信息 if (!string.IsNullOrEmpty(strDetailFields)) { tableDetail.InnerHtml = WritePrintPageTable("销售订单", strBaseFields, strDetailFields, aBase, aDetail, dt, dtDetail, false); } #endregion }
protected void LoadPrintInfo() { PrintParameterSettingModel model = new PrintParameterSettingModel(); model.CompanyCD = UserInfo.CompanyCD; model.BillTypeFlag = int.Parse(ConstUtil.BILL_TYPEFLAG_PURCHASE); model.PrintTypeFlag = ConstUtil.PRINTBILL_TYPEFLAG_PurchaseReject; /*此处需注意在模板设置表里的字段和取基本信息的字段是否一致*/ string[,] aBase = { { "{ExtField1}", "ExtField1" }, { "{ExtField2}", "ExtField2" }, { "{ExtField3}", "ExtField3" }, { "{ExtField4}", "ExtField4" }, { "{ExtField5}", "ExtField5" }, { "{ExtField6}", "ExtField6" }, { "{ExtField7}", "ExtField7" }, { "{ExtField8}", "ExtField8" }, { "{ExtField9}", "ExtField9" }, { "{ExtField10}", "ExtField10" }, { "单据编号", "RejectNo" }, { "主题", "Title" }, { "采购类别", "TypeName" }, { "供应商", "ProviderName" }, { "部门", "DeptName" }, { "采购员", "PurchaserName" }, { "是否建单", "isOpenbillName" }, { "收货人", "ReceiveMan" }, { "收货人联系电话", "ReceiveTel" }, { "源单类型", "FromTypeName" }, { "支付方式", "MoneyTypeName" }, { "发货地址", "SendAddress" }, { "收货地址", "ReceiveOverAddress" }, { "是否为增值税", "isAddTaxName" }, { "交货方式", "TakeTypeName" }, { "运送方式", "CarryTypeName" }, { "结算方式", "PayTypeName" }, { "币种", "CurrencyTypeName" }, { "汇率", "Rate" }, { "退货时间", "RejectDate" }, { "所属项目", "ProjectName" }, { "数量总计", "CountTotal" }, { "金额总计", "TotalPrice" }, { "税额合计", "TotalTax" }, { "含税总额总计", "TotalFee" }, { "整单折扣", "Discount" }, { "折扣金额", "DiscountTotal" }, { "折后含税额", "RealTotal" }, { "抵应付帐款", "TotalDyfzk" }, { "应退货款合计", "TotalYthkhj" }, { "单据状态", "BillStatusName" }, { "制单人", "CreatorName" }, { "制单日期", "CreateDate" }, { "确认人", "ConfirmorName" }, { "确认日期", "ConfirmDate" }, { "结单人", "CloserName" }, { "结单日期", "CloseDate" }, { "最后更新人", "ModifiedUserID" }, { "最后更新日期", "ModifiedDate" }, { "备注", "Remark" }, }; string[,] aDetail = { { "序号", "SortNo" }, { "物品编号", "ProductNo" }, { "物品名称", "ProductName" }, { "规格", "Specification" }, { "颜色", "ColorName" }, { "单位", "UnitName" }, { "退货数量", "BackCount" }, { "金额", "TotalPrice" }, { "单价", "UnitPrice" }, { "含税价", "TaxPrice" }, { "税率", "TaxRate" }, { "含税金额", "TotalFee" }, { "税额", "TotalTax" }, }; if (_isMoreUnit) {// 启用多计量单位 aDetail = new string[, ] { { "序号", "SortNo" }, { "物品编号", "ProductNo" }, { "物品名称", "ProductName" }, { "规格", "Specification" }, { "颜色", "ColorName" }, { "基本单位", "UnitName" }, { "基本数量", "BackCount" }, { "单位", "UsedUnitName" }, { "退货数量", "UsedUnitCount" }, { "金额", "TotalPrice" }, { "单价", "UnitPrice" }, { "含税价", "TaxPrice" }, { "税率", "TaxRate" }, { "含税金额", "TotalFee" }, { "税额", "TotalTax" }, }; } #region 1.扩展属性 int countExt = 0; DataTable dtExtTable = TableExtFieldsBus.GetAllList(UserInfo.CompanyCD, "", "officedba." + ConstUtil.CODING_RULE_TABLE_PURCHASEREJECT); if (dtExtTable.Rows.Count > 0) { for (int i = 0; i < dtExtTable.Rows.Count; i++) { for (int x = 0; x < (aBase.Length / 2) - 15; x++) { if (x == i) { aBase[x, 0] = dtExtTable.Rows[i]["EFDesc"].ToString(); countExt++; } } } } #endregion DataTable dbPrint = XBase.Business.Common.PrintParameterSettingBus.GetPrintParameterSettingInfo(model); DataTable dtMRP = PurchaseRejectBus.SelectReject(this.intMrpID); string formType = string.Empty; if (dtMRP != null) { if (dtMRP.Rows.Count > 0) { formType = dtMRP.Rows[0]["FromType"] == null ? "" : dtMRP.Rows[0]["FromType"].ToString(); } } DataTable dtDetail = PurchaseRejectBus.Details(this.intMrpID, formType); string strBaseFields = ""; string strDetailFields = ""; if (dbPrint.Rows.Count > 0) { isSeted.Value = "1"; strBaseFields = dbPrint.Rows[0]["BaseFields"].ToString(); strDetailFields = dbPrint.Rows[0]["DetailFields"].ToString(); } else { isSeted.Value = "0"; strBaseFields = GetDefaultFields(aBase); /*基本信息字段+扩展信息字段*/ if (countExt > 0) { for (int i = 0; i < countExt; i++) { strBaseFields = strBaseFields + "|" + "ExtField" + (i + 1); } } strDetailFields = GetDefaultFields(aDetail); } #region 2.主表信息 if (!string.IsNullOrEmpty(strBaseFields)) { tableBase.InnerHtml = WritePrintPageTable("采购退货", strBaseFields, strDetailFields, aBase, aDetail, dtMRP, dtDetail, true); } #endregion #region 3.明细信息 if (!string.IsNullOrEmpty(strDetailFields)) { tableDetail.InnerHtml = WritePrintPageTable("采购退货", strBaseFields, strDetailFields, aBase, aDetail, dtMRP, dtDetail, false); } #endregion }
protected void LoadPrintInfo() { PrintParameterSettingModel pModel = new PrintParameterSettingModel(); pModel.CompanyCD = UserInfo.CompanyCD; pModel.BillTypeFlag = int.Parse(ConstUtil.BILL_TYPEFLAG_SUBSTORAGE); pModel.PrintTypeFlag = ConstUtil.PRINTBILL_TYPEFLAG_SUBSTORAGEIN; /*此处需注意在模板设置表里的字段和取基本信息的字段是否一致*/ string[,] aBase = { { "{ExtField1}", "ExtField1" }, { "{ExtField2}", "ExtField2" }, { "{ExtField3}", "ExtField3" }, { "{ExtField4}", "ExtField4" }, { "{ExtField5}", "ExtField5" }, { "{ExtField6}", "ExtField6" }, { "{ExtField7}", "ExtField7" }, { "{ExtField8}", "ExtField8" }, { "{ExtField9}", "ExtField9" }, { "{ExtField10}", "ExtField10" }, { "入库单编号", "InNo" }, { "入库单主题", "Title" }, { "分店名称", "DeptName" }, { "制单人", "CreatorName" }, { "制单日期", "CreateDate" }, { "单据状态", "BillStatusName" }, { "确认人", "ConfirmorName" }, { "确认日期", "ConfirmDate" }, { "最后更新人", "ModifiedUserID" }, { "最后更新日期", "ModifiedDate" }, { "备注", "Remark" }, }; string[,] aDetail = { { "序号", "SortNo" }, { "物品编号", "ProductNo" }, { "物品名称", "ProductName" }, { "批次", "BatchNo" }, { "规格", "standard" }, { "单位", "UnitName" }, { "入库数量", "SendCount" } }; if (_isMoreUnit) {// 启用多计量单位 aDetail = new string[, ] { { "序号", "SortNo" }, { "物品编号", "ProductNo" }, { "物品名称", "ProductName" }, { "批次", "BatchNo" }, { "规格", "standard" }, { "基本单位", "UnitName" }, { "基本数量", "SendCount" }, { "单位", "UsedUnitName" }, { "入库数量", "UsedUnitCount" } }; } #region 扩展属性 DataTable dtExtTable = TableExtFieldsBus.GetAllList(UserInfo.CompanyCD, "", "officedba.SubStorageIn"); int countExt = 0; for (int i = 0; i < dtExtTable.Rows.Count; i++) { aBase[i, 0] = dtExtTable.Rows[i]["EFDesc"].ToString(); countExt++; } #endregion DataTable dbPrint = XBase.Business.Common.PrintParameterSettingBus.GetPrintParameterSettingInfo(pModel); DataTable dt = SubStorageBus.SubStorageIn(intID); string deptID = UserInfo.DeptID.ToString(); DataRow dtDeptID = SubStorageDBHelper.GetSubDeptFromDeptID(UserInfo.DeptID.ToString()); if (dtDeptID != null) { deptID = dtDeptID["ID"].ToString(); } DataTable dtDetail = SubStorageBus.Details(intID, deptID); dtDetail.Columns.Add("SortNo", typeof(string)); for (int i = 0; i < dtDetail.Rows.Count; i++) { dtDetail.Rows[i]["SortNo"] = i + 1; } string strBaseFields = ""; string strDetailFields = ""; if (dbPrint.Rows.Count > 0) { isSeted.Value = "1"; strBaseFields = dbPrint.Rows[0]["BaseFields"].ToString(); strDetailFields = dbPrint.Rows[0]["DetailFields"].ToString(); } else { isSeted.Value = "0"; strBaseFields = GetDefaultFields(aBase); /*基本信息字段+扩展信息字段*/ if (countExt > 0) { for (int i = 0; i < countExt; i++) { strBaseFields += "|ExtField" + (i + 1); } } strDetailFields = GetDefaultFields(aDetail); } #region 主表信息 if (!string.IsNullOrEmpty(strBaseFields)) { tableBase.InnerHtml = WritePrintPageTable("分店期初库存", strBaseFields, strDetailFields, aBase, aDetail, dt, dtDetail, true); } #endregion #region 明细信息 if (!string.IsNullOrEmpty(strDetailFields)) { tableDetail.InnerHtml = WritePrintPageTable("分店期初库存", strBaseFields, strDetailFields, aBase, aDetail, dt, dtDetail, false); } #endregion }
protected void LoadPrintInfo() { PrintParameterSettingModel model = new PrintParameterSettingModel(); model.CompanyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD; model.BillTypeFlag = int.Parse(ConstUtil.BILL_TYPEFLAG_SALE); model.PrintTypeFlag = ConstUtil.PRINTBILL_SELLPLAN; SellPlanModel modelMRP = new SellPlanModel(); modelMRP.CompanyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD; modelMRP.ID = this.intMrpID; /*此处需注意在模板设置表里的字段和取基本信息的字段是否一致*/ string[,] aBase = { { "{ExtField1}", "ExtField1" }, { "{ExtField2}", "ExtField2" }, { "{ExtField3}", "ExtField3" }, { "{ExtField4}", "ExtField4" }, { "{ExtField5}", "ExtField5" }, { "{ExtField6}", "ExtField6" }, { "{ExtField7}", "ExtField7" }, { "{ExtField8}", "ExtField8" }, { "{ExtField9}", "ExtField9" }, { "{ExtField10}", "ExtField10" }, { "计划编号", "PlanNo" }, { "计划名称", "Title" }, { "计划类型", "PlanType" }, { "计划时期", "PlanTime" }, { "开始时间", "StartDate" }, { "结束时间", "EndDate" }, { "最低计划额(元)", "MinPlanTotal" }, { "计划总金额(元)", "PlanTotal" }, { "激励方案", "Hortation" }, { "可查看人员", "CanViewUserName" }, { "单据状态", "BillStatus" }, { "制单人", "Creator" }, { "制单日期 ", "CreateDate" }, { "确认人", "Confirmor" }, { "确认日期", "ConfirmDate" }, { "结单人", "Closer" }, { "结单日期", "CloseDate" }, { "最后更新人", "ModifiedUserID" }, { "最后更新日期", "ModifiedDate" }, { "备注", "Remark" }, }; string[,] aDetail = { { "部门/物品/人员", "DetailTypeName" }, { "名称", "DetailName" }, { "最低目标额(元)", "MinDetailotal" }, { "目标额(元)", "DetailTotal" }, { " 完成情况", "AddOrCutText2" }, { "目标达成率", "CompletePercent" }, }; #region 1.扩展属性 int countExt = 0; DataTable dtExtTable = TableExtFieldsBus.GetAllList(((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD, "", "officedba.SellPlan"); if (dtExtTable.Rows.Count > 0) { for (int i = 0; i < dtExtTable.Rows.Count; i++) { for (int x = 0; x < (aBase.Length / 2) - 15; x++) { if (x == i) { aBase[x, 0] = dtExtTable.Rows[i]["EFDesc"].ToString(); countExt++; } } } } #endregion DataTable dbPrint = XBase.Business.Common.PrintParameterSettingBus.GetPrintParameterSettingInfo(model); DataTable dtMRP = SellPlanBus.GetRepOrder(PlanNo); //主表 MRPBus.GetMRPInfo(modelMRP); DataTable dtDetail = SellPlanBus.GetOrderDetail(PlanNo); //明细表 MRPBus.GetMRPDetailInfo(modelMRP); string strBaseFields = ""; string strDetailFields = ""; if (dbPrint.Rows.Count > 0) { isSeted.Value = "1"; strBaseFields = dbPrint.Rows[0]["BaseFields"].ToString(); strDetailFields = dbPrint.Rows[0]["DetailFields"].ToString(); } else { isSeted.Value = "0"; strBaseFields = "PlanNo|Title|PlanType|PlanTime|StartDate|EndDate|MinPlanTotal|PlanTotal|Hortation|CanViewUserName|BillStatus|Creator|CreateDate|Confirmor|ConfirmDate|Closer|CloseDate|ModifiedUserID|ModifiedDate|Remark"; /*基本信息字段+扩展信息字段*/ if (countExt > 0) { for (int i = 0; i < countExt; i++) { strBaseFields = strBaseFields + "|" + "ExtField" + (i + 1); } } strDetailFields = "DetailTypeName|DetailName|MinDetailotal|DetailTotal|AddOrCutText2|CompletePercent"; } #region 主表信息 if (!string.IsNullOrEmpty(strBaseFields)) { tableBase.InnerHtml = WritePrintPageTable("销售计划", strBaseFields, strDetailFields, aBase, aDetail, dtMRP, dtDetail, true); } #endregion #region 明细信息 if (!string.IsNullOrEmpty(strDetailFields)) { tableDetail.InnerHtml = WritePrintPageTable("销售计划", strBaseFields, strDetailFields, aBase, aDetail, dtMRP, dtDetail, false); } #endregion }
protected void LoadPrintInfo() { PrintParameterSettingModel model = new PrintParameterSettingModel(); model.CompanyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD;//UserInfo.CompanyCD; model.BillTypeFlag = int.Parse(ConstUtil.BILL_TYPEFLAG_SALE); model.PrintTypeFlag = ConstUtil.PRINTBILL_TYPEFLAG_SELLBACK; // /*接受参数*/ string BackNo = Request.QueryString["no"].ToString(); #region 基本信息 明细信息 /*此处需注意在模板设置表里的字段和取基本信息的字段是否一致*/ string[,] aBase = { { "{ExtField1}", "ExtField1" }, { "{ExtField2}", "ExtField2" }, { "{ExtField3}", "ExtField3" }, { "{ExtField4}", "ExtField4" }, { "{ExtField5}", "ExtField5" }, { "{ExtField6}", "ExtField6" }, { "{ExtField7}", "ExtField7" }, { "{ExtField8}", "ExtField8" }, { "{ExtField9}", "ExtField9" }, { "{ExtField10}", "ExtField10" }, { "单据编号", "BackNo" }, { "主题", "Title" }, { "源单类型", "FromTypeText" }, { "源单编号", "SendNo" }, { "客户名称", "CustName" }, { "客户电话", "CustTel" }, { "业务类型", "BusiTypeName" }, { "结算方式", "PayTypeName" }, { "支付方式", "MoneyTypeName" }, { "运送方式", "CarryTypeName" }, { "币种", "CurrencyName" }, { "汇率", "Rate" }, { "业务员", "SellerName" }, { "部门", "DeptName" }, { "发货地址", "SendAddress" }, { "收货地址", "ReceiveAddress" }, { "退货日期", "BackDate" }, { "是否增值税", "isAddTaxName" }, { "所属项目", "ProjectName" }, { "金额合计", "TotalPrice" }, { "税额合计", "Tax" }, { "含税金额合计", "TotalFee" }, { "整单折扣(%)", "Discount" }, { "折后含税金额", "RealTotal" }, { "折扣金额", "DiscountTotal" }, { "退货数量合计", "CountTotal" }, { "抵应收货款", "NotPayTotal" }, { "单据状态", "BillStatusText" }, { "制单人", "CreatorName" }, { "制单日期", "CreateDate" }, { "确认人", "ConfirmorName" }, { "确认日期", "ConfirmDate" }, { "结单人", "CloserName" }, { "结单日期", "CloseDate" }, { "最后更新人", "ModifiedUserID" }, { "最后更新日期", "ModifiedDate" }, { "备注", "Remark" }, { "建单情况", "IsOpenbillText" }, { "结算状态", "IsAccText" }, { "已结算金额", "YAccounts" }, { "入库情况", "IsSendText" }, }; string[,] aDetail; //多计量单位 if (((UserInfoUtil)SessionUtil.Session["UserInfo"]).IsMoreUnit) { aDetail = new string[, ] { //{ "序号", "SortNo"}, { "物品编号", "ProdNo" }, { "物品名称", "ProductName" }, { "规格", "Specification" }, { "颜色", "ColorName" }, { "基本单位", "UnitName" }, //{ "交货期限(天)", "SendTime" }, { "基本数量", "BackNumber" }, { "单位", "UsedUnitName" }, { "退货数量", "UsedUnitCount" }, { "包装要求", "PackageName" }, { "单价", "UsedPrice" }, { "含税价", "TaxPrice" }, { "折扣(%)", "Discount" }, { "税率(%)", "TaxRate" }, { "含税金额", "TotalFee" }, { "金额", "TotalPrice" }, { "税额", "TotalTax" }, { "退货原因", "ReasonName" }, { "备注", "Remark" }, }; } else { aDetail = new string[, ] { //{ "序号", "SortNo"}, { "物品编号", "ProdNo" }, { "物品名称", "ProductName" }, { "规格", "Specification" }, { "颜色", "ColorName" }, { "单位", "UnitName" }, //{ "交货期限(天)", "SendTime" }, { "退货数量", "BackNumber" }, { "包装要求", "PackageName" }, { "单价", "UnitPrice" }, { "含税价", "TaxPrice" }, { "折扣(%)", "Discount" }, { "税率(%)", "TaxRate" }, { "含税金额", "TotalFee" }, { "金额", "TotalPrice" }, { "税额", "TotalTax" }, { "退货原因", "ReasonName" }, { "备注", "Remark" }, }; } ///*第二明细*/ //string[,] aSecondDetail = { // //{ "序号", "SortNo"}, // { "费用类别", "CodeName"}, // { "金额", "FeeTotal" }, // { "备注", "Remark"}, // }; #endregion #region 1.扩展属性 int countExt = 0; DataTable dtExtTable = TableExtFieldsBus.GetAllList(((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD, "", "officedba.SellBack"); if (dtExtTable.Rows.Count > 0) { for (int i = 0; i < dtExtTable.Rows.Count; i++) { for (int x = 0; x < (aBase.Length / 2) - 40; x++) { if (x == i) { aBase[x, 0] = dtExtTable.Rows[i]["EFDesc"].ToString(); countExt++; } } } } #endregion DataTable dbPrint = XBase.Business.Common.PrintParameterSettingBus.GetPrintParameterSettingInfo(model); DataTable dtMain = SellBackBus.GetRepOrder(BackNo); //获取主表数据 DataTable dtDetail = SellBackBus.GetRepOrderDetail(BackNo); //获取明细表数据:退货明细数据 //DataTable dtFee = SellOrderBus.GetRepOrderFee(OrderNo);//获取明细表:销售费用明细数据 string strBaseFields = ""; string strDetailFields = ""; ///*第二明细*/ //string strDetailSecondFields = ""; if (dbPrint.Rows.Count > 0) { isSeted.Value = "1"; strBaseFields = dbPrint.Rows[0]["BaseFields"].ToString(); strDetailFields = dbPrint.Rows[0]["DetailFields"].ToString(); ///*第二明细*/ //strDetailSecondFields = dbPrint.Rows[0]["DetailSecondFields"].ToString(); } else { isSeted.Value = "0"; strBaseFields = "BackNo|Title|FromTypeText|SendNo|CustName|CustTel|BusiTypeName|PayTypeName|MoneyTypeName|CarryTypeName|CurrencyName|Rate|"; strBaseFields = strBaseFields + "SellerName|DeptName|SendAddress|ReceiveAddress|BackDate|isAddTaxName|ProjectName|TotalPrice|Tax|TotalFee|Discount|"; strBaseFields = strBaseFields + "RealTotal|DiscountTotal|CountTotal|NotPayTotal|BillStatusText|CreatorName|CreateDate|ConfirmorName|ConfirmDate|CloserName|CloseDate|ModifiedUserID|ModifiedDate|Remark|"; strBaseFields = strBaseFields + "IsOpenbillText|IsAccText|YAccounts|IsSendText"; /*基本信息字段+扩展信息字段*/ if (countExt > 0) { for (int i = 0; i < countExt; i++) { strBaseFields = strBaseFields + "|" + "ExtField" + (i + 1); } } //多计量单位 if (((UserInfoUtil)SessionUtil.Session["UserInfo"]).IsMoreUnit) { /*订单明细SortNo|*/ strDetailFields = "ProdNo|ProductName|Specification|ColorName|UnitName|BackNumber|UsedUnitName|UsedUnitCount|PackageName|UsedPrice|TaxPrice|Discount|TaxRate|TotalFee|TotalPrice|TotalTax|ReasonName|Remark"; } else { /*订单明细SortNo|*/ strDetailFields = "ProdNo|ProductName|Specification|ColorName|UnitName|BackNumber|PackageName|UnitPrice|TaxPrice|Discount|TaxRate|TotalFee|TotalPrice|TotalTax|ReasonName|Remark"; } } #region 2.主表信息 if (!string.IsNullOrEmpty(strBaseFields)) { //第一个是打印页面的正标题,strBaseFields是在PrintParameterSetting表里设置的主表字段, //strDetailFields是在PrintParameterSetting表里设置的明细表的字段, //aBase,是打印设置页面上定义取出来的字段及对应的名称, //aDetail是打印设置页面上定义取出来的字段及对应的名称, //例如明细中的物品编号,对应的就是物品编号及取数据的字段ProdNo, //dtMRP是主表的数据集, //dtDetail是明细表的数据集,最后一个参数,用来区别是主表信息还是明细信息.. tableBase.InnerHtml = WritePrintPageTable("销售退货单", strBaseFields, strDetailFields, aBase, aDetail, dtMain, dtDetail, true); } #endregion #region 3.明细信息 if (!string.IsNullOrEmpty(strDetailFields)) { tableDetail.InnerHtml = WritePrintPageTable("销售退货单", strBaseFields, strDetailFields, aBase, aDetail, dtMain, dtDetail, false); } #endregion ///*第二明细*/ //#region 4.明细信息2 //if (!string.IsNullOrEmpty(strDetailSecondFields)) //{ // tableDetail2.InnerHtml = WritePrintPageTable("销售订单", strBaseFields, strDetailSecondFields, aBase, aSecondDetail, dtMain, dtFee, false); //} //#endregion }
protected void LoadPrintInfo() { PrintParameterSettingModel model = new PrintParameterSettingModel(); model.CompanyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD; model.BillTypeFlag = int.Parse(ConstUtil.BILL_TYPEFLAG_PURCHASE); model.PrintTypeFlag = ConstUtil.PRINTBILL_TYPEFLAG_PurchaseAskPrice; //PurchaseApplyModel modelMRP = new PurchaseApplyModel(); //PurchaseApplyModel.CompanyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD; //PurchaseApplyModel.ID = this.intMrpID; /*此处需注意在模板设置表里的字段和取基本信息的字段是否一致*/ string[,] aBase = { { "{ExtField1}", "ExtField1" }, { "{ExtField2}", "ExtField2" }, { "{ExtField3}", "ExtField3" }, { "{ExtField4}", "ExtField4" }, { "{ExtField5}", "ExtField5" }, { "{ExtField6}", "ExtField6" }, { "{ExtField7}", "ExtField7" }, { "{ExtField8}", "ExtField8" }, { "{ExtField9}", "ExtField9" }, { "{ExtField10}", "ExtField10" }, { "单据编号", "AskNo" }, { "主题", "AskTitle" }, { "采购类别", "TypeName" }, { "供应商", "ProviderName" }, { "部门", "DeptName" }, { "询价员", "AskUserName" }, { "询价日期", "AskDate" }, { "源单类型", "FromTypeName" }, { "币种", "CurrencyName" }, { "询价次数", "AskOrder" }, { "汇率", "Rate" }, { "是否为增值税", "ShowName" }, { "数量总计", "CountTotal" }, { "金额总计", "TotalPrice" }, { "税额合计", "TotalTax" }, { "含税总额总计", "TotalFee" }, { "整单折扣", "Discount" }, { "折扣金额", "DiscountTotal" }, { "折后含税额", "RealTotal" }, { "单据状态", "BillStatusName" }, { "制单人", "CreatorName" }, { "制单日期", "CreateDate" }, { "确认人", "ConfirmorName" }, { "确认日期", "ConfirmDate" }, { "结单人", "CloserName" }, { "结单日期", "CloseDate" }, { "最后更新人", "ModifiedUserID" }, { "最后更新日期", "ModifiedDate" }, { "备注", "Remark" }, }; string[,] aDetail; if (((UserInfoUtil)SessionUtil.Session["UserInfo"]).IsMoreUnit) { aDetail = new string[, ] { { "物品名称", "ProductName" }, { "颜色", "ColorName" }, { "基本数量", "ProductCount" }, { "交货日期", "RequireDate" }, { "基本单位", "UnitName" }, { "单价", "UsedPrice" }, { "含税价", "TaxPrice" }, { "单位", "UsedUnitName" }, { "计划数量", "UsedUnitCount" }, { "税率", "TaxRate" }, { "含税金额", "TotalFee" }, { "税额", "TotalTax" }, { "规格", "Specification" }, }; } else { aDetail = new string[, ] { { "物品名称", "ProductName" }, { "颜色", "ColorName" }, { "计划数量", "ProductCount" }, { "交货日期", "RequireDate" }, { "单位", "UnitName" }, { "单价", "UnitPrice" }, { "含税价", "TaxPrice" }, { "税率", "TaxRate" }, { "含税金额", "TotalFee" }, { "税额", "TotalTax" }, { "规格", "Specification" }, }; } /*第二明细*/ //string[,] aSecondDetail = { // }; #region 1.扩展属性 int countExt = 0; DataTable dtExtTable = TableExtFieldsBus.GetAllList(((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD, "", "officedba." + ConstUtil.CODING_RULE_TABLE_PURCHASEASKPRICE); if (dtExtTable.Rows.Count > 0) { for (int i = 0; i < dtExtTable.Rows.Count; i++) { for (int x = 0; x < (aBase.Length / 2) - 15; x++) { if (x == i) { aBase[x, 0] = dtExtTable.Rows[i]["EFDesc"].ToString(); countExt++; } } } } #endregion DataTable dbPrint = XBase.Business.Common.PrintParameterSettingBus.GetPrintParameterSettingInfo(model); DataTable dtMRP = PurchaseAskPriceBus.GetPurAskPricePriByID(this.intMrpID.ToString()); DataTable dtDetail = PurchaseAskPriceBus.GetPurAskPriceDetail(this.intMrpID.ToString()); //DataTable PurchaseApplyPrimary = PurchaseApplyBus.GetPurchaseApply(ID); //DataTable PurchaseApplySource = PurchaseApplyBus.GetPurchaseApplySource(ID); // DataTable PurchaseApplyDetail2 = PurchasePlanBus.GetPurchasePlanDetail(this.intMrpID.ToString()); string strBaseFields = ""; string strDetailFields = ""; /*第二明细*/ string strDetailSecondFields = ""; if (dbPrint.Rows.Count > 0) { isSeted.Value = "1"; strBaseFields = dbPrint.Rows[0]["BaseFields"].ToString(); strDetailFields = dbPrint.Rows[0]["DetailFields"].ToString(); /*第二明细*/ strDetailSecondFields = dbPrint.Rows[0]["DetailSecondFields"].ToString(); } else { isSeted.Value = "0"; strBaseFields = "AskNo|AskTitle|TypeName|ProviderName|ShowName|TotalTax|DeptName|AskUserName|AskDate|TotalFee|CurrencyName|AskOrder|Rate|FromTypeName|CountTotal|TotalPrice|CreatorName|CreateDate|BillStatusName|ConfirmorName|ConfirmDate|CloserName|CloseDate|ModifiedUserID|ModifiedDate|Remark|Discount|DiscountTotal|RealTotal"; /*基本信息字段+扩展信息字段*/ if (countExt > 0) { for (int i = 0; i < countExt; i++) { strBaseFields = strBaseFields + "|" + "ExtField" + (i + 1); } } if (((UserInfoUtil)SessionUtil.Session["UserInfo"]).IsMoreUnit) { strDetailFields = "ProductName|ColorName|ProductCount|RequireDate|UsedPrice|UnitName|UsedUnitName|UsedUnitCount|TaxPrice|TotalTax|TaxRate|TotalFee"; /*第二明细*/ strDetailSecondFields = "ProductName|ColorName|ProductCount|RequireDate|TotalTax|ProductCount|RequireDate|UsedPrice|UsedUnitName|UsedUnitCount|TotalPrice|OrderCount|UnitName|TaxPrice|Specification"; } else { strDetailFields = "ProductName|ColorName|ProductCount|RequireDate|UnitPrice|UnitName|TaxPrice|TotalTax|TaxRate|TotalFee"; /*第二明细*/ strDetailSecondFields = "ProductName|ColorName|ProductCount|RequireDate|TotalTax|ProductCount|RequireDate|UnitPrice|TotalPrice|OrderCount|UnitName|TaxPrice|Specification"; } } #region 2.主表信息 if (!string.IsNullOrEmpty(strBaseFields)) { tableBase.InnerHtml = WritePrintPageTable("采购询价", strBaseFields, strDetailFields, aBase, aDetail, dtMRP, dtDetail, true); } #endregion #region 3.明细信息 if (!string.IsNullOrEmpty(strDetailFields)) { tableDetail.InnerHtml = WritePrintPageTable("采购询价", strBaseFields, strDetailFields, aBase, aDetail, dtMRP, dtDetail, false); } #endregion /*第二明细*/ #region 4.明细信息2 //if (!string.IsNullOrEmpty(strDetailSecondFields)) //{ // tableDetail2.InnerHtml = WritePrintPageTable("采购询价", strBaseFields, strDetailSecondFields, aBase, aSecondDetail, dtMRP, PurchaseApplyDetail2, false); //} #endregion }
protected void LoadPrintInfo() { PrintParameterSettingModel model = new PrintParameterSettingModel(); model.CompanyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD; model.BillTypeFlag = int.Parse(ConstUtil.BILL_TYPEFLAG_SALE); model.PrintTypeFlag = ConstUtil.PRINTBILL_SELLOFFER; SellOfferModel modelMRP = new SellOfferModel(); modelMRP.CompanyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD; modelMRP.OfferNo = this.OfferNo; /*此处需注意在模板设置表里的字段和取基本信息的字段是否一致*/ string[,] aBase = { { "{ExtField1}", "ExtField1" }, { "{ExtField2}", "ExtField2" }, { "{ExtField3}", "ExtField3" }, { "{ExtField4}", "ExtField4" }, { "{ExtField5}", "ExtField5" }, { "{ExtField6}", "ExtField6" }, { "{ExtField7}", "ExtField7" }, { "{ExtField8}", "ExtField8" }, { "{ExtField9}", "ExtField9" }, { "{ExtField10}", "ExtField10" }, { "单据编号", "OfferNo" }, { "主题", "Title" }, { "源单类型", "FromTypeText" }, { "源单编号", "ChanceNo" }, { "客户名称", "CustName" }, { "客户电话", "CustTel" }, { "业务类型", "BusiTypeName" }, { "销售类别", "SellTypeName" }, { "结算方式", "PayTypeName" }, { "支付方式", "MoneyTypeName" }, { "交货方式", "TakeTypeName" }, { "运送方式", "CarryTypeName" }, { "币种", "CurrencyName" }, { "汇率", "Rate" }, { "业务员", "SellerName" }, { "部门", "DeptName" }, { "报价日期", "OfferDate" }, { "有效截止日期", "ExpireDate" }, { "报价次数", "QuoteTime" }, { "是否增值税", "isAddTaxName" }, //{ "是否被引用", "Remark"}, { "金额合计", "TotalPrice" }, { "税额合计", "TotalTax" }, { "含税金额合计", "TotalFee" }, { "整单折扣(%)", "Discount" }, { "折扣金额", "DiscountTotal" }, { "折后含税金额 ", "RealTotal" }, { "产品数量合计", "CountTotal" }, { "单据状态", "BillStatusText" }, { "制单人", "CreatorName" }, { "制单日期 ", "CreateDate" }, { "确认人", "ConfirmorName" }, { "确认日期", "ConfirmDate" }, { "结单人", "CloserName" }, { "结单日期", "CloseDate" }, { "最后更新人", "ModifiedUserID" }, { "最后更新日期", "ModifiedDate" }, { "交付说明", "DeliverRemark" }, { "包装运输说明", "PackTransit" }, { "付款说明", "PayRemark" }, { "备注", "Remark" }, }; string[,] aDetail; //多计量单位 if (((UserInfoUtil)SessionUtil.Session["UserInfo"]).IsMoreUnit) { aDetail = new string[, ] { { "物品编号", "ProdNo" }, { "物品名称", "ProductName" }, { "规格", "Specification" }, { "基本单位", "CodeName" }, { "基本数量", "ProductCount" }, { "单位", "UsedUnitName" }, { "数量", "UsedUnitCount" }, { "交货期限(天)", "SendTime" }, { "包装要求", "TypeName" }, { "单价", "UsedPrice" }, { "含税价", "TaxPrice" }, { "折扣(%)", "Discount" }, { "税率(%)", "TaxRate" }, { "含税金额", "TotalFee" }, { "金额", "TotalPrice" }, { "税额", "TotalTax" }, { "备注 ", "Remark" }, }; } else { aDetail = new string[, ] { { "物品编号", "ProdNo" }, { "物品名称", "ProductName" }, { "规格", "Specification" }, { "单位", "CodeName" }, { "数量", "ProductCount" }, { "交货期限(天)", "SendTime" }, { "包装要求", "TypeName" }, { "单价", "UnitPrice" }, { "含税价", "TaxPrice" }, { "折扣(%)", "Discount" }, { "税率(%)", "TaxRate" }, { "含税金额", "TotalFee" }, { "金额", "TotalPrice" }, { "税额", "TotalTax" }, { "备注 ", "Remark" }, }; } #region 1.扩展属性 int countExt = 0; DataTable dtExtTable = TableExtFieldsBus.GetAllList(((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD, "", "officedba.SellOffer"); if (dtExtTable.Rows.Count > 0) { for (int i = 0; i < dtExtTable.Rows.Count; i++) { for (int x = 0; x < (aBase.Length / 2) - 15; x++) { if (x == i) { aBase[x, 0] = dtExtTable.Rows[i]["EFDesc"].ToString(); countExt++; } } } } #endregion DataTable dbPrint = XBase.Business.Common.PrintParameterSettingBus.GetPrintParameterSettingInfo(model); DataTable dtMRP = SellOfferBus.GetRepOrder(OfferNo); //SellChanceBus.GetRepOrder(ChanceNo); DataTable dtDetail = SellOfferBus.GetRepOrderDetail(OfferNo); //SellPlanBus.GetOrderDetail(PlanNo); string strBaseFields = ""; string strDetailFields = ""; if (dbPrint.Rows.Count > 0) { isSeted.Value = "1"; strBaseFields = dbPrint.Rows[0]["BaseFields"].ToString(); strDetailFields = dbPrint.Rows[0]["DetailFields"].ToString(); } else { isSeted.Value = "0"; strBaseFields = "OfferNo|Title|FromTypeText|ChanceNo|CustName|CustTel|BusiTypeName|SellTypeName|PayTypeName|MoneyTypeName|" + "TakeTypeName|CarryTypeName|CurrencyName|Rate|SellerName|DeptName|OfferDate|ExpireDate|QuoteTime|isAddTaxName|TotalPrice|" + "TotalTax|TotalFee|Discount|DiscountTotal|RealTotal|CountTotal|BillStatusText|CreatorName|CreateDate|ConfirmorName|" + "ConfirmDate|CloserName|CloseDate|ModifiedUserID|ModifiedDate|DeliverRemark|PackTransit|PayRemark|Remark"; /*基本信息字段+扩展信息字段*/ if (countExt > 0) { for (int i = 0; i < countExt; i++) { strBaseFields = strBaseFields + "|" + "ExtField" + (i + 1); } } //多计量单位 if (((UserInfoUtil)SessionUtil.Session["UserInfo"]).IsMoreUnit) { strDetailFields = "ProdNo|ProductName|Specification|CodeName|ProductCount|UsedUnitName|UsedUnitCount|SendTime|TypeName|UsedPrice|TaxPrice|Discount|" + "TaxRate|TotalFee|TotalPrice|TotalTax|Remark"; } else { strDetailFields = "ProdNo|ProductName|Specification|CodeName|ProductCount|SendTime|TypeName|UnitPrice|TaxPrice|Discount|" + "TaxRate|TotalFee|TotalPrice|TotalTax|Remark"; } } #region 主表信息 if (!string.IsNullOrEmpty(strBaseFields)) { tableBase.InnerHtml = WritePrintPageTable("销售报价", strBaseFields, strDetailFields, aBase, aDetail, dtMRP, dtDetail, true); } #endregion #region 明细信息 if (!string.IsNullOrEmpty(strDetailFields)) { tableDetail.InnerHtml = WritePrintPageTable("销售报价", strBaseFields, strDetailFields, aBase, aDetail, dtMRP, dtDetail, false); } #endregion }
protected void LoadPrintInfo() { PrintParameterSettingModel model = new PrintParameterSettingModel(); model.CompanyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD; model.BillTypeFlag = int.Parse(ConstUtil.BILL_TYPEFLAG_SALE); model.PrintTypeFlag = ConstUtil.PRINTBILL_SELLCHANCE; SellChanceModel modelMRP = new SellChanceModel(); modelMRP.CompanyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD; modelMRP.ChanceNo = this.ChanceNo; /*此处需注意在模板设置表里的字段和取基本信息的字段是否一致*/ string[,] aBase = { { "{ExtField1}", "ExtField1" }, { "{ExtField2}", "ExtField2" }, { "{ExtField3}", "ExtField3" }, { "{ExtField4}", "ExtField4" }, { "{ExtField5}", "ExtField5" }, { "{ExtField6}", "ExtField6" }, { "{ExtField7}", "ExtField7" }, { "{ExtField8}", "ExtField8" }, { "{ExtField9}", "ExtField9" }, { "{ExtField10}", "ExtField10" }, { "机会编号", "ChanceNo" }, { "机会主题", "Title" }, { "机会类型", "ChanceTypeName" }, { "客户名称", "CustName" }, { "客户电话", "CustTel" }, { "客户类型", "CustTypeName" }, { "机会来源", "HapSourceName" }, { "发现日期", "FindDate" }, { "业务员", "SellerName" }, { "部门", "DeptName" }, { "提供人", "ProvideMan" }, { "需求描述", "Requires" }, { "可查看该机会人员", "CanViewUserName" }, { "提醒时间", "RemindTime" }, { "提醒手机号", "RemindMTel" }, { "接收人", "ReceiverName" }, { "提醒内容", "RemindContent" }, { "预期金额", "IntendMoney" }, { "预期签单日", "IntendDate" }, { "制单人", "CreatorName" }, { "制单日期", "CreateDate" }, { "最后更新人", "ModifiedUserID" }, { "最后更新日期", "ModifiedDate" }, { "是否被报价", "IsQuotedName" }, { "备注", "Remark" }, }; string[,] aDetail = { { "阶段", "PhaseName" }, { "日期", "PushDate" }, { "业务员", "EmployeeName" }, { "状态", "StateName" }, { "可能性", "TypeName" }, { "阶段备注", "Remark" }, }; #region 1.扩展属性 int countExt = 0; DataTable dtExtTable = TableExtFieldsBus.GetAllList(((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD, "", "officedba.SellChance"); if (dtExtTable.Rows.Count > 0) { for (int i = 0; i < dtExtTable.Rows.Count; i++) { for (int x = 0; x < (aBase.Length / 2) - 15; x++) { if (x == i) { aBase[x, 0] = dtExtTable.Rows[i]["EFDesc"].ToString(); countExt++; } } } } #endregion DataTable dbPrint = XBase.Business.Common.PrintParameterSettingBus.GetPrintParameterSettingInfo(model); DataTable dtMRP = SellChanceBus.GetRepOrder(ChanceNo); // SellPlanBus.GetRepOrder(PlanNo); DataTable dtDetail = SellChanceBus.GetRepOrderDetail(ChanceNo); //SellPlanBus.GetOrderDetail(PlanNo); string strBaseFields = ""; string strDetailFields = ""; if (dbPrint.Rows.Count > 0) { isSeted.Value = "1"; strBaseFields = dbPrint.Rows[0]["BaseFields"].ToString(); strDetailFields = dbPrint.Rows[0]["DetailFields"].ToString(); } else { isSeted.Value = "0"; strBaseFields = "ChanceNo|Title|ChanceTypeName|CustName|CustTel|CustTypeName|HapSourceName|FindDate|SellerName|DeptName|ProvideMan|Requires|CanViewUserName|RemindTime|RemindMTel|ReceiverName|RemindContent|IntendMoney|IntendDate|CreatorName|CreateDate|ModifiedUserID|ModifiedDate|IsQuotedName|Remark"; /*基本信息字段+扩展信息字段*/ if (countExt > 0) { for (int i = 0; i < countExt; i++) { strBaseFields = strBaseFields + "|" + "ExtField" + (i + 1); } } strDetailFields = "PhaseName|PushDate|EmployeeName|StateName|TypeName|Remark"; } #region 主表信息 if (!string.IsNullOrEmpty(strBaseFields)) { tableBase.InnerHtml = WritePrintPageTable("销售机会", strBaseFields, strDetailFields, aBase, aDetail, dtMRP, dtDetail, true); } #endregion #region 明细信息 if (!string.IsNullOrEmpty(strDetailFields)) { tableDetail.InnerHtml = WritePrintPageTable("销售机会", strBaseFields, strDetailFields, aBase, aDetail, dtMRP, dtDetail, false); } #endregion }
protected void LoadPrintInfo() { PrintParameterSettingModel pModel = new PrintParameterSettingModel(); pModel.CompanyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD; pModel.BillTypeFlag = int.Parse(ConstUtil.BILL_TYPEFLAG_QUALITYCHECK); pModel.PrintTypeFlag = ConstUtil.PRINTBILL_TYPEFLAG_QUALITYADD; StorageQualityCheckApplay model = new StorageQualityCheckApplay(); model.CompanyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD; model.ID = this.intID; /*此处需注意在模板设置表里的字段和取基本信息的字段是否一致*/ string[,] aBase = { { "{ExtField1}", "ExtField1" }, { "{ExtField2}", "ExtField2" }, { "{ExtField3}", "ExtField3" }, { "{ExtField4}", "ExtField4" }, { "{ExtField5}", "ExtField5" }, { "{ExtField6}", "ExtField6" }, { "{ExtField7}", "ExtField7" }, { "{ExtField8}", "ExtField8" }, { "{ExtField9}", "ExtField9" }, { "{ExtField10}", "ExtField10" }, { "单据编号", "ApplyNo" }, { "主题", "Title" }, { "源单类型", "FromType" }, { "往来单位", "CustName" }, { "往来单位大类", "CustBigTypeName" }, { "质检类别", "CheckType" }, { "生产负责人", "PrincipalName" }, { "生产部门", "DeptName" }, { "检验方式", "CheckMode" }, { "报检人员", "CheckerName" }, { "报检部门", "CheckDeptName" }, { "报检日期", "CheckDate" }, { "报检数量合计", "CountTotal" }, { "单据状态", "BillStatusName" }, { "制单人", "CreatorName" }, { "制单日期", "CreateDate" }, { "确认人", "ConfirmorName" }, { "确认日期", "ConfirmDate" }, { "结单人", "CloserName" }, { "结单日期", "CloseDate" }, { "最后更新人", "ModifiedUserID" }, { "最后更新日期", "ModifiedDate" }, { "备注", "Remark" }, }; string[,] aDetail = { { "序号", "SortNo" }, { "物品名称", "ProductName" }, { "物品编号", "ProdNo" }, { "单位", "CodeName" }, { "报检数量", "ProductCount" }, { "已报检数量", "CheckedCount" }, { "已检数量", "RealCheckedCount" }, { "备注", "Remark" } }; if (_isMoreUnit) {// 启用多计量单位 aDetail = new string[, ] { { "序号", "SortNo" }, { "物品名称", "ProductName" }, { "物品编号", "ProdNo" }, { "基本单位", "CodeName" }, { "基本数量", "ProductCount" }, { "单位", "UsedUnitName" }, { "报检数量", "UsedUnitCount" }, { "已报检数量", "CheckedCount" }, { "已检数量", "RealCheckedCount" }, { "备注", "Remark" } }; } #region 扩展属性 DataTable dtExtTable = TableExtFieldsBus.GetAllList(((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD, "", "officedba.QualityCheckApplay"); int countExt = 0; for (int i = 0; i < dtExtTable.Rows.Count; i++) { aBase[i, 0] = dtExtTable.Rows[i]["EFDesc"].ToString(); countExt++; } #endregion DataTable dbPrint = XBase.Business.Common.PrintParameterSettingBus.GetPrintParameterSettingInfo(pModel); DataTable dt = StorageQualityCheckPro.GetOneQuality(model.ID, model.CompanyCD); Convert(dt); DataTable dtDetail = StorageQualityCheckPro.GetQualityDetail(model.ID, model.CompanyCD); string strBaseFields = ""; string strDetailFields = ""; if (dbPrint.Rows.Count > 0) { isSeted.Value = "1"; strBaseFields = dbPrint.Rows[0]["BaseFields"].ToString(); strDetailFields = dbPrint.Rows[0]["DetailFields"].ToString(); } else { isSeted.Value = "0"; strBaseFields = GetDefaultFields(aBase); /*基本信息字段+扩展信息字段*/ for (int i = 0; i < countExt; i++) { strBaseFields += "|ExtField" + (i + 1); } strDetailFields = GetDefaultFields(aDetail); } #region 主表信息 if (!string.IsNullOrEmpty(strBaseFields)) { tableBase.InnerHtml = WritePrintPageTable("质检申请单", strBaseFields, strDetailFields, aBase, aDetail, dt, dtDetail, true); } #endregion #region 明细信息 if (!string.IsNullOrEmpty(strDetailFields)) { tableDetail.InnerHtml = WritePrintPageTable("质检申请单", strBaseFields, strDetailFields, aBase, aDetail, dt, dtDetail, false); } #endregion }
protected void LoadPrintInfo() { PrintParameterSettingModel pModel = new PrintParameterSettingModel(); pModel.CompanyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD; pModel.BillTypeFlag = int.Parse(ConstUtil.BILL_TYPEFLAG_QUALITYCHECK); pModel.PrintTypeFlag = ConstUtil.PRINTBILL_TYPEFLAG_CHECKREPORT; /*此处需注意在模板设置表里的字段和取基本信息的字段是否一致*/ string[,] aBase = { { "{ExtField1}", "ExtField1" }, { "{ExtField2}", "ExtField2" }, { "{ExtField3}", "ExtField3" }, { "{ExtField4}", "ExtField4" }, { "{ExtField5}", "ExtField5" }, { "{ExtField6}", "ExtField6" }, { "{ExtField7}", "ExtField7" }, { "{ExtField8}", "ExtField8" }, { "{ExtField9}", "ExtField9" }, { "{ExtField10}", "ExtField10" }, { "单据编号", "ReportNo" }, { "主题", "Title" }, { "源单类型", "FromType" }, { "源单编号", "FromReportNo" }, { "往来单位", "OtherCorpName" }, { "往来单位大类", "CorpBigType" }, { "生产负责人", "PrincipalName" }, { "生产部门", "DeptName" }, { "质检类别", "CheckType" }, { "检验日期", "CheckDate" }, { "报检人员", "ApplyUserName" }, { "报检部门", "ApplyDeptName" }, { "检验人员", "CheckerName" }, { "检验部门", "CheckDeptName" }, { "检验方案", "CheckContent" }, { "物品编号", "ProdNo" }, { "物品名称", "ProductName" }, { "单位", "CodeName" }, { "规格", "Specification" }, { "报检数量", "CheckNum" }, { "抽样数量", "SampleNum" }, { "检验方式", "CheckMode" }, { "合格数量", "PassNum" }, { "不合格数量", "NoPass" }, { "合格率(%)", "PassPercent" }, { "检验标准", "CheckStandard" }, { "检验结果描述 ", "CheckResult" }, { "检验结果 ", "IsPass" }, { "是否需要复检", "isRecheck" }, { "单据状态", "BillStatus" }, { "制单人", "CreatorName" }, { "制单日期", "CreateDate" }, { "确认人", "ConfirmorName" }, { "确认日期", "ConfirmDate" }, { "结单人", "CloserName" }, { "结单日期", "CloseDate" }, { "最后更新人", "ModifiedUserID" }, { "最后更新日期", "ModifiedDate" }, { "备注", "Remark" }, }; string[,] aDetail = { { "序号", "SortNo" }, { "检验项目", "CheckItem" }, { "检验指标", "CheckStandard" }, { "检验值", "CheckValue" }, { "检验结论", "CheckResult" }, { "检验结果", "isPass" }, { "检验数量", "CheckNum" }, { "合格数量", "PassNum" }, { "不合格数", "NotPassNum" }, { "检验人员", "Checker" }, { "检验部门", "CheckDeptID" }, { "标准值", "StandardValue" }, { "指标上限", "NormUpLimit" }, { "指标下限", "LowerLimit" }, { "备注", "Remark" }, }; #region 扩展属性 DataTable dtExtTable = TableExtFieldsBus.GetAllList(((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD, "", "officedba.QualityCheckReport"); int countExt = 0; for (int i = 0; i < dtExtTable.Rows.Count; i++) { aBase[i, 0] = dtExtTable.Rows[i]["EFDesc"].ToString(); countExt++; } #endregion DataTable dbPrint = XBase.Business.Common.PrintParameterSettingBus.GetPrintParameterSettingInfo(pModel); DataTable dt = CheckReportBus.GetReportInfo(this.intID); DataTable dtDetail = CheckReportBus.GetDetailInfo(this.intID); dtDetail.Columns.Add("SortNo", typeof(string)); for (int i = 0; i < dtDetail.Rows.Count; i++) { dtDetail.Rows[i]["SortNo"] = i + 1; } string strBaseFields = ""; string strDetailFields = ""; if (dbPrint.Rows.Count > 0) { isSeted.Value = "1"; strBaseFields = dbPrint.Rows[0]["BaseFields"].ToString(); strDetailFields = dbPrint.Rows[0]["DetailFields"].ToString(); } else { isSeted.Value = "0"; strBaseFields = GetDefaultFields(aBase); /*基本信息字段+扩展信息字段*/ if (countExt > 0) { for (int i = 0; i < countExt; i++) { strBaseFields += "|ExtField" + (i + 1); } } strDetailFields = GetDefaultFields(aDetail); } #region 主表信息 if (!string.IsNullOrEmpty(strBaseFields)) { tableBase.InnerHtml = WritePrintPageTable("质检报告单", strBaseFields, strDetailFields, aBase, aDetail, dt, dtDetail, true); } #endregion #region 明细信息 if (!string.IsNullOrEmpty(strDetailFields)) { tableDetail.InnerHtml = WritePrintPageTable("质检报告单", strBaseFields, strDetailFields, aBase, aDetail, dt, dtDetail, false); } #endregion }
protected void LoadPrintInfo() { PrintParameterSettingModel model = new PrintParameterSettingModel(); model.CompanyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD;//UserInfo.CompanyCD; model.BillTypeFlag = int.Parse(ConstUtil.BILL_TYPEFLAG_SALE); model.PrintTypeFlag = ConstUtil.PRINTBILL_TYPEFLAG_SELLSEND; // /*接受参数*/ string SendNo = Request.QueryString["no"].ToString(); #region 基本信息 明细信息 /*此处需注意在模板设置表里的字段和取基本信息的字段是否一致*/ string[,] aBase = { { "{ExtField1}", "ExtField1" }, { "{ExtField2}", "ExtField2" }, { "{ExtField3}", "ExtField3" }, { "{ExtField4}", "ExtField4" }, { "{ExtField5}", "ExtField5" }, { "{ExtField6}", "ExtField6" }, { "{ExtField7}", "ExtField7" }, { "{ExtField8}", "ExtField8" }, { "{ExtField9}", "ExtField9" }, { "{ExtField10}", "ExtField10" }, { "单据编号", "SendNo" }, { "主题", "Title" }, { "源单类型", "FromTypeText" }, { "源单编号", "OrderNo" }, { "客户名称", "CustName" }, { "业务类型", "BusiTypeName" }, { "销售类别", "SellTypeName" }, { "结算方式", "PayTypeName" }, { "支付方式", "MoneyTypeName" }, { "交货方式", "TakeTypeName" }, { "运送方式", "CarryTypeName" }, { "币种", "CurrencyName" }, { "汇率", "Rate" }, { "业务员", "SellerName" }, { "部门", "DeptName" }, { "收货人姓名", "Receiver" }, { "发货人", "SenderName" }, { "预计发货时间", "IntendSendDate" }, { "发货地址", "SendAddr" }, { "收货地址", "ReceiveAddr" }, { "收货人电话", "Tel" }, { "收货人移动电话", "Modile" }, { "收货人邮编", "Post" }, { "是否增值税", "isAddTaxName" }, { "所属项目", "ProjectName" }, { "可查看人员", "CanViewUserName" }, { "金额合计", "TotalPrice" }, { "税额合计", "Tax" }, { "含税金额合计", "TotalFee" }, { "整单折扣(%)", "Discount" }, { "折扣含税金额", "RealTotal" }, { "折扣合计", "DiscountTotal" }, { "发货数量合计", "CountTotal" }, { "单据状态", "BillStatusText" }, { "制单人", "CreatorName" }, { "制单日期", "CreateDate" }, { "确认人", "ConfirmorName" }, { "确认日期", "ConfirmDate" }, { "结单人", "CloserName" }, { "结单日期", "CloseDate" }, { "最后更新人", "ModifiedUserID" }, { "最后更新日期", "ModifiedDate" }, { "备注", "Remark" }, { "包装运输说明", "PackTransit" }, { "付款说明", "PayRemark" }, { "交付说明", "DeliverRemark" }, { "运输商", "TransporterName" }, { "运费合计", "TransportFee" }, { "运费结算方式", "TransPayTypeName" }, }; string[,] aDetail; //多计量单位 if (((UserInfoUtil)SessionUtil.Session["UserInfo"]).IsMoreUnit) { aDetail = new string[, ] { //{ "序号", "SortNo"}, { "物品编号", "ProdNo" }, { "物品名称", "ProductName" }, { "规格", "Specification" }, { "颜色", "ColorName" }, { "基本单位", "UnitName" }, { "基本数量", "ProductCount" }, { "单位", "UsedUnitName" }, { "数量", "UsedUnitCount" }, { "发货日期", "SendDate" }, { "包装要求", "PackageName" }, { "单价", "UsedPrice" }, { "含税价", "TaxPrice" }, { "折扣(%)", "Discount" }, { "税率(%)", "TaxRate" }, { "含税金额", "TotalFee" }, { "金额", "TotalPrice" }, { "税额", "TotalTax" }, { "备注", "Remark" }, }; } else { aDetail = new string[, ] { //{ "序号", "SortNo"}, { "物品编号", "ProdNo" }, { "物品名称", "ProductName" }, { "规格", "Specification" }, { "颜色", "ColorName" }, { "单位", "UnitName" }, { "数量", "ProductCount" }, { "发货日期", "SendDate" }, { "包装要求", "PackageName" }, { "单价", "UnitPrice" }, { "含税价", "TaxPrice" }, { "折扣(%)", "Discount" }, { "税率(%)", "TaxRate" }, { "含税金额", "TotalFee" }, { "金额", "TotalPrice" }, { "税额", "TotalTax" }, { "备注", "Remark" }, }; } #endregion #region 1.扩展属性 int countExt = 0; DataTable dtExtTable = TableExtFieldsBus.GetAllList(((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD, "", "officedba.SellSend"); if (dtExtTable.Rows.Count > 0) { for (int i = 0; i < dtExtTable.Rows.Count; i++) { for (int x = 0; x < (aBase.Length / 2) - 47; x++) { if (x == i) { aBase[x, 0] = dtExtTable.Rows[i]["EFDesc"].ToString(); countExt++; } } } } #endregion DataTable dbPrint = XBase.Business.Common.PrintParameterSettingBus.GetPrintParameterSettingInfo(model); DataTable dtMain = SellSendBus.GetRepOrder(SendNo); //获取主表数据 DataTable dtDetail = SellSendBus.GetRepOrderDetail(SendNo); //获取明细表:订单明细数据 string strBaseFields = ""; string strDetailFields = ""; if (dbPrint.Rows.Count > 0) { isSeted.Value = "1"; strBaseFields = dbPrint.Rows[0]["BaseFields"].ToString(); strDetailFields = dbPrint.Rows[0]["DetailFields"].ToString(); } else { isSeted.Value = "0"; strBaseFields = "SendNo|Title|FromTypeText|OrderNo|CustName|BusiTypeName|SellTypeName|PayTypeName|MoneyTypeName|TakeTypeName|CarryTypeName|CurrencyName|Rate|"; strBaseFields = strBaseFields + "SellerName|DeptName|Receiver|SenderName|IntendSendDate|SendAddr|ReceiveAddr|Tel|Modile|Post|isAddTaxName|ProjectName|CanViewUserName|TotalPrice|Tax|TotalFee|Discount|"; strBaseFields = strBaseFields + "RealTotal|DiscountTotal|CountTotal|BillStatusText|CreatorName|CreateDate|ConfirmorName|ConfirmDate|CloserName|CloseDate|ModifiedUserID|ModifiedDate|Remark|"; strBaseFields = strBaseFields + "PackTransit|PayRemark|DeliverRemark|TransporterName|TransportFee|TransPayTypeName"; /*基本信息字段+扩展信息字段*/ if (countExt > 0) { for (int i = 0; i < countExt; i++) { strBaseFields = strBaseFields + "|" + "ExtField" + (i + 1); } } //多计量单位 if (((UserInfoUtil)SessionUtil.Session["UserInfo"]).IsMoreUnit) { /*订单明细SortNo|*/ strDetailFields = "ProdNo|ProductName|Specification|ColorName|UnitName|ProductCount|UsedUnitName|UsedUnitCount|SendDate|PackageName|UsedPrice|TaxPrice|Discount|TaxRate|TotalFee|TotalPrice|TotalTax|Remark"; } else { /*订单明细SortNo|*/ strDetailFields = "ProdNo|ProductName|Specification|ColorName|UnitName|ProductCount|SendDate|PackageName|UnitPrice|TaxPrice|Discount|TaxRate|TotalFee|TotalPrice|TotalTax|Remark"; } } #region 2.主表信息 if (!string.IsNullOrEmpty(strBaseFields)) { //第一个是打印页面的正标题,strBaseFields是在PrintParameterSetting表里设置的主表字段, //strDetailFields是在PrintParameterSetting表里设置的明细表的字段, //aBase,是打印设置页面上定义取出来的字段及对应的名称, //aDetail是打印设置页面上定义取出来的字段及对应的名称, //例如明细中的物品编号,对应的就是物品编号及取数据的字段ProdNo, //dtMRP是主表的数据集, //dtDetail是明细表的数据集,最后一个参数,用来区别是主表信息还是明细信息.. tableBase.InnerHtml = WritePrintPageTable("销售发货单", strBaseFields, strDetailFields, aBase, aDetail, dtMain, dtDetail, true); } #endregion #region 3.明细信息 if (!string.IsNullOrEmpty(strDetailFields)) { tableDetail.InnerHtml = WritePrintPageTable("销售发货单", strBaseFields, strDetailFields, aBase, aDetail, dtMain, dtDetail, false); } #endregion }
protected void LoadPrintInfo() { PrintParameterSettingModel pModel = new PrintParameterSettingModel(); pModel.CompanyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD; pModel.BillTypeFlag = int.Parse(ConstUtil.BILL_TYPEFLAG_QUALITYCHECK); pModel.PrintTypeFlag = ConstUtil.PRINTBILL_TYPEFLAG_NOPASS; /*此处需注意在模板设置表里的字段和取基本信息的字段是否一致*/ string[,] aBase = { { "{ExtField1}", "ExtField1" }, { "{ExtField2}", "ExtField2" }, { "{ExtField3}", "ExtField3" }, { "{ExtField4}", "ExtField4" }, { "{ExtField5}", "ExtField5" }, { "{ExtField6}", "ExtField6" }, { "{ExtField7}", "ExtField7" }, { "{ExtField8}", "ExtField8" }, { "{ExtField9}", "ExtField9" }, { "{ExtField10}", "ExtField10" }, { "单据编号", "ProcessNo" }, { "单据主题", "Title" }, { "源单类型", "FromType" }, { "质检报告单", "ReportNO" }, { "处置负责人", "ExecutorName" }, { "处理日期", "ProcessDate" }, { "物品名称", "ProductName" }, { "物品编号", "ProdNo" }, { "规格", "Specification" }, { "单位", "CodeName" }, { "不合格数量", "NoPass" }, { "单据状态", "BillStatus" }, { "制单人", "CreatorName" }, { "制单日期", "CreateDate" }, { "确认人", "ConfirmorName" }, { "确认日期", "ConfirmDate" }, { "结单人", "CloserName" }, { "结单日期", "CloseDate" }, { "最后更新人", "ModifiedUserID" }, { "最后更新日期", "ModifiedDate" }, { "备注", "Remark" }, }; string[,] aDetail = { { "不合格原因", "ReasonID" }, { "数量", "NotPassNum" }, { "处置方式", "ProcessWay" }, { "比率(%)", "Rate" }, { "备注", "Remark" } }; #region 扩展属性 DataTable dtExtTable = TableExtFieldsBus.GetAllList(((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD, "", "officedba.CheckNotPass"); int countExt = 0; for (int i = 0; i < dtExtTable.Rows.Count; i++) { aBase[i, 0] = dtExtTable.Rows[i]["EFDesc"].ToString(); countExt++; } #endregion DataTable dbPrint = XBase.Business.Common.PrintParameterSettingBus.GetPrintParameterSettingInfo(pModel); DataTable dt = CheckNotPassBus.GetNoPassInfo(intID); DataTable dtDetail = CheckNotPassBus.GetNoPassDetailInfo(intID); string strBaseFields = ""; string strDetailFields = ""; if (dbPrint.Rows.Count > 0) { isSeted.Value = "1"; strBaseFields = dbPrint.Rows[0]["BaseFields"].ToString(); strDetailFields = dbPrint.Rows[0]["DetailFields"].ToString(); } else { isSeted.Value = "0"; strBaseFields = GetDefaultFields(aBase); /*基本信息字段+扩展信息字段*/ if (countExt > 0) { for (int i = 0; i < countExt; i++) { strBaseFields += "|ExtField" + (i + 1); } } strDetailFields = GetDefaultFields(aDetail); } #region 主表信息 if (!string.IsNullOrEmpty(strBaseFields)) { tableBase.InnerHtml = WritePrintPageTable("不合格品处置单", strBaseFields, strDetailFields, aBase, aDetail, dt, dtDetail, true); } #endregion #region 明细信息 if (!string.IsNullOrEmpty(strDetailFields)) { tableDetail.InnerHtml = WritePrintPageTable("不合格品处置单", strBaseFields, strDetailFields, aBase, aDetail, dt, dtDetail, false); } #endregion }