Exemplo n.º 1
0
    protected void btnImport_Click(object sender, ImageClickEventArgs e)
    {
        string orderString = hidOrderby.Value.Trim();                                                                                //排序
        string order       = "DESC";                                                                                                 //排序:升序
        string orderBy     = (!string.IsNullOrEmpty(orderString)) ? orderString.Substring(0, orderString.Length - 2) : "CreateDate"; //要排序的字段,如果为空,默认为"ID"

        if (orderString.EndsWith("_a"))
        {
            order = "ASC";//排序:降序
        }
        if (string.IsNullOrEmpty(hidPageCount.Value.Trim()))
        {
        }
        else
        {
            int pageCount  = int.Parse(hidPageCount.Value.Trim()); //每页显示记录数
            int pageIndex  = int.Parse(hidPageIndex.Value.Trim()); //当前页
            int skipRecord = (pageIndex - 1) * pageCount;          //跳过记录数

            string day = txtStartPlanDate.Value.Trim();

            int TotalCount = 0;

            orderBy = orderBy + " " + order;
            DataTable dt = DayEndBus.SelectDayInfo(pageIndex, pageCount, orderBy, ref TotalCount, day);


            //导出标题
            string   headerTitle = "日期|物品编号|品名|规格|批次|仓库|入库总数量|出库总数量|当日结存量";
            string[] header      = headerTitle.Split('|');

            //导出标题所对应的列字段名称
            string   columnFiled = "DailyDate|ProductNo|ProductName|Specification|BatchNo|StorageName|InTotal|OutTotal|TodayCount";
            string[] field       = columnFiled.Split('|');

            XBase.Common.OutputToExecl.ExportToTable(this.Page, dt, header, field, "库存日结列表");
        }
    }
Exemplo n.º 2
0
    protected void LoadPrintInfo()
    {
        PrintParameterSettingModel model = new PrintParameterSettingModel();

        model.CompanyCD     = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD;
        model.BillTypeFlag  = int.Parse(ConstUtil.BILL_TYPEFLAG_STORAGE);
        model.PrintTypeFlag = ConstUtil.PRINTBILL_TYPEFLAG_DayEnd;
        /*此处需注意在模板设置表里的字段和取基本信息的字段是否一致*/
        string[,] aBase =
        {
            { "日结日期",               "DailyDate"          },
            { "仓库",                 "StorageName"        },
            { "品名",                 "ProductName"        },
            { "批次",                 "BatchNo"            },
            { "物品编号",               "ProductNo"          },
            { "入库总数量 ",             "InTotal"            },
            { "出库总数量",              "OutTotal"           },
            { "当日结存量",              "TodayCount"         },
            { "当日销售金额",             "SaleFee"            },
            { "当日销售退货金额",           "SaleBackFee"        },
            { "当日采购金额",             "PhurFee"            },
            { "当日采购退货金额",           "PhurBackFee"        },
            { "操作人",                "CreatorName"        },
            { "操作日期",               "CreateDate"         },
            { "期初库存录入数量",           "InitInCount"        },
            { "期初库存导入数量",           "InitBatchCount"     },
            { "采购入库数量",             "PhurInCount"        },
            { "生产完工入库数量",           "MakeInCount"        },
            { "销售退货入库数量",           "SaleBackInCount"    },
            { "门店销售退货入库数量(总店发货模式)", "SubSaleBackInCount" },
            { "红冲入库数量",             "RedInCount"         },
            { "其他入库数量",             "OtherInCount"       },
            { "配送出库数量",             "SendOutCount"       },
            { "领料出库数量",             "TakeOutCount"       },
            { "借货返还数量",             "BackInCount"        },
            { "生产退料数量",             "TakeInCount"        },
            { "库存调拨入库数量",           "DispInCount"        },


            { "配送退货入库数量",           "SendInCount"        },
            { "销售出库数量",             "SaleOutCount"       },
            { "门店销售数量(总店发货模式)",     "SubSaleOutCount"    },
            { "采购退货出库数量",           "PhurBackOutCount"   },
            { "红冲出库数量",             "RedOutCount"        },
            { "其他出库数量",             "OtherOutCount"      },
            { "库存调拨出库数量",           "DispOutCount"       },
            { "借出数量",               "LendCount"          },
            { "库存调整数量",             "AdjustCount"        },
            { "库存报损数量",             "BadCount"           },
            { "盘点调整数量",             "CheckCount"         },
        };



        DataTable dbPrint = XBase.Business.Common.PrintParameterSettingBus.GetPrintParameterSettingInfo(model);
        DataTable dtMRP   = DayEndBus.GetStorageDailyInfo(Convert.ToString(this.intMrpID), this.BatchNo, Convert.ToString(this.StorageID), this.DailyDate, model.CompanyCD);



        string strBaseFields = "";

        /*第二明细*/

        if (dbPrint.Rows.Count > 0)
        {
            isSeted.Value = "1";
            strBaseFields = dbPrint.Rows[0]["BaseFields"].ToString();
        }
        else
        {
            isSeted.Value = "0";
            strBaseFields = "DailyDate|StorageName|ProductName|BatchNo|ProductNo|InTotal|OutTotal|TodayCount|SaleFee|SaleBackFee|PhurFee|PhurBackFee|CreatorName|CreateDate|InitInCount|InitBatchCount|PhurInCount|MakeInCount|SaleBackInCount|SubSaleBackInCount|RedInCount|OtherInCount|SendOutCount|TakeOutCount|BackInCount|TakeInCount|DispInCount|SendInCount|SaleOutCount|SubSaleOutCount|PhurBackOutCount|RedOutCount|OtherOutCount|DispOutCount|LendCount|AdjustCount|BadCount|CheckCount";
        }


        if (!string.IsNullOrEmpty(strBaseFields))
        {
            tableBase.InnerHtml = WritePrintPageTable("库存日结明细", strBaseFields, null, aBase, null, dtMRP, null, true);
        }
    }
Exemplo n.º 3
0
    protected void GetValue(string ProductID, string BatchNo, string StorageID, string DailyDate, string CompanyCD)
    {
        DataTable dt = DayEndBus.GetStorageDailyInfo(ProductID, BatchNo, StorageID, DailyDate, CompanyCD);

        if (dt.Rows.Count > 0)
        {
            txtBatchNo.Text             = dt.Rows[0]["BatchNo"].ToString();
            txtCreateDate.Text          = dt.Rows[0]["CreateDate"].ToString();
            this.txtCreator.Text        = dt.Rows[0]["CreatorName"].ToString();
            this.txtDailyDate.Text      = dt.Rows[0]["DailyDate"].ToString();
            this.txtAdjustCount.Text    = dt.Rows[0]["AdjustCount"].ToString();
            this.txtBackInCount.Text    = dt.Rows[0]["BackInCount"].ToString();
            this.txtBadCount.Text       = dt.Rows[0]["BadCount"].ToString();
            this.txtCheckCount.Text     = dt.Rows[0]["CheckCount"].ToString();
            this.txtDispInCount.Text    = dt.Rows[0]["DispInCount"].ToString();
            this.txtDispOutCount.Text   = dt.Rows[0]["DispOutCount"].ToString();
            this.txtInitBatchCount.Text = dt.Rows[0]["InitBatchCount"].ToString();
            this.txtInitInCount.Text    = dt.Rows[0]["InitInCount"].ToString();
            this.txtInTotal.Text        = dt.Rows[0]["InTotal"].ToString();

            this.txtLendCount.Text     = dt.Rows[0]["LendCount"].ToString();
            this.txtMakeInCount.Text   = dt.Rows[0]["MakeInCount"].ToString();
            this.txtOtherInCount.Text  = dt.Rows[0]["OtherInCount"].ToString();
            this.txtOtherOutCount.Text = dt.Rows[0]["OtherOutCount"].ToString();



            this.txtOutTotal.Text = dt.Rows[0]["OutTotal"].ToString();

            this.txtPhurBackFee.Text      = dt.Rows[0]["PhurBackFee"].ToString();
            this.txtPhurBackOutCount.Text = dt.Rows[0]["PhurBackOutCount"].ToString();
            this.txtPhurFee.Text          = dt.Rows[0]["PhurFee"].ToString();

            this.txtPhurInCount.Text = dt.Rows[0]["PhurInCount"].ToString();

            this.txtPhurBackFee.Text = dt.Rows[0]["PhurBackFee"].ToString();

            this.txtProductID.Text = dt.Rows[0]["ProductName"].ToString();
            this.txtProductNo.Text = dt.Rows[0]["ProductNo"].ToString();


            this.txtRedInCount.Text  = dt.Rows[0]["RedInCount"].ToString();
            this.txtRedOutCount.Text = dt.Rows[0]["RedOutCount"].ToString();



            this.txtSaleBackFee.Text        = dt.Rows[0]["SaleBackFee"].ToString();
            this.txtSaleBackInCount.Text    = dt.Rows[0]["SaleBackInCount"].ToString();
            this.txtSaleFee.Text            = dt.Rows[0]["SaleFee"].ToString();
            this.txtSaleOutCount.Text       = dt.Rows[0]["SaleOutCount"].ToString();
            this.txtSendInCount.Text        = dt.Rows[0]["SendInCount"].ToString();
            this.txtSendOutCount.Text       = dt.Rows[0]["SendOutCount"].ToString();
            this.txtStorageID.Text          = dt.Rows[0]["StorageName"].ToString();
            this.txtSubSaleBackInCount.Text = dt.Rows[0]["SubSaleBackInCount"].ToString();
            this.txtSubSaleOutCount.Text    = dt.Rows[0]["SubSaleOutCount"].ToString();
            this.txtTakeInCount.Text        = dt.Rows[0]["TakeInCount"].ToString();

            this.txtTakeOutCount.Text = dt.Rows[0]["TakeOutCount"].ToString();
            this.txtTodayCount.Text   = dt.Rows[0]["TodayCount"].ToString();
        }
    }