username@email.com
2025-05-12 ae6e40362a745caef9ead36f81f38313fb8c2c66
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AgConWarehouse.aspx.cs" Inherits="CY.WebForm.Pages.business.AgConWarehouse" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <uc:cmshead id="CMSHead1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
    <div class="box1" paneltitle="功能面板" roller="false">
        <table class="TableNewStyle" width="100%">
            <tr>
                <td style="text-align: right;">
                    仓库名称:
                </td>
                <td>
                    <select id="selWarehouseId" runat="server" keepdefaultstyle='true'>
                    </select>
                </td>
                <td style="text-align: right;">
                    货品名称:
                </td>
                <td>
                    <asp:DropDownList runat="server" ID="dwGoodsList" AutoPostBack="true" keepDefaultStyle="true" OnSelectedIndexChanged="dwGoodsList_SelectedIndexChanged">
                    </asp:DropDownList>
                </td>
                <td style="text-align: right;">
                    品牌:
                </td>
                <td>
                    <asp:DropDownList runat="server" ID="dwBrand" AutoPostBack="false" keepDefaultStyle="true">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td style="text-align: right;">
                    规格:
                </td>
                <td>
                    <asp:DropDownList runat="server" ID="dwSpecification" AutoPostBack="false" keepDefaultStyle="true">
                    </asp:DropDownList>
                </td>
                <td runat="server" id="trWeight" style="text-align: right;">
                    克重:
                </td>
                <td id="trWeightList">
                    <asp:DropDownList runat="server" ID="dwPaperWeight" AutoPostBack="false" keepDefaultStyle="true">
                    </asp:DropDownList>
                </td>
               <td></td>
                <td class="ali02" style="">
                    <asp:Button ID="btn_Register" Text="查询" runat="server" padding="0px" OnClick="btn_Register_Click" />
                </td>
            </tr>
        </table>
    </div>
    <div id="scrollContent">
        <div>
            <asp:Repeater ID="ReInventoryList" runat="server">
                <headertemplate>
                    <table class="tableStyle ali02" useclick="false" usecheckbox="true" sortmode="true">
                        <tr>
                            <th>
                                编号
                            </th>
                            <th>
                                仓库
                            </th>
                            <th>
                                货品名称
                            </th>
                            <th>
                                货品品牌
                            </th>
                            <th>
                                货品规格
                            </th>
                            <th class="div_paperWeightList">
                                纸张克重
                            </th>
                            <th>
                                剩余库存
                            </th>
                            <th>
                                操作时间
                            </th>
                            <th>
                                操作人
                            </th>
                            <th style="display: none">
                                Keyid
                            </th>
                        </tr>
                </headertemplate>
                <itemtemplate>
                    <tr>
                        <td>
                            <%#Container.ItemIndex + 1+ this.UCPager1.PageSize * (this.UCPager1.PageIndex - 1)%>
                        </td>
                        <td>
                            <%#Eval("WarehouseName")%>
                        </td>
                        <td class="red" title="点击选择货品" onclick="ShowInfo(this)" style="cursor: pointer">
                            <%#Eval("GoodsName")%>
                        </td>
                        <td>
                            <%#Eval("BrandName")%>
                        </td>
                        <td>
                            <%#Eval("SpeceicationName")%>
                        </td>
                        <td class="div_List">
                            <%#Eval("PaperWeightName")%>
                        </td>
                        <td>
                            <%#Eval("InventoryCount")%>
                        </td>
                        <td>
                            <%#Eval("LastUpdateTime")%>
                        </td>
                        <td>
                            <%#Eval("Operator")%>
                        </td>
                        <td style="display: none">
                            <%#Eval("Keyid") %>
                        </td>
                    </tr>
                </itemtemplate>
                <footertemplate>
                    </table>
                </footertemplate>
            </asp:Repeater>
            <div id="page" style="float: left; width: 100%;">
                <uc:ucpager id="UCPager1" runat="server" />
            </div>
            <div id="divInfo" style="float: left; width: 100%;">
                <table class="tableStyle ali02" id="SelectPaperList">
                    <tr>
                        <th style="width: 130px;">
                            编号
                        </th>
                        <th style="width: 130px;">
                            仓库
                        </th>
                        <th style="width: 130px;">
                            货品名称
                        </th>
                        <th style="width: 130px;">
                            规格
                        </th>
                        <th style="width: 130px;">
                            品牌
                        </th>
                        <th style="width: 130px;">
                            使用数量
                        </th>
                        <th style="width: 130px;">
                            <input type="button" value="确定" onclick="ShowAllINfo()" />
                        </th>
                    </tr>
                </table>
                <table style="display: none;" class="CopyOnePaper">
                    <tr class="PaperNewSel">
                        <td>
                            <span class="PaperNum red PaperNewSel"></span>
                            <input class="PaperKeyid PaperNewSel" type="hidden" />
                        </td>
                        <td>
                            <span class="red PaperWarehouseName PaperNewSel"></span>
                        </td>
                        <td>
                            <span class="red PaperGoodsName PaperNewSel"></span>
                        </td>
                        <td>
                            <span class="red PaperSpecificationName PaperNewSel"></span>
                        </td>
                        <td>
                            <span class="red PaperBrandName PaperNewSel"></span>
                        </td>
                        <td>
                            <input type="text" class="PaperInventoryCounttext PaperNewSel" style="width: 40px" />
                        </td>
                        <td>
                            <input type="button" class=" PaperNewSel" value="取消" onclick="DelINfo(this)" />
                            <div style="display: none">
                                库存编号: <span class="red PaperSpanKeyId PaperNewSel"></span>
                            </div>
                        </td>
                        <td>
                             <span class="red PaperCount PaperNewSel" style="display:none"></span>
                        </td>
                    </tr>
                </table>
            </div>
            <div class="CB">
            </div>
        </div>
    </div>
    </form>
    <script type="text/javascript">
        $(function () {
            $("#dwCommity option").each(function (ii, vv) {
                $(this).html($(this).html().replace(/[.]/g, "&nbsp;&nbsp;"));
            });
            if('<%=Request["CommidityType"]%>'!='纸张')
            {
                $(".div_List").hide();
                $("#trWeight").hide();
                $("#trWeightList").hide();
                $(".div_paperWeightList").hide();
            }
        });
        var ALLKeyids=",";
        var AllKeyidCount =0;
        function ShowInfo(obj) {
            var SelPaperNum =parseInt($.trim($(obj).parent().find("td").eq(9).html()));
            if(ALLKeyids.indexOf(","+SelPaperNum+",") >=0)
            {
                return;
            }else{
                 if('<%=Request["CommidityType"]%>'!='纸张' && AllKeyidCount >=1){
                    alertMsg("非纸张只能选择一种货品");
                    return;
                 }else if(AllKeyidCount >=3){
                    alertMsg("最多选择三种纸张");
                    return;
                }else{
                    ALLKeyids=ALLKeyids+SelPaperNum+",";
                    AllKeyidCount++;
                }
            }
 
            var KsiKeyid = parseInt($("#SelectPaperList").find("tr").last().attr("value_id"));
            if(KsiKeyid>0)
            {
            }else{
                KsiKeyid  =0;
            }
            KsiKeyid = KsiKeyid+1;
            
            var PaperObj = $(".CopyOnePaper").find("tr").clone();
            PaperObj.attr("value_id",KsiKeyid);
            PaperObj.find(".PaperNewSel").attr("value_id",KsiKeyid);
            PaperObj.find(".PaperNum").text($.trim($(obj).parent().find("td").eq(0).html()));
            PaperObj.find(".PaperWarehouseName").text($.trim($(obj).parent().find("td").eq(1).html()));
            if('<%=Request["CommidityType"]%>'=='纸张')
            {
                PaperObj.find(".PaperInventoryCounttext").val(0);
                if($.trim($(obj).parent().find("td").eq(5).html()) =="")
                {
                    PaperObj.find(".PaperGoodsName").text($.trim($(obj).parent().find("td").eq(2).html()));
                }else{
                    PaperObj.find(".PaperGoodsName").text($.trim($(obj).parent().find("td").eq(5).html())+"克"+$.trim($(obj).parent().find("td").eq(2).html()));
                }
            }
            else
            {
                PaperObj.find(".PaperInventoryCounttext").val(4);
                PaperObj.find(".PaperGoodsName").text($.trim($(obj).parent().find("td").eq(2).html()));
            }
            PaperObj.find(".PaperSpecificationName").text($.trim($(obj).parent().find("td").eq(4).html()));
            PaperObj.find(".PaperBrandName").text($.trim($(obj).parent().find("td").eq(3).html()));
            PaperObj.find(".PaperSpanKeyId").text($.trim($(obj).parent().find("td").eq(9).html()));
            PaperObj.find(".PaperCount").text($.trim($(obj).parent().find("td").eq(6).html()));
 
            $("#SelectPaperList").append(PaperObj);
 
//            $("#num").text($.trim($(obj).parent().find("td").eq(0).html()));
//            $("#WarehouseName").text($.trim($(obj).parent().find("td").eq(1).html()));
//            $("#GoodsName").text($.trim($(obj).parent().find("td").eq(2).html()));
//            if('<%=Request["CommidityType"]%>'=='纸张')
//            {
//                $("#InventoryCounttext").val(0);
//            }
//            else
//            {
//                $("#InventoryCounttext").val(4);
//            }
//            $("#SpecificationName").text($.trim($(obj).parent().find("td").eq(4).html()));
//            $("#BrandName").text($.trim($(obj).parent().find("td").eq(3).html()));
//            $("#SpanKeyId").text($.trim($(obj).parent().find("td").eq(9).html()));
        }
 
        function DelINfo(obj) {
            var SelPaperNum =parseInt($.trim($(obj).parent().parent().find(".PaperSpanKeyId").text()));
            ALLKeyids = ALLKeyids.replace(","+SelPaperNum,"");
            AllKeyidCount = AllKeyidCount-1;
            $("tr[value_id='"+$(obj).attr("value_id")+"']").remove();
        }
 
        function ShowAllINfo() {
            var num = "";
            var WarehouseName = "";
            var GoodsName ="";
            var InventoryCounttext = 0;
            var SpecificationName = "";
            var  Keyid="";
            var  papernum1="";
            var  paperCount1 = "";
            var  issucess = true;
            $("tr[class='PaperNewSel']").each(function (ii,vv) {
                if(parseInt($(vv).attr("value_id")) >0 && parseInt($.trim($(vv).find(".PaperInventoryCounttext").val())) >0)
                {
                    num = num+$.trim($(vv).find(".PaperNum").text())+",";
                    WarehouseName = WarehouseName+$.trim($(vv).find(".PaperWarehouseName").text())+"|";
                    if(GoodsName.indexOf($.trim($(vv).find(".PaperGoodsName").text())+"|") >=0){
                    }else{
                    GoodsName = GoodsName+$.trim($(vv).find(".PaperGoodsName").text())+"|";
                    } 
                    if(SpecificationName.indexOf($.trim($(vv).find(".PaperSpecificationName").text())+"|") >=0){
                    }else{
                        SpecificationName = SpecificationName+$.trim($(vv).find(".PaperSpecificationName").text())+"|";
                    }
                    InventoryCounttext = InventoryCounttext+parseInt($.trim($(vv).find(".PaperInventoryCounttext").val()));
                    paperCount1 = $.trim($(vv).find(".PaperCount").text());
                    var temp = $.trim($(vv).find(".PaperInventoryCounttext").val());
                    if(parseInt(temp) > parseInt(paperCount1))
                    {
                        alertMsg("库存不足");
                        issucess = false;
                        return false;
                    }
                    papernum1 = papernum1+$.trim($(vv).find(".PaperInventoryCounttext").val())+"|";
                    Keyid = Keyid+$.trim($(vv).find(".PaperSpanKeyId").text())+"|";
                }
            });
            if(issucess==true)
            {
                top.document.getElementById("_DialogFrame_0").contentWindow.GetGoodsData(<%=Request["value_pparid"] %>,GoodsName.substring(0,GoodsName.length-1),SpecificationName.substring(0,SpecificationName.length-1),InventoryCounttext,Keyid.substring(0,Keyid.length-1),papernum1.substring(0,papernum1.length-1));
                top.Dialog.close();
            }
            else
            {
                return;
            }
        }
    </script>
</body>
</html>