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
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AfterConsumptionList.aspx.cs" Inherits="CY.WebForm.Pages.sysInquiry.AfterConsumptionList" %>
 
<%@ Register src="PrintType.ascx" tagname="PrintType" tagprefix="uc1" %>
 
<!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 id="Head1" runat="server">
    <title></title>
    <uc:CMSHead ID="CMSHead1" runat="server" />
    <script type="text/javascript">
        function onClick(e, treeId, treeNode) {
            //单击展开
            var zTree = $.fn.zTree.getZTreeObj("PrintTypeTree");
            zTree.expandNode(treeNode);
 
            //存储点击节点id
            jQuery.jCookie('AfterTreeNodeId', treeNode.id.toString());
 
 
            if (!treeNode.isParent) {
                
                var printTypeId = treeNode.id;
                window.location.href = "/Pages/sysInquiry/AfterConsumptionList.aspx?Operate=afterConsumption&PrintingTypeId=" + printTypeId;
 
            }
            parent.iframeHeight('frmrightChild');
        }
 
        $(
            function () {
                var hidPrintTypeId = $("#hidPrintTypeId").val();
                var zTree = $.fn.zTree.getZTreeObj("PrintTypeTree");
                var selTreeId = jQuery.jCookie('AfterTreeNodeId');
                var node;
                if (selTreeId != "") {
                    var printType = '<%=Request["PrintingTypeId"]%>';
                    node = zTree.getNodeByParam("id", selTreeId);
                    if (printType == 'null' || printType == "") {
                        if (node) {
                            onClick(zTree, node.id, node);
                        }
                        else {
                            Init();
                        }
                    }
                    zTree.selectNode(node);
                }
                else {
                    Init(); 
                }
                setInterval("parent.iframeHeight('frmrightChild')", 1000);
            }
        );
 
            function Init() {
                var zTree = $.fn.zTree.getZTreeObj("PrintTypeTree");
                var printType = '<%=Request["PrintingTypeId"]%>';
                if (printType == 'null' || printType == "") {
                    var root = zTree.getNodes()[0];
                    var node;
                    try {
                        node = root.children[0].children[0];
                    }
                    catch (ex) {
                        node = root;
                        node.id = -2;
                    }
                    onClick(zTree, node.id, node);
                }
            }
    </script>
</head>
<body>
    <form id="form1" runat="server">
     <div id="scrollContent">
        <div style="float: left; margin-right: 10px">
           <uc1:PrintType ID="PrintType1" runat="server" OnClick="onClick" UserType="2" />
           <input type="hidden" id="hidPrintTypeId" value="<%=PrintingTypeId %>"/>
        </div>
         <div style="float: left; width: 80%">
         <div>
            <span style="color:Red"><%=GetFastSetMsg(PrintingTypeId)%></span>
         </div>
         <table class="table2" style=" margin-top:0px;">
             <tr>
            <td align="left"><b>印刷消耗</b></td>
            <td style="width: 50px;">
                    <asp:Button ID="btnSave_Basic" Text="保存" runat="server" CssClass="Btn" OnClick="btnSave_Basic_Click" OnClientClick="showWait();"/>
            </td>
            </tr>
            </table>
            <table class="tableStyle" useMultColor="true">
                <tr><td>印刷消耗比例(%):</td><td><input type="text" id="txtBasicRatio_Basic" runat="server" value="0" class="validateFloat"/></td><td>最低消耗数量(张):</td><td><input id="txtMinNumber_Basic" type="text" runat="server" value="0" class="validateInt"/></td></tr>
            </table>
            <br />
            <asp:Panel ID="panPrintColor" runat="server">
            <table class="table2" style=" margin-top:0px;">
             <tr>
                <td align="left"><b>印刷颜色消耗</b></td>
                <td style="width: 50px;">
                        <asp:Button ID="btnSave_PrintColor" Text="保存" runat="server" CssClass="Btn" OnClick="btnSave_PrintColor_Click" OnClientClick="showWait();"/>
                </td>
                </tr>
            </table>
            <asp:Repeater ID="RepPrintColorConsumptionList" runat="server">
                <HeaderTemplate>
                    <table class="tableStyle" useMultColor="true">
                        <tr>
                            <th>印刷颜色</th>
                            <th>基本消耗比例(%)</th>
                            <th>最低消耗数量(张)</th>
                        </tr>
                </HeaderTemplate>
                <ItemTemplate>
                    <tr>
                    <td><asp:Label ID="lblColorName" Text='<%#Eval("ColorName")%>' runat="server"></asp:Label></td>
                    <td><asp:TextBox id="txtBasicRatio" Text='<%#GetDecimalStr(Eval("BasicRatio"))%>'  runat="server" CssClass="validateFloat"></asp:TextBox></td>
                    <td><asp:TextBox id="txtMinNumber" Text='<%#Eval("MinNumber")%>' runat="server" CssClass="validateInt"></asp:TextBox></td>        
                    </tr>
                </ItemTemplate>
                <FooterTemplate>
                    </table>
                </FooterTemplate>
            </asp:Repeater>
            </asp:Panel>
<asp:Panel ID="panAfter" runat="server">
<table class="table2" style=" margin-top:0px;">
             <tr>
            <td align="left"><b>后道消耗</b></td>
            <td style="width: 50px;">
                    <asp:Button ID="btnSave" Text="保存" runat="server" CssClass="Btn" OnClick="btnSave_Click" OnClientClick="showWait();"/>
            </td>
            </tr>
            </table>
            <asp:Repeater ID="RepAfterConsumptionList" runat="server">
                <HeaderTemplate>
                    <table class="tableStyle" useMultColor="true">
                        <tr>
                            <th>后道类型</th>
                            <th>基本消耗比例(%)</th>
                            <th>最低消耗数量(张)</th>
                            <th style="display:none"></th>
                        </tr>
                </HeaderTemplate>
                <ItemTemplate>
                    <tr>
                    <td><%#Eval("AfterParameterName")%></td>
                    <td><asp:TextBox id="txtBasicRatio" Text='<%#GetDecimalStr(Eval("BasicRatio"))%>'  runat="server" CssClass="validateFloat"></asp:TextBox></td>
                    <td><asp:TextBox id="txtMinNumber" Text='<%#Eval("MinNumber")%>' runat="server" CssClass="validateInt"></asp:TextBox></td>
                    <td style="display:none"><asp:Label ID="lblAfterParameterId" Text='<%#Eval("AfterParameterId")%>' runat="server"></asp:Label></td>
                    </tr>
                </ItemTemplate>
                <FooterTemplate>
                    </table>
                </FooterTemplate>
            </asp:Repeater>
            </asp:Panel>
            </div>
</div>
 
    </form>
</body>
</html>