schangxiang@126.com
2025-09-29 682eba0aaf922e69dfafe05fb6c1bbdbf3a0e04a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
using FineUIPro;
using iWareCommon.Common.Entity;
using iWareDataCore.BASE.Service;
using iWareExcel.EXCEL.Service;
using iWareWms.Code.Excel.Service;
using System;
using System.Collections.Generic;
 
namespace iWareWms.View.InOut
{
    public partial class EndInOutListDetail : PageBase
    {
        protected override Grid GetGrid()
        {
            return PlaceMaterialGrid;
        }
 
        protected override FineUIPro.DropDownList GetPageSizeDropDownList()
        {
            return ddlPageSize;
        }
 
 
        protected override List<object> GetDataSource(int pageIndex, int pageSize, out string msg, out int totalNum, out int currentPage)
        {
            var plans = InOutListDetailViewService.GetInstance().QueryByParam(new QueryParam
            {
                Filter = new Dictionary<string, object> { { "InOutListId", Convert.ToInt32(Request.QueryString["Id"]) } },
                Search = new Dictionary<string, object> { { "MaterialCode", tbMaterialCode.Text.Trim() }, { "PlaceCode", tbPlaceCode.Text.Trim() } },
                PageIndex = pageIndex,
                PageSize = pageSize
            }, out msg, out totalNum, out currentPage);
 
            var res = new List<object>();
 
            plans.ForEach(x => res.Add(x));
 
            return res;
 
        }
 
        protected void Page_Load(object sender, EventArgs e)
        {
 
            if (!IsPostBack)
            {
                Query(1);
            }
 
        }
 
        protected override void GetPath(object userName)
        {
            string msg;
            var placematerial = InOutListDetailViewService.GetInstance().QueryByParam(new QueryParam
            {
                Filter = new Dictionary<string, object> { { "InOutListId", Convert.ToInt32(Request.QueryString["Id"]) } },
                Search = new Dictionary<string, object> { { "MaterialCode", tbMaterialCode.Text.Trim() }, { "PlaceCode", tbPlaceCode.Text.Trim() } },
            }, out msg);
 
            var placematerials = new List<object>();
            placematerial.ForEach(x => placematerials.Add(x));
 
            var workBooks = WorkBookService.GetInstance().QueryByParam(new QueryParam { Filter = new Dictionary<string, object> { { "Name", "已完成出入库单" } } }, out msg);
 
            var path = ExcelService.GetInstance().ToExcelByEPPlus(workBooks[0], new Dictionary<string, List<object>> { { "已完成出入库单", placematerials } }, out msg);
 
            Session["ExcelPath"] = path;
        }
 
 
        protected override Window GetWindow()
        {
            return Window2;
        }
 
        protected override FineUIPro.Timer GetTimer()
        {
            return timer1;
        }
    }
}