username@email.com
8 天以前 f6cb981322bc4c2a27921ad0480dce7fb483a4d8
CY_ECommercePlatform/CY.WebForm/Pages/business/AgMergerOrderEdit.aspx
@@ -6,187 +6,11 @@
    <title>合版施工单</title>
    <uc:CMSHead ID="CMSHead1" runat="server" />
         <link rel="stylesheet" type="text/css" href="../../Styles/base.css" />
    <script type="text/javascript">
        $(function () {
            $("input[name='PMS_PaperPositive']").blur(function () {
                var PMS_PaperCount = parseInt($("input[name='PMS_PaperCount']").val());
                var PMS_PaperPositive = parseInt($("input[name='PMS_PaperPositive']").val());
                var PMS_PaperConsume = parseInt($("input[name='PMS_PaperConsume']").val());
                if (PMS_PaperCount < PMS_PaperPositive) {
                    alertMsg("所填正数不能大于纸张数量");
                    $("input[name='PMS_PaperPositive']").val("0");
                } else {
                    var o_money = PMS_PaperCount - PMS_PaperPositive;
                    if (isNaN(o_money)) {
                        $("input[name='PMS_PaperConsume']").val("0");
                    } else {
                        $("input[name='PMS_PaperConsume']").val(o_money);
                    }
                }
            });
            $("input[name='PMS_PaperConsume']").blur(function () {
                var PMS_PaperCount = parseInt($("input[name='PMS_PaperCount']").val());
                var PMS_PaperPositive = parseInt($("input[name='PMS_PaperPositive']").val());
                var PMS_PaperConsume = parseInt($("input[name='PMS_PaperConsume']").val());
                if (PMS_PaperCount < (PMS_PaperConsume + PMS_PaperPositive)) {
                    alertMsg("所消耗数不能大于纸张数量");
                    $("input[name='PMS_PaperConsume']").val("0");
                } else {
                    var o_money = PMS_PaperCount - PMS_PaperConsume;
                    if (isNaN(o_money)) {
                        $("input[name='PMS_PaperPositive']").val("0");
                    } else {
                        $("input[name='PMS_PaperPositive']").val(o_money);
                    }
                }
            });
            $(".CTP_o").change(function () {
                $(".Film_o").val("");
                $(".PS_o").val("");
            });
            $(".Film_o").change(function () {
                $(".CTP_o").val("");
                $(".PS_o").val("");
            });
            $(".PS_o").change(function () {
                $(".Film_o").val("");
                $(".CTP_o").val("");
            });
            $("#PMS_PaperSource").change();
            $("#selPlateType").change();
            $(".xialap").hover(function () {
                $(this).find(".xialapb").show();
            }, function () {
                $(this).find(".xialapb").hide();
            });
            $(".xialapr").hover(function () {
                $(this).find(".xialapb").show();
                $(this).removeClass("xialapr").addClass("xialaprh");
            }, function () {
                $(this).removeClass("xialaprh").addClass("xialapr");
                $(this).find(".xialapb").hide();
            });
            $(".xialapr").click(function () {
                $(this).parent().parent().find("input").val($(this).text());
                $(".xialapb").hide();
            });
        });
    </script>
    <script type="text/javascript">
        function PaperSourceChange(sel)
       {
           if ('来自仓库' != sel.value)
           {
               document.getElementById('StoreBtn').style.display = "none";
               document.getElementById('PMS_PaperName').style.display = "none";
               document.getElementById('selPaperName').style.display = "";
               document.getElementById('PMS_PaperSpecification').style.display = "none";
               document.getElementById('SelPaperSpec').style.display = "";
           }
           else
           {
               document.getElementById('StoreBtn').style.display = "";
               document.getElementById('PMS_PaperName').style.display = "";
               document.getElementById('selPaperName').style.display = "none";
               document.getElementById('PMS_PaperSpecification').style.display = "";
               document.getElementById('SelPaperSpec').style.display = "none";
           }
       }
       function PlateChange(sel)
       {
           if ('1' == sel.value)
           {
               document.getElementById('BtnStorePlate').style.display = "";
               document.getElementById('PlateSpec').style.display = "";
               document.getElementById('selCTPSpec').style.display = "none";
               document.getElementById('selFilmSpec').style.display = "none";
               document.getElementById('lbCTPCount').style.display = "";
               document.getElementById('tdCTPCount').style.display = "";
           }
           else
           {
               document.getElementById('BtnStorePlate').style.display = "none";
               document.getElementById('PlateSpec').style.display = "none";
               document.getElementById('lbCTPCount').style.display = "none";
               document.getElementById('tdCTPCount').style.display = "none";
               if ('0' == sel.value) {
                   document.getElementById('selCTPSpec').style.display = "";
                   document.getElementById('selFilmSpec').style.display = "none";
                   document.getElementById('tdBlank').colSpan = "6"
               }
               else
               {
                   document.getElementById('selCTPSpec').style.display = "none";
                   document.getElementById('selFilmSpec').style.display = "";
                   document.getElementById('tdBlank').colSpan = "2";
               }
           }
           if ('2' == sel.value || '3' == sel.value) {
               document.getElementById('lbPSSpec').style.display = "";
               document.getElementById('tdPSSpec').style.display = "";
               document.getElementById('lbPSCount').style.display = "";
               document.getElementById('tdPsCount').style.display = "";
           }
           else
           {
               document.getElementById('lbPSSpec').style.display = "none";
               document.getElementById('tdPSSpec').style.display = "none";
               document.getElementById('lbPSCount').style.display = "none";
               document.getElementById('tdPsCount').style.display = "none";
           }
       }
       function TrimChange(sel)
       {
           if ("不修切" == sel.value)
           {
               document.getElementById('PrintSizeName').value = "";
           }
        }
        /*
交易客户选中值发生改变
*/
        function custormerChange(sel) {
            if (window.isDataLoading) {
                return;
            }
            if (sel.value.indexOf('六开') >= 0) {
                document.getElementById('PlateSpec').value = '395*460';
                document.getElementById('PMS_ChromaticNumber').value = '1';
                document.getElementById('CTPCount').value = '1';
            } else if (sel.value.indexOf('四色') >= 0) {
                document.getElementById('PlateSpec').value = '770*1030';
                document.getElementById('PMS_ChromaticNumber').value = '4';
                document.getElementById('CTPCount').value = '4';
            } else if (sel.value.indexOf('八色') >= 0) {
                document.getElementById('PlateSpec').value = '790*1030';
                document.getElementById('PMS_ChromaticNumber').value = '4';
                document.getElementById('CTPCount').value = '4';
            } else if (sel.value.indexOf('黑白') >= 0) {
                document.getElementById('PlateSpec').value = '760*920';
                document.getElementById('PMS_ChromaticNumber').value = '1';
                document.getElementById('CTPCount').value = '2';
            } else if (sel.value.indexOf('轮转') >= 0) {
                document.getElementById('PlateSpec').value = '579*810';
                document.getElementById('PMS_ChromaticNumber').value = '1';
                document.getElementById('CTPCount').value = '2';
            } else {
                document.getElementById('CTPCount').value = '';
            }
        }
    </script>
     <style type="text/css">
        body { font-family: 微软雅黑; }
        tr { line-height: 20px; }
    </style>
</head>
<body>
    <form method="post" class="form2" runat="server">
@@ -254,9 +78,9 @@
            <th style="text-align: center;">
                修切要求
            </th>
            <th style="text-align: center;">
           <%-- <th style="text-align: center;">
                包装要求
            </th>
            </th>--%>
            <th style="text-align: center;">
                后道及工艺要求
            </th>
@@ -287,14 +111,14 @@
                            <option value="不修切">不修切</option>
                        </select>
                    </td>
                    <td>
                   <%-- <td>
                        <select keepDefaultStyle="true" class=" w70px" name="PO_PackagRequire">
                            <option value="打包">打包</option>
                            <option value="打捆">打捆</option>
                            <option value="装纸箱">装纸箱</option>
                            <option value="不打包">不打包</option>
                        </select>
                    </td>
                    </td>--%>
                    <td>
                        <%--<input type="text" name="PO_Requirement" class=" noJ" style="width: 300px;" value="<%#Eval("PrintDemandAfterWorksDemand") %>" />--%>
                        <input type="text" name="PO_Requirement" class=" noJ" maxlength="500" style="width: 405px;" value="<%#Eval("PrintDemandAfterWorksDemand")%>" />
@@ -328,14 +152,14 @@
                            <option value="不修切" <%#Eval("PO_TrimRequire").ToString()=="不修切"?"selected":""%>>不修切</option>
                        </select>
                    </td>
                    <td>
                  <%--  <td>
                         <select keepDefaultStyle="true" class=" w70px" name="PO_PackagRequire" value="<%#Eval("PO_PackagRequire")%>">
                            <option value="打包" <%#Eval("PO_PackagRequire").ToString()=="打包"?"selected":""%>>打包</option>
                            <option value="打捆" <%#Eval("PO_PackagRequire").ToString()=="打捆"?"selected":""%>>打捆</option>
                            <option value="装纸箱" <%#Eval("PO_PackagRequire").ToString()=="装纸箱"?"selected":""%>>装纸箱</option>
                            <option value="不打包" <%#Eval("PO_PackagRequire").ToString()=="不打包"?"selected":""%>>不打包</option>                     
                        </select>
                    </td>
                    </td>--%>
                    <td>
                        <input type="text" name="PO_Requirement" class=" noJ" style="width: 405px;" value="<%#Eval("PO_RequirementWork").ToString().Replace(",+-+,", ",")%>" />
@@ -345,190 +169,376 @@
        </asp:Repeater>
    </table>
    <table class="tableStyle" style="width: 98%; margin: 5px auto;" usehover="false" useclick="false">
        <tr>
            <th colspan="10">
                <b>印刷信息</b>
            </th>
        </tr>
        <tbody>
            <tr>
                <td class="ali03 w70px ">
                    纸张来源:
                </td>
                <td>
                    <select keepDefaultStyle="true"  name="PMS_PaperSource" onchange='PaperSourceChange(this)' runat="server" id="PMS_PaperSource" style=" width:80px;">
                        <option value="来自仓库">来自仓库</option>
                        <option value="自带纸">自带纸</option>
                    </select><label class="Btnb CangKubtn_o" style="margin-left: 2px;"><input type="button" class="Btn FromWarehouse" value="连接仓库" id="StoreBtn"  /></label><input type="hidden"  runat="server" name="PSF_PaperId" value="" id="PSF_PaperId1" /><input type="hidden"  runat="server" name="PMS_PaperCount1" value="" id="PMS_PaperCount1" />
                </td>
                <td class="ali03 w70px ">
                    纸张名称:
                </td>
                <td>
                    <input type="text" class="noJ " name="PMS_PaperName" style="width:80px" id="PMS_PaperName" runat = "server" />
                    <select keepDefaultStyle="true"  name="selPaperName" style=" display:none; width:80px" runat="server"  id="selPaperName" ></select>
                </td>
                <td class="ali03 w70px ">
                    纸张规格:
                </td>
                <td>
                    <input type="text" class="noJ " name="PMS_PaperSpecification" style="width:80px" id="PMS_PaperSpecification" runat = "server"/>
                    <select keepDefaultStyle="true"  name="SelPaperSpec" style=" display:none; width:80px"  runat="server"  id="SelPaperSpec"></select>
                </td>
                <td class="ali03 w70px ">
                    纸张数量:
                </td>
                <td colspan="3">
                    <input type="text" class="noJ w40px" name="PMS_PaperCount" runat="server" id="PMS_PaperCount" />张(其中正数<input type="text" class="noJ w40px" name="PMS_PaperPositive"  runat ="server" id = "PMS_PaperPositive"/>张,消耗<input type="text" class="noJ w40px" name="PMS_PaperConsume" runat = "server" id="PMS_PaperConsume" />张)
                </td>
            </tr>
            <tr>
              <td class="ali03 w70px ">
                    印刷机台:
                </td>
                <td>
                    <select keepDefaultStyle="true"  name="PMS_Machine" id="selPMS_Machine" runat="server" style=" width:80px;" onchange='custormerChange(this)'>
                        <option value="">请选择</option>
                        <option value="1开机">1开机</option>
                        <option value="2开机">2开机</option>
                        <option value="3开机">3开机</option>
                        <option value="4开机">4开机</option>
                        <option value="8开机">8开机</option>
                    </select>
                </td>
                <td class="ali03 w70px ">
                    印刷方式:
                </td>
                <td>
                    <select keepDefaultStyle="true"   name="PSF_Typesetting" id="PSF_Typesetting" runat = "server" style="width:80px">
                        <option value="自翻">自翻</option>
                        <option value="滚翻">滚翻</option>
                        <option value="扣板">扣板</option>
                        <option value="单面">单面</option>
                    </select>
                </td>
                <td class="ali03 w70px ">
                    是否修版:
                </td>
                <td>
                    <select keepDefaultStyle="true"  name="PMS_IsRevisedEdition" runat = "server" id="PMS_IsRevisedEdition" style="width:80px">
                        <option value="true">修版</option>
                        <option value="false" selected ="selected">不修版</option>
                    </select>
                </td>
                <td class="ali03 w70px ">
                    色样:
                </td>
                <td>
                    <select keepDefaultStyle="true"  id="PMS_IsColorSamples" name="PMS_IsColorSamples"  runat="server" style="width:80px">
                        <option selected="selected" value="">请选择</option>
                        <option value="无">无</option>
                        <option value="原样">原样</option>
                        <option value="数码样">数码样</option>
                        <option value="印刷样">印刷样</option>
                        <option value="照片比照">照片比照</option>
                        <option value="其他">其他</option>
                    </select>
                </td>
                <td class="ali03 w70px ">
                    色数:
                </td>
                <td>
                    <select keepDefaultStyle="true"  id="PMS_ChromaticNumber" name="PMS_ChromaticNumber" runat = "server" >
                        <option value="1">单色</option>
                        <option value="2">双色</option>
                        <option value="3">三色</option>
                        <option selected="selected" value="4">四色</option>
                        <option value="4+专">四+专</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td class="ali03 w70px " style="display:none;">
                   <%-- 版材类型:--%>
                </td>
                <td style="display:none;">
                     <select keepDefaultStyle="true"   name="selPlateType" onchange='PlateChange(this)' runat = "server" id="selPlateType" style=" width:80px;display:none;">
                        <option selected="selected" value="1">本厂CTP</option>
                        <option value="0">自带CTP</option>
                        <option value="2">自带菲林</option>
                        <option value="3">本厂菲林</option>
                    </select><label class="Btnb CangKubtn_o" style="margin-left: 2px;display:none;"><input type="button" class="Btn FromWarehouseByBanCai" value="连接仓库" id="BtnStorePlate"  /></label><input type="hidden" runat="server" name="PSF_PaperId" id="PSF_PaperId2" />
                </td>
                <td class="ali03 w70px ">
                   规格:
                </td>
                <td>
                 <%--   <input type="text" class="noJ " name="CTPSpecName" style="width:80px" id="PlateSpec"  runat = "server"/>--%>
                    <%-- <select keepDefaultStyle="true"  name="CTPSpecName" id="PlateSpec"  runat="server" style="width:80px" >
             <tr>
            <td colspan="2" align="center">
                  <asp:Repeater ID="Repeater1" runat="server">
                    <ItemTemplate>
                        <table style="width: 98%; margin: 5px auto; text-align: center;" class="tableStyle AddTab" usehover="false" useclick="false" value_id="<%#Container.ItemIndex + 1%>">
                            <thead>
                                <tr class="ForumName" style="display:none">
                                    <th colspan="12">
                                        <b>第<span class=" AddCount red"><%#Container.ItemIndex + 1%></span>版<input name="PSF_Forumsid" value="<%#Container.ItemIndex + 1%>" type="hidden" value_hide_psf_component="<%#Eval("PSF_Component")%>" value_hide_psf_pressesdesk="<%#Eval("PSF_PressesDesk")%>" value_hide_psf_printedcolorpositive="<%#Eval("PSF_PrintedColorPositive")%>" value_hide_psf_printedcolorrear="<%#Eval("PSF_PrintedColorRear")%>" value_hide_psf_typesetting="<%#Eval("PSF_Typesetting")%>" value_hide_psf_fabantaoshu="<%#Eval("PSF_Fabantaoshu")%>" value_hide_psf_papersource="<%#Eval("PSF_PaperSource")%>" value_hide_psf_openspecifications="<%#Eval("PSF_OpenSpecifications")%>" value_hide_psf_selpapername="<%#Eval("PSF_PaperName")%>" value_hide_psf_selpaperspec="<%#Eval("PSF_MaterialSpecifications")%>" value_hide_psf_selplatetype="<%#Eval("PSF_PlateSource")%>" value_hide_psf_selctpspec="<%#Eval("PSF_CTPSpecType")%>" value_hide_psf_selfilmspec="<%#Eval("PSF_FilmType")%>" /></b>
                                    </th>
                                </tr>
                            </thead>
                            <tr class=" price_tabbg" style="font-weight: bold; background-color: #E6E6E6; width: 100%">
                                <td rowspan="2" style="width: 195px;">
                                 构件
                                </td>
                                <td rowspan="2"  >
                                 页数
                                </td>
                                <td rowspan="2"  >
                                    印刷机台
                                </td>
                                <td colspan="3"   >
                                     <p name="PSF_yinse" value_openwidthspan="<%#Container.ItemIndex + 1%>">印刷要求</p>
                                </td>
                              <%--  <td rowspan="2" colspan="2">
                                    <p name="PSF_yinshufangshi" value_openwidthspan="<%#Container.ItemIndex + 1%>">印刷方式</p>
                                </td>--%>
                                  <td rowspan="2"   >
                                    <p   class="lb lbCTPCount lbCTPCountc" value_ppwaerid="<%#Container.ItemIndex + 1%>">板材规格</p>
                                </td>
                                <td  rowspan="2"  >
                                  <p   class="lb lbCTPCount lbCTPCounta" value_ppwaerid="<%#Container.ItemIndex + 1%>">数量(张)</p>
                                </td>
                                     <td rowspan="2" >
                                        发版套数
                                    </td>
                            </tr>
                            <tr class=" price_tabbg" style="font-weight: bold; background-color: #E6E6E6;"   >
                                <td>
                                  <p name="PSF_yinsezheng" value_openwidthspan="<%#Container.ItemIndex + 1%>">正面色数</p>
                                </td>
                                <td>
                                 <p name="PSF_yinsebei" value_openwidthspan="<%#Container.ItemIndex + 1%>">背面色数</p>
                                </td>
                                  <td>
                                        <p name="PSF_yinshufangshi" value_openwidthspan="<%#Container.ItemIndex + 1%>">印刷方式</p>
                                    </td>
                            </tr>
                            <tr>
                                <td>
                                    <select keepdefaultstyle="true" class="" name="PSF_Component" value_ppwaerid="<%#Container.ItemIndex + 1%>"     >
                                          <option value="" selected="selected">-无-</option>
                                        <option value="封面" >封面</option>
                                        <option value="封内合拼">封内合拼</option>
                                        <option value="多单合拼">多单合拼</option>
                                        <option value="内页">内页</option>
                                    </select>
                     </select> --%>
                    <div class="xialap">
                             <input type="text" class="noJ " name="CTPSpecName" style="width:80px" id="PlateSpec"  runat = "server"/>
                            <div class="xialapb" >
                                </td>
                                <td  >
                                    <input type="text" class="  w80px  int " msg="请填写数字" name="PSF_PNum" value="<%#Eval("PSF_PNum")%>" value_ppwaerid="<%#Container.ItemIndex + 1%>" />
                                </td>
                                <td  >
                                    <select keepdefaultstyle="true" class="  w120px" name="PSF_PressesDesk"    value_selspec="<%#Container.ItemIndex + 1%>">
                                        <%--<option value="">请选择</option>--%>
                                        <%=PressesDeskHtml %>
                                    </select>
                                </td>
                                <td  >
                                    <select keepdefaultstyle="true" class="" name="PSF_PrintedColorPositive"  value_selspec="<%#Container.ItemIndex + 1%>" >
                                           <option value="" >请选择</option>
                                        <option value="单色" selected="selected">单色</option>
                                        <option value="双色">双色</option>
                                        <option value="三色">三色</option>
                                        <option value="四色" >四色</option>
                                        <option value="四+专">四+专</option>
                                    </select>
                                </td>
                                <td>
                                    <select keepdefaultstyle="true" class="" name="PSF_PrintedColorRear" value_ppwaerid="<%#Container.ItemIndex + 1%>">
                                           <option value="" >请选择</option>
                                        <option value="0色">0色</option>
                                        <option value="单色" selected="selected">单色</option>
                                        <option value="双色">双色</option>
                                        <option value="三色">三色</option>
                                        <option value="四色" >四色</option>
                                        <option value="四+专">四+专</option>
                                    </select>
                                </td>
                                <td>
                                    <select keepdefaultstyle="true" class="" name="PSF_Typesetting" value_ppwaerid="<%#Container.ItemIndex + 1%>">
                                        <option value="自翻">自翻</option>
                                        <option value="滚翻">滚翻</option>
                                        <option value="扣版">扣版</option>
                                        <option value="单面">单面</option>
                                    </select>
                                     <select keepdefaultstyle="true" class="" name="PSF_Typesettinghide" value_ppwaerid="<%#Container.ItemIndex + 1%>" style="display:none;">
                                         <option value="单面">单面</option>
                                           <option value="双面">双面</option>
                                    </select>
                                </td>
                                 <td>
                                      <div class="xialapp">
                                    <input type="text" value_ppwaerid="<%#Container.ItemIndex + 1%>" class="txt CTPSpecName lbCTPCount lbCTPCountb" name="CTPSpecName"   value="<%#Eval("PSF_CTPSpecType")%>" style=" width: 80px" />
                                          <div class="xialapbp" >
                                <%=xialapr %>
                              <%--  <div class="xialapr">500</div>
                                <div class="xialapr">1000</div>
                                <div class="xialapr">2000</div>
                                <div class="xialapr">3000</div>
                                <div class="xialapr">5000</div>
                                <div class="xialapr">10000</div>--%>
                            </div>
                        </div>
                    <select keepDefaultStyle="true"  name="selCTPSpec"  runat="server" style="display:none;width:80px" id="selCTPSpec" runat = "server"></select>
                    <select keepDefaultStyle="true"  name="selFilmSpec"  runat="server" style="display:none;width:80px" id="selFilmSpec" runat = "server"></select>
                </td>
                <td class="ali03 w70px " id="lbCTPCount" runat = "server">
                    CTP数量:
                </td>
                <td  id="tdCTPCount" runat = "server">
                    <input type="text" class="noJ  PS_o" name="CTPCount" style="width:80px" id="CTPCount" runat = "server" />
                </td>
                <td class="ali03 w70px " id="lbPSSpec" style="display:none" runat="server">
                    PS版规格:
                </td>
                <td id="tdPSSpec" style="display:none" runat="server">
                    <input type="text" class="noJ  PS_o" name="PMS_PSBan" style="width:80px;" runat = "server" id="PMS_PSBan" /><label class="Btnb CangKubtn_o" style="margin-left: 2px;"><input type="button" class="Btn FromWarehouseByBanCai1" value="连接仓库" id="BtnPs"  /></label><input type="hidden" runat="server" name="PSF_PaperId" id="PSF_PaperId3" />
                                       </td>
                                 <td>
                                      <input type="text" value_ppwaerid="<%#Container.ItemIndex + 1%>" class="txt CTPCount lbCTPCount int" name="CTPCount"  value="<%#Eval("PSF_CTPCount")%>" style=" width: 80px" />
                  <%--  <label class="Btnb CangKubtn_o" style="margin-left: 2px;"><input type="button" class="Btn FromWarehouseByBanCai" value="连接仓库" id="BtnPs"  /></label><input type="hidden" name="PSF_PaperId" /> --%>
                                       </td>
                                 <td>
                                       <div class="xialap" >
                                      <input type="text" class="  w40px  int "  name="PSF_Fabantaoshu" value_ppwaerid="<%#Container.ItemIndex + 1%>" value="<%#Eval("PSF_Fabantaoshu")%>"  />
                                            <div class="xialapb" >
                                <div class="xialapr">2</div>
                                <div class="xialapr">3</div>
                                <div class="xialapr">4</div>
                                <div class="xialapr">5</div>
                            </div>
                               </div>
                                       </td>
                            </tr>
                            <tr class=" price_tabbg" style="font-weight: bold; background-color: #E6E6E6; width: 100%" name="PSF_PrintedPaperTd"  value_selspec="<%#Container.ItemIndex + 1%>">
                                <td rowspan="2">
                                    纸张来源
                                </td>
                                <td rowspan="2" colspan="1">
                                    纸张名称
                                </td>
                                <td rowspan="2" colspan="1">
                                    纸张规格
                                </td>
                                <td colspan="3">
                                <p name="PSF_Zhizhangshuliang" value_selspecspan="<%#Container.ItemIndex + 1%>">纸张数量(张)</p>
                                </td>
                                <td colspan="4">
                                  <p name="PSF_Kailiaoguige" value_selspecspan="<%#Container.ItemIndex + 1%>">开料规格(mm)</p>
                                </td>
                            </tr>
                            <tr class=" price_tabbg" style="font-weight: bold; background-color: #E6E6E6;"  name="PSF_PrintedPaperTdtr"  value_selspec="<%#Container.ItemIndex + 1%>">
                                <td>
                                   <p name="PSF_Zhizhangshulianga" value_selspecspan="<%#Container.ItemIndex + 1%>">纸张数量</p>
                                </td>
                                <td>
                                  <p name="PSF_Yinshuazhengshu" value_selspecspan="<%#Container.ItemIndex + 1%>">印刷正数</p>
                                </td>
                                <td>
                                  <p name="PSF_Xiaohao" value_selspecspan="<%#Container.ItemIndex + 1%>">消耗</p>
                                </td>
                                <td colspan="1" >
                                <p name="PSF_OpenSpecificationsspan" value_selspecspan="<%#Container.ItemIndex + 1%>">开数</p>
                                </td>
                                <td>
                                 <p name="PSF_Kuandu" value_selspecspan="<%#Container.ItemIndex + 1%>">宽度</p>
                                </td>
                                <td>
                                   <p name="PSF_OpenWidthspan" value_openwidthspan="<%#Container.ItemIndex + 1%>">长度</p>
                                </td>
                            </tr>
                            <tr name="PSF_PrintedPaperTdtrtr"  value_selspec="<%#Container.ItemIndex + 1%>">
                                <td>
                                    <select keepdefaultstyle="true" class="  w80px" name="PSF_PaperSource" value_selwaerid="<%#Container.ItemIndex + 1%>" value_name="" value_type="" value_soure="">
                                        <option value="来自仓库">来自仓库</option>
                                        <option value="自带纸">自带纸</option>
                                    </select><label class="Btnb" style="margin-left: 10px;">
                                        <input type="button" value_waerid="<%#Container.ItemIndex + 1%>" class="Btn FromWarehouse" value="连接仓库" id="StoreBtn" /></label><input type="hidden" name="PSF_PaperId" value_ppwaerid="<%#Container.ItemIndex + 1%>" value="<%#Eval("PSF_PaperId")%>" /><input type="hidden" name="PMS_PaperCount1" value_ppwaerid="<%#Container.ItemIndex + 1%>" value="" /><input type="hidden" name="oldPSF_PaperId" value="<%#Eval("PSF_PaperId")%>" /><input type="hidden" name="oldPSF_BigPaperCount" value="<%#Eval("PSF_BigPaperCount")%>" />
                                </td>
                                <td colspan="1">
                                    <input type="text" value_ppwaerid="<%#Container.ItemIndex + 1%>" class="txt PSF_PaperName" name="PSF_PaperName" value='<%#Eval("PSF_PaperName")%>' id="PSF_PaperName" />
                                    <select keepdefaultstyle="true" value_ppwaerid="<%#Container.ItemIndex + 1%>" name="selPaperName" style="display: none; width: 80px" id="selPaperName" class="sel selPaperName">
                                        <option value="">请选择</option>
                                        <%=selPaperNameHtml %>
                                    </select>
                                </td>
                                <td colspan="1">
                                    <input type="text" class="txt PSF_MaterialSpecifications" value_ppwaerid="<%#Container.ItemIndex + 1%>" name="PSF_MaterialSpecifications" id="PSF_MaterialSpecifications" value='<%#Eval("PSF_MaterialSpecifications")%>' />
                                    <select keepdefaultstyle="true" class="sel SelPaperSpec" value_ppwaerid="<%#Container.ItemIndex + 1%>" name="SelPaperSpec" style="display: none; width: 80px" id="SelPaperSpec">
                                        <option value="">请选择</option>
                                        <%=SelPaperSpecHtml %>
                                    </select>
                                </td>
                                <td colspan="1">
                                    <input type="text" class="  w80px  int " msg="请填写数字" name="PSF_PrintedCount" value="<%#Eval("PSF_PrintedCount")%>" value_ppwaerid="<%#Container.ItemIndex + 1%>" />
                                </td>
                                <td colspan="1">
                                    <input type="text" class="  w80px  int " msg="请填写数字" name="PSF_PrintedPositive" value="<%#Eval("PSF_PrintedPositive")%>" value_positiveid="<%#Container.ItemIndex + 1%>" />
                                </td>
                                <td colspan="1">
                                    <input type="text" class="  w60px  int " msg="请填写数字" name="PSF_LastNum" value="<%#Eval("PSF_LastNum")%>" value_lastnumid="<%#Container.ItemIndex + 1%>" />
                                </td>
                                <td colspan="1">
                                    <select keepdefaultstyle="true" class="  w80px" name="PSF_OpenSpecifications" value_selspec="<%#Container.ItemIndex + 1%>">
                                        <option value="">请选择</option>
                                        <%=selCuttingPaperSpecHtml%>
                                    </select>
                                </td>
                                <td>
                                    <input type="text" class="  w80px  int " msg="请填写数字" name="PSF_OpenWidth" value="<%#(Eval("PSF_OpenWidth") == null || Eval("PSF_OpenWidth").ToString()=="0")?"":Eval("PSF_OpenWidth").ToString()%>" value_ppwaerid='<%#Container.ItemIndex + 1%>' />
                </td>
                <td class="ali03 w70px " id="lbPSCount" style="display:none" runat="server">
                    PS版数量:
                </td>
                <td id="tdPsCount" style="display:none" runat="server">
                    <input type="text" class="noJ  PS_o" name="PSCount" style="width:80px" id="PSCount" runat = "server" />
                </td>
                <td id="tdBlank" colspan = "6">
                </td>
            </tr>
                                    <div class="xialap"   value_ppwaerid='<%#Container.ItemIndex + 1%>' style="display:none;" >
                             <input type="text" class="  w80px  int " value_ppwaerid='<%#Container.ItemIndex + 1%>'  name="PSF_OpenWidthName"   value="<%#(Eval("PSF_OpenWidth") == null || Eval("PSF_OpenWidth").ToString()=="0")?"":Eval("PSF_OpenWidth").ToString()%>"    />
                            <div class="xialapb" >
                                <div class="xialapr">755</div>
                                <div class="xialapr">760</div>
                                <div class="xialapr">765</div>
                                <div class="xialapr">770</div>
                            </div>
                        </div>
                                </td>
                                <td>
                                    <input type="text" class="  w80px  int " msg="请填写数字" name="PSF_OpenLength" value="<%#(Eval("PSF_OpenLength") == null || Eval("PSF_OpenLength").ToString()=="0")?"":Eval("PSF_OpenLength").ToString()%>" value_ppwaerid='<%#Container.ItemIndex + 1%>' />
                                </td>
                            </tr>
                            <tr class=" price_tabbg" style="font-weight: bold; background-color: #E6E6E6; width: 100%;display: none;">
                                <td style="display:none;">
                                    版材类型
                                </td>
                               <%-- <td colspan="2"  class="lb lbCTPCount" value_ppwaerid='<%#Container.ItemIndex + 1%>' >
                                    规格
                                </td>
                                <td id="lbCTPCount" value_ppwaerid='<%#Container.ItemIndex + 1%>' class="lb lbCTPCount" colspan="3">
                                    CTP数量(张)
                                </td>--%>
                                <td id="lbPSSpec" value_ppwaerid='<%#Container.ItemIndex + 1%>' class="lb lbPSSpec" colspan="2" style="display: none">
                                    PS版规格
                                </td>
                                <td id="lbPSCount" value_ppwaerid='<%#Container.ItemIndex + 1%>' class="lb lbPSCount" colspan="4" style="display: none">
                                    PS版数量
                                </td>
                                <td colspan="7">
                                </td>
                            </tr>
                            <tr style="display:none;" >
                                <td >
                                    <select keepdefaultstyle="true" value_selwaerid="<%#Container.ItemIndex + 1%>" name="selPlateType" id="selPlateType">
                                        <option value="本厂CTP">本厂CTP</option>
                                        <option value="自带CTP">自带CTP</option>
                                      <%--  <option value="自带菲林">自带菲林</option>
                                        <option value="本厂菲林">本厂菲林</option>--%>
                                    </select>
                                    <label class="Btnb CangKubtn_o" style="margin-left: 10px;">
                                        <input type="button" value_waerid="<%#Container.ItemIndex + 1%>" class="Btn FromWarehouseByBanCai" value="连接仓库" id="BtnStorePlate" /></label><input type="hidden" value_ppwaerid="<%#Container.ItemIndex + 1%>" name="PSF_PaperId2" />
                                </td>
                               <%-- <td colspan="2"  class="lb lbCTPCount" value_ppwaerid='<%#Container.ItemIndex + 1%>' >
                                      <div class="xialapp" style="margin-left:32%;">
                                    <input type="text" value_ppwaerid="<%#Container.ItemIndex + 1%>" class="txt CTPSpecName " name="CTPSpecName" id="PlateSpec" value="<%#Eval("PSF_CTPSpecType")%>" />
                                          <div class="xialapbp" >
                                <%=xialapr %>
                            </div>
                        </div>
                                    <select keepdefaultstyle="true" value_ppwaerid="<%#Container.ItemIndex + 1%>" class="sel selCTPSpec" name="selCTPSpec" style="display: none; width: 80px" id="selCTPSpec">
                                        <option value="">请选择</option>
                                        <%=selCTPSpecHtml %>
                                    </select>
                                    <select keepdefaultstyle="true" value_ppwaerid="<%#Container.ItemIndex + 1%>" class="sel selFilmSpec" name="selFilmSpec" style="display: none; width: 80px" id="selFilmSpec">
                                        <option value="">请选择</option>
                                        <%=selFilmSpecHtml %>
                                    </select>
                                </td>
                                <td id="tdCTPCount" runat="server" value_ppwaerid="<%#Container.ItemIndex + 1%>" class="td tdCTPCount" colspan="3">
                                    <input type="text" value_ppwaerid="<%#Container.ItemIndex + 1%>" class="txt CTPCount" name="CTPCount" id="CTPCount" value="<%#Eval("PSF_CTPCount")%>" />
                                </td>--%>
                                <td id="tdPSSpec" style="display: none" runat="server" value_ppwaerid="<%#Container.ItemIndex + 1%>" class="td tdPSSpec" colspan="2">
                                    <input type="text" value_ppwaerid="<%#Container.ItemIndex + 1%>" class="txt PSF_PSBan" name="PSF_PSBan" style="width: 80px;" id="PSF_PSBan" value="<%#Eval("PSF_PSSpec")%>" />
                                    <label class="Btnb CangKubtn_o" style="margin-left: 10px;">
                                        <input type="button" value_waerid="<%#Container.ItemIndex + 1%>" class="Btn FromWarehouseByBanCai1" value="连接仓库" id="BtnPs" /></label><input type="hidden" value_ppwaerid="<%#Container.ItemIndex + 1%>" name="PSF_PaperId3" />
                                </td>
                                <td id="tdPsCount" style="display: none" runat="server" value_ppwaerid="<%#Container.ItemIndex + 1%>" class="td tdPsCount" colspan="4">
                                    <input type="text" value_ppwaerid="<%#Container.ItemIndex + 1%>" class="txt PSCount" name="PSCount" style="width: 80px" id="PSCount" value="<%#Eval("PSF_PSCount")%>" />
                                </td>
                                <td colspan="7">
                                </td>
                            </tr>
                            <tr  class="PSF_Qitadingdanhao" value_ppwaerid='<%#Container.ItemIndex + 1%>'   style="display:none;">
                                <td style="font-weight: bold; background-color: #E6E6E6;">
                                    其它订单的订单号:
                                </td>
                                <td colspan="12"  align="left" >
                                   <input type="text"   name="PSF_Qitadingdanhao"  style="width: 50%;"   value_ppwaerid="<%#Container.ItemIndex + 1%>"value="<%#Eval("PSF_PaperName")%>" maxlength="50" />
                                </td>
                            </tr>
                            <tr style=" display:none;">
                                <td style="font-weight: bold; background-color: #E6E6E6;">
                                    生产要求:
                                </td>
                                <td colspan="12">
                                    <textarea style="width: 96%; height: 40px; float: left;" name="PSF_Note"><%#Eval("PSF_Note")%></textarea>
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                </asp:Repeater>
            </td>
        </tr>
            <tr>
                <td class="ali03 w70px ">
                    完工时间:
                </td>
                <td>
                    <input type="text" class="date" name="PMS_CompletionTime" style=" width:140px;" runat = "server"  id ="PMS_CompletionTime"/>
                </td>
                <td class="ali03 w70px ">
                   <%-- 金额:--%>
                </td>
                <td>
                    <input type="text" class="float req " min="0" name="PMS_TotalPrice" style="width:80px;display:none;" runat = "server" id="PMS_TotalPrice" value="0" />
                </td>
                <td colspan="6">
                </td>
            </tr>
            <td colspan="2" align="center">
                <input type="button" class="Btn AddForums" value="添加版面" />
                <input type="button" class="Btn CutForums" value="减少版面" />  &nbsp; &nbsp; &nbsp; &nbsp;
            </td>
        </tr>
             <tr >
            <td colspan="2">
                <table class="tableStyle" style="width: 98%; margin: 5px auto;">
                    <tbody>
                        <tr>
                             <td class="ali03 w70px " >
                后道工序:
                 </td>
                            <td>
                                 <table class="tableStyle" style="width: 98%; margin: 5px auto;">
                                     <tbody>
                                          <asp:Repeater ID="RepeaterHoudaoList" runat="server">
                    <ItemTemplate>
                                         <tr class="AddHoudao" value_id="<%#Container.ItemIndex + 1%>" >
                                             <td>
                        <select keepdefaultstyle="true"   class=" w70px" name="selHoudaogongxu" >
                            <%#Eval("PSF_Houdaogongxu")%>
                        </select>
                    </td>
                                              <td>
                        数量:<input type="text" name="txtShuliang" class=" w40px int" min="0" maxlength="50" value="<%#Eval("PSF_Shuliang")%>"/>
                    </td>
                                             <td>
                        倍数:<input type="text" name="txtBeishu" class=" w40px int" min="0" maxlength="50"  value="<%#Eval("PSF_Beishu")%>"/>
                    </td>
       <td>
                        机长:<input type="text" name="txtJichang" class=" w80px"  maxlength="50" value="<%#Eval("PSF_Jichang")%>"/>
                    </td>
                                              <td>
                       要求: <input type="text" name="txtYaoqiu" class=" noJ" maxlength="500" style="width: 405px;" value="<%#Eval("PSF_Yaoqiu")%>" />
                    </td>
                                             <td class="w70px " >
                                 <a class="Btn AddHoudaos" value_id="<%#Container.ItemIndex + 1%>"  style="font-size:20px;" >+</a>&nbsp;&nbsp;  <a class="Btn CutHoudaos" value_id="<%#Container.ItemIndex + 1%>"  style="font-size:20px;" >-</a>
                 </td>
                                              </tr>
                          </ItemTemplate>
                </asp:Repeater>
                                         </tbody>
                                     </table>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </td>
        </tr>
            <tr>
                <td class="ali03 w70px " >
                备注:
                生产要求:
                 </td>
                <td colspan="9">
                    <textarea style="width: 940px; height: 62px;" name="PMS_Remarks" runat = "server" id="PMS_Remarks"></textarea>
                    <textarea style="width: 940px; height: 12px;" name="PMS_Remarks" runat = "server" id="PMS_Remarks"></textarea>
                </td>
            </tr>
            <tr>
@@ -540,61 +550,1499 @@
            </tr>
        </tbody>
    </table>
    <div style=" display:none;">
    <div id='ReceiptT_Html' style=" display:none;"></div>
    </div>
    </form>
    <script type="text/javascript">
        ReceiptT('member', '<%=targetid %>',6,100);
    </script>
    <script type="text/javascript">
        function CorrectText() {
            $("input[name='PO_Requirement']").each(function (ii, vv) {
                $(vv).val($(vv).val().replace(/[,]/g, ",+-+,"));
            });
        }
        function GetGoodsData(value_pparid, goodsName, SpecificationName, InventoryCounttext, Keyid, papernum1) {
            if (value_pparid == "1") {
                $("input[name='PMS_PaperName']").val(goodsName);
                $("input[name='PMS_PaperSpecification']").val(SpecificationName);
                $("input[name='PMS_PaperCount']").val(InventoryCounttext);
                $("input[name='PSF_PaperId1']").val(Keyid);
                $("input[name='PMS_PaperCount1']").val(papernum1);
            }
            else if (value_pparid == "2") {
                $("input[name='PlateSpec']").val(SpecificationName);
                $("input[name='CTPCount']").val(InventoryCounttext);
                $("input[name='PSF_PaperId2']").val(Keyid);
            }
            else if (value_pparid == "3") {
                $("input[name='PMS_PSBan']").val(SpecificationName);
                $("input[name='PSCount']").val(InventoryCounttext);
                $("input[name='PSF_PaperId3']").val(Keyid);
            }
        }
     <script type="text/javascript">
         var value_WaerId = 0;
         $(function () {
        $(function () {
            $(".FromWarehouse").click(function () {
                var value_pparid = "1";
                top.Dialog.open({ URL: "/Pages/business/AgConWarehouse.aspx?CommidityType=纸张&&value_pparid=" + value_pparid, Width: 1000, Height: 650, Title: "选择货品参数" });
             //            $(".PSF_PrintedPositive[value_ppwaerid='" + value_SelWaerIdNum + "']").blur(function () {
             $("input[name='PSF_PrintedPositive']").blur(function () {
                 var value_SelWaerIdNum = $(this).attr("value_positiveid");
                 var PSF_PrintedCount = parseInt($("input[name='PSF_PrintedCount'][value_ppwaerid='" + value_SelWaerIdNum + "']").val());
                 var PSF_PrintedPositive = parseInt($("input[name='PSF_PrintedPositive'][value_positiveid='" + value_SelWaerIdNum + "']").val());
                 var PSF_LastNum = parseInt($("input[name='PSF_LastNum'][value_lastNumid='" + value_SelWaerIdNum + "']").val());
                 if (PSF_PrintedCount < PSF_PrintedPositive) {
                     alertMsg("所填交货正数不能大于纸张数量");
                     $("input['PSF_PrintedPositive'][value_positiveid='" + value_SelWaerIdNum + "']").val("0");
                     $("input['PSF_LastNum'][value_lastNumid='" + value_SelWaerIdNum + "']").val(PSF_PrintedCount);
                 } else {
                     var o_money = PSF_PrintedCount - PSF_PrintedPositive;
                     if (isNaN(o_money)) {
                         $("input['PSF_LastNum'][value_lastNumid='" + value_SelWaerIdNum + "']").val("0");
                     } else {
                         $("input['PSF_LastNum'][value_lastNumid='" + value_SelWaerIdNum + "']").val(o_money);
                     }
                 }
             });
             $("input[name='PSF_LastNum']").blur(function () {
                 var value_SelWaerIdNum = $(this).attr("value_lastNumid");
                 var PSF_PrintedCount = parseInt($("input[name='PSF_PrintedCount'][value_ppwaerid='" + value_SelWaerIdNum + "']").val());
                 var PSF_PrintedPositive = parseInt($("input[name='PSF_PrintedPositive'][value_positiveid='" + value_SelWaerIdNum + "']").val());
                 var PSF_LastNum = parseInt($("input[name='PSF_LastNum'][value_lastNumid='" + value_SelWaerIdNum + "']").val());
                 if (PSF_PrintedCount < PSF_LastNum) {
                     alertMsg("所填纸张消耗不能大于纸张数量");
                     $("input['PSF_LastNum'][value_lastNumid='" + value_SelWaerIdNum + "']").val("0");
                     $("input['PSF_PrintedPositive'][value_positiveid='" + value_SelWaerIdNum + "']").val(PSF_PrintedCount);
                 } else {
                     var o_money = PSF_PrintedCount - PSF_LastNum;
                     if (isNaN(o_money)) {
                         $("input['PSF_PrintedPositive'][value_positiveid='" + value_SelWaerIdNum + "']").val("0");
                     } else {
                         $("input['PSF_PrintedPositive'][value_positiveid='" + value_SelWaerIdNum + "']").val(o_money);
                     }
                 }
             });
             $(".AddForums").click(function () {
                 $(".ForumName").last().show();
                 var value_id = parseInt($(".AddTab").last().attr("value_id"));
                 $(".AddTab").last().after($(".AddTab").last().clone(true));
                 $(".AddTab").last().attr("value_id", value_id + 1);
                 $(".xialap").last().attr("value_ppwaerid", value_id + 1);
                 $(".AddTab span").last().text(value_id + 1);
                 $(".FromWarehouse").last().attr("value_WaerId", value_id + 1);
                 $("input[name='PSF_PaperId']").last().attr("value_PpWaerId", value_id + 1);
                 $("input[name='PMS_PaperCount1']").last().attr("value_PpWaerId", value_id + 1);
                 $("input[name='PSF_Forumsid']").last().val(value_id + 1);
                 $("input[name='PSF_BigPaperCount']").last().attr("value_PpWaerId", value_id + 1);
                 $("select[name='PSF_PaperSource']").last().attr("value_SelWaerId", value_id + 1);
                 $(".FromWarehouse").last().show();
                 $(".ForumName").last().show();
                 $("input[name='PSF_PaperName']").last().attr("value_ppwaerid", value_id + 1);
                 $("input[name='PSF_MaterialSpecifications']").last().attr("value_ppwaerid", value_id + 1);
                 $("select[name='selPaperName']").last().attr("value_ppwaerid", value_id + 1);
                 $("select[name='SelPaperSpec']").last().attr("value_ppwaerid", value_id + 1);
                 $("input[name='PSF_PrintedPositive']").last().attr("value_positiveid", value_id + 1);
                 $("input[name='PSF_LastNum']").last().attr("value_lastNumid", value_id + 1);
                 $("input[name='PSF_PrintedCount']").last().attr("value_ppwaerid", value_id + 1);
                 $("select[name='PSF_OpenSpecifications']").last().attr("value_selSpec", value_id + 1);
                 $("p[name='PSF_OpenSpecificationsspan']").last().attr("value_selspecspan", value_id + 1);
                 $("p[name='PSF_Zhizhangshuliang']").last().attr("value_selspecspan", value_id + 1);
                 $("p[name='PSF_Kailiaoguige']").last().attr("value_selspecspan", value_id + 1);
                 $("p[name='PSF_Zhizhangshulianga']").last().attr("value_selspecspan", value_id + 1);
                 $("p[name='PSF_Yinshuazhengshu']").last().attr("value_selspecspan", value_id + 1);
                 $("p[name='PSF_Xiaohao']").last().attr("value_selspecspan", value_id + 1);
                 $("p[name='PSF_Kuandu']").last().attr("value_selspecspan", value_id + 1);
                 $("p[name='PSF_OpenWidthspan']").last().attr("value_openwidthspan", value_id + 1);
                 $("p[name='PSF_yinse']").last().attr("value_openwidthspan", value_id + 1);
                 $("p[name='PSF_yinsezheng']").last().attr("value_openwidthspan", value_id + 1);
                 $("p[name='PSF_yinshufangshi']").last().attr("value_openwidthspan", value_id + 1);
                 $("p[name='PSF_yinsebei']").last().attr("value_openwidthspan", value_id + 1);
                 $("select[name='PSF_PrintedColorRear']").last().attr("value_ppwaerid", value_id + 1);
                 $("select[name='PSF_PressesDesk']").last().attr("value_selspec", value_id + 1);
                 $("select[name='PSF_PrintedColorPositive']").last().attr("value_selspec", value_id + 1);
                 $("select[name='PSF_Typesetting']").last().attr("value_ppwaerid", value_id + 1);
                 $("input[name='PSF_Fabantaoshu']").last().attr("value_ppwaerid", value_id + 1);
                 $("input[name='PSF_OpenWidth']").last().attr("value_ppwaerid", value_id + 1);
                 $("input[name='PSF_OpenWidthName']").last().attr("value_ppwaerid", value_id + 1);
                 $("input[name='PSF_OpenLength']").last().attr("value_ppwaerid", value_id + 1);
                 $("select[name='selPlateType']").last().attr("value_selwaerid", value_id + 1);
                 $(".FromWarehouseByBanCai").last().attr("value_waerid", value_id + 1);
                 $(".CTPSpecName").last().attr("value_ppwaerid", value_id + 1);
                 $(".CTPCount").last().attr("value_ppwaerid", value_id + 1);
                 $(".lbCTPCount").last().attr("value_ppwaerid", value_id + 1);
                 $(".lbCTPCounta").last().attr("value_ppwaerid", value_id + 1);
                 $(".lbCTPCountb").last().attr("value_ppwaerid", value_id + 1);
                 $(".lbCTPCountc").last().attr("value_ppwaerid", value_id + 1);
                 $(".PSF_Qitadingdanhao").last().attr("value_ppwaerid", value_id + 1);
                 $("input[name='PSF_Qitadingdanhao']").last().attr("value_ppwaerid", value_id + 1);
                 $("select[name='PSF_Component']").last().attr("value_ppwaerid", value_id + 1);
                 $("input[name='PSF_PNum']").last().attr("value_ppwaerid", value_id + 1);
                 $(".tdCTPCount").last().attr("value_ppwaerid", value_id + 1);
                 $(".selCTPSpec").last().attr("value_ppwaerid", value_id + 1);
                 $(".selFilmSpec").last().attr("value_ppwaerid", value_id + 1);
                 $(".lbPSSpec").last().attr("value_ppwaerid", value_id + 1);
                 $(".tdPSSpec").last().attr("value_ppwaerid", value_id + 1);
                 $(".lbPSCount").last().attr("value_ppwaerid", value_id + 1);
                 $(".tdPsCount").last().attr("value_ppwaerid", value_id + 1);
                 $("input[name='PSF_PaperId2']").last().attr("value_PpWaerId", value_id + 1);
                 $("input[name='PSF_PaperId3']").last().attr("value_PpWaerId", value_id + 1);
                 $("tr[name='PSF_PrintedPaperTd']").last().attr("value_selspec", value_id + 1);
                 $("tr[name='PSF_PrintedPaperTdtr']").last().attr("value_selspec", value_id + 1);
                 $("tr[name='PSF_PrintedPaperTdtrtr']").last().attr("value_selspec", value_id + 1);
                 $("select[name='PSF_Typesettinghide']").last().attr("value_ppwaerid", value_id + 1);
                 //                $("select[name='PSF_OpenSpecifications']").last().val("小全开");
                 //$("p[name='PSF_OpenSpecificationsspan']").last().text("开数");
                 //$("p[name='PSF_OpenWidthspan']").last().text("长度(mm)");
                 $("select[name='PSF_OpenSpecifications']").last().change();
                 $("select[name='PSF_PrintedColorRear']").last().change();
                 $("select[name='PSF_PaperSource']").last().val("来自仓库");
                 $("select[name='PSF_PaperSource']").last().change();
                 $("select[name='selPlateType']").last().val("本厂CTP");
                 $("select[name='selPlateType']").last().change();
                 $("select[name='PSF_OpenSpecifications']").last().val("8开");
                 $("select[name='PSF_OpenSpecifications']").last().change();
                 $("input[name='CTPSpecName']").last().val("460*395");
                 $("input[name='PSF_PNum']").last().val("");
                 if ($("select[name='PSF_Component']").first().val() == "封面") {
                     const newOptions = [
                         { value: '多单合拼', text: '多单合拼' },
                         { value: '内页', text: '内页' }
                     ];
                     // 3. 批量新增option到select中
                     let optionHtml = '';
                     newOptions.forEach(item => {
                         // 拼接option标签,直接赋值即可
                         optionHtml += `<option value="${item.value}">${item.text}</option>`;
                     });
                     $("select[name='PSF_Component']").last().html(optionHtml); // 赋值到select,完成新增
                     $("select[name='PSF_Component']").last().val("内页");
                }
                $("input[name='PSF_PaperName']").last().val("");
                $("input[name='PSF_MaterialSpecifications']").last().val("");
                $("input[name='PSF_PrintedCount']").last().val("");
                $("input[name='PSF_PrintedPositive']").last().val("");
                $("input[name='PSF_LastNum']").last().last().val("");
                // $("input[name='CTPSpecName']").last().val("");
                $("input[name='CTPCount']").last().last().val("");
                $("select[name='PSF_PressesDesk']").last().change();
            });
            $(".FromWarehouseByBanCai").click(function () {
                var value_pparid = "2";
                top.Dialog.open({ URL: "/Pages/business/AgConWarehouse.aspx?CommidityType=版材&&value_pparid=" + value_pparid, Width: 1000, Height: 650, Title: "选择货品参数" });
            $(".CutForums").click(function () {
                var value_id = parseInt($(".AddTab").last().attr("value_id"));
                if (value_id == 1) {
                } else {
                    $(".AddTab").last().remove();
                }
            });
            $(".FromWarehouseByBanCai1").click(function () {
                var value_pparid = "3";
                top.Dialog.open({ URL: "/Pages/business/AgConWarehouse.aspx?CommidityType=版材&&value_pparid=" + value_pparid, Width: 1000, Height: 650, Title: "选择货品参数" });
             $(".AddHoudaos").click(function () {
                 var value_id = parseInt($(".AddHoudao").last().attr("value_id"));
                 $(".AddHoudao").last().after($(".AddHoudao").last().clone(true));
                 $(".AddHoudao").last().attr("value_id", value_id + 1);
                 $(".AddHoudaos").last().attr("value_id", value_id + 1);
                 $(".CutHoudaos").last().attr("value_id", value_id + 1);
             });
             $(".CutHoudaos").click(function () {
                 var value_id = parseInt($(this).attr("value_id"));
                 var count = $('.AddHoudao').length;
                 if (count == 1) {
                 } else {
                     $(".AddHoudao[value_id='" + value_id + "']").remove();
                 }
             });
            $("select[name='PSF_PaperSource']").live("change", function () {
                var value_SelWaerId = $(this).attr("value_SelWaerId");
                if ($(this).val() == "来自仓库") {
                    $(".FromWarehouse[value_WaerId='" + value_SelWaerId + "']").show();
                    $(".PSF_PaperName[value_ppwaerid='" + value_SelWaerId + "']").show();
                    $(".PSF_MaterialSpecifications[value_ppwaerid='" + value_SelWaerId + "']").show();
                    $(".selPaperName[value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $(".SelPaperSpec[value_ppwaerid='" + value_SelWaerId + "']").hide();
                } else {
                    $("input[name='PSF_PaperId'][value_ppwaerid='" + value_SelWaerId + "']").val("");
                    $("input[name='PMS_PaperCount1'][value_ppwaerid='" + value_SelWaerId + "']").val("");
                    $(".FromWarehouse[value_WaerId='" + value_SelWaerId + "']").hide();
                    $(".PSF_PaperName[value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $(".PSF_MaterialSpecifications[value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $(".selPaperName[value_ppwaerid='" + value_SelWaerId + "']").show();
                    $(".SelPaperSpec[value_ppwaerid='" + value_SelWaerId + "']").show();
                }
            });
            $("select[name='PSF_Component']").live("change", function () {
                var value_SelWaerId = $(this).attr("value_ppwaerid");
                if ($(this).val() == "封面") {
                    $("input[name='PSF_PNum'][value_ppwaerid='" + value_SelWaerId + "']").val("4");
                } else {
                    $("input[name='PSF_PNum'][value_ppwaerid='" + value_SelWaerId + "']").val("");
                }
            });
            $("select[name='selPlateType']").live("change", function () {
                var value_SelWaerId = $(this).attr("value_selwaerid");
                if ($(this).val() == "本厂CTP") {
                    $(".FromWarehouseByBanCai[value_WaerId='" + value_SelWaerId + "']").show();
                    $(".CTPSpecName[value_ppwaerid='" + value_SelWaerId + "']").show();
                    $(".lbCTPCount[value_ppwaerid='" + value_SelWaerId + "']").show();
                    $(".tdCTPCount[value_ppwaerid='" + value_SelWaerId + "']").show();
                    $(".selCTPSpec[value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $(".selFilmSpec[value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $(".lbPSSpec[value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $(".tdPSSpec[value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $(".lbPSCount[value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $(".tdPsCount[value_ppwaerid='" + value_SelWaerId + "']").hide();
                } else if ($(this).val() == "自带CTP") {
                    $(".FromWarehouseByBanCai[value_WaerId='" + value_SelWaerId + "']").hide();
                    $(".CTPSpecName[value_ppwaerid='" + value_SelWaerId + "']").show();
                    $(".lbCTPCount[value_ppwaerid='" + value_SelWaerId + "']").show();
                    $(".tdCTPCount[value_ppwaerid='" + value_SelWaerId + "']").show();
                    $(".selCTPSpec[value_ppwaerid='" + value_SelWaerId + "']").show();
                    $(".selFilmSpec[value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $(".lbPSSpec[value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $(".tdPSSpec[value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $(".lbPSCount[value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $(".tdPsCount[value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $("input[name='PSF_PaperId2'][value_ppwaerid='" + value_WaerId + "']").val("");
                }
                else {
                    $(".FromWarehouseByBanCai[value_WaerId='" + value_SelWaerId + "']").hide();
                    $(".CTPSpecName[value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $(".lbCTPCount[value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $(".tdCTPCount[value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $(".selCTPSpec[value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $(".selFilmSpec[value_ppwaerid='" + value_SelWaerId + "']").show();
                    $(".lbPSSpec[value_ppwaerid='" + value_SelWaerId + "']").show();
                    $(".tdPSSpec[value_ppwaerid='" + value_SelWaerId + "']").show();
                    $(".lbPSCount[value_ppwaerid='" + value_SelWaerId + "']").show();
                    $(".tdPsCount[value_ppwaerid='" + value_SelWaerId + "']").show();
                }
            });
            $("select[name='PSF_OpenSpecifications']").live("change", function () {
                var value_SelWaerId = $(this).attr("value_selSpec");
                if ($(this).val() == "小全开") {
                    $("input[name='PSF_OpenWidth'][value_ppwaerid='" + value_SelWaerId + "']").val("<%=Width[0]%>");
                    $("input[name='PSF_OpenLength'][value_ppwaerid='" + value_SelWaerId + "']").val("<%=Lenth[0] %>");
                }
                else if ($(this).val() == "2开") {
                    $("input[name='PSF_OpenWidth'][value_ppwaerid='" + value_SelWaerId + "']").val("<%=Width[1]%>");
                    $("input[name='PSF_OpenLength'][value_ppwaerid='" + value_SelWaerId + "']").val("<%=Lenth[1] %>");
                }
                else if ($(this).val() == "3开") {
                    $("input[name='PSF_OpenWidth'][value_ppwaerid='" + value_SelWaerId + "']").val("<%=Width[2]%>");
                    $("input[name='PSF_OpenLength'][value_ppwaerid='" + value_SelWaerId + "']").val("<%=Lenth[2] %>");
                }
                else if ($(this).val() == "4开") {
                    $("input[name='PSF_OpenWidth'][value_ppwaerid='" + value_SelWaerId + "']").val("<%=Width[3]%>");
                    $("input[name='PSF_OpenLength'][value_ppwaerid='" + value_SelWaerId + "']").val("<%=Lenth[3] %>");
                }
                else if ($(this).val() == "6开") {
                    $("input[name='PSF_OpenWidth'][value_ppwaerid='" + value_SelWaerId + "']").val("<%=Width[4]%>");
                    $("input[name='PSF_OpenLength'][value_ppwaerid='" + value_SelWaerId + "']").val("<%=Lenth[4] %>");
                }
                else if ($(this).val() == "8开") {
                    $("input[name='PSF_OpenWidth'][value_ppwaerid='" + value_SelWaerId + "']").val("<%=Width[5]%>");
                    $("input[name='PSF_OpenLength'][value_ppwaerid='" + value_SelWaerId + "']").val("<%=Lenth[5] %>");
                }
                else if ($(this).val() == "其它") {
                    $("input[name='PSF_OpenWidth'][value_ppwaerid='" + value_SelWaerId + "']").val("<%=Width[6]%>");
                    $("input[name='PSF_OpenLength'][value_ppwaerid='" + value_SelWaerId + "']").val("<%=Lenth[6] %>");
                }
                else {
                    $("input[name='PSF_OpenWidth'][value_ppwaerid='" + value_SelWaerId + "']").val("");
                    $("input[name='PSF_OpenLength'][value_ppwaerid='" + value_SelWaerId + "']").val("");
                }
            });
            $("select[name='PSF_Typesetting']").live("change", function () {
                var value_SelWaerId = $(this).attr("value_ppwaerid");
                if ($("select[name='PSF_PressesDesk'][value_selspec='" + value_SelWaerId + "']").val().indexOf('六开') >= 0 ) {
                    if ($("select[name='PSF_Typesetting'][value_ppwaerid='" + value_SelWaerId + "']").val() == "扣版" || $("select[name='PSF_PrintedColorPositive'][value_selspec='" + value_SelWaerId + "']").val() == "双色") {
                        $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").val("2");
                    } else {
                        $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").val("1");
                    }
                }
                if ( $("select[name='PSF_PressesDesk'][value_selspec='" + value_SelWaerId + "']").val().indexOf('黑白') >= 0) {
                    if ($("select[name='PSF_Typesetting'][value_ppwaerid='" + value_SelWaerId + "']").val() == "扣版") {
                        $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").val("2");
                    } else {
                        $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").val("1");
                    }
                }
                if ($("select[name='PSF_PressesDesk'][value_selspec='" + value_SelWaerId + "']").val().indexOf('四色') >= 0 || $("select[name='PSF_PressesDesk'][value_selspec='" + value_SelWaerId + "']").val().indexOf('八色') >= 0) {
                    if ($("select[name='PSF_Typesetting'][value_ppwaerid='" + value_SelWaerId + "']").val() == "扣版") {
                        $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").val("8");
                    } else {
                        $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").val("4");
                    }
                }
            });
            $("select[name='PSF_PrintedColorPositive']").live("change", function () {
                var value_SelWaerId = $(this).attr("value_selspec");
                if ($("select[name='PSF_PressesDesk'][value_selspec='" + value_SelWaerId + "']").val().indexOf('六开') >= 0) {
                    if ($("select[name='PSF_Typesetting'][value_ppwaerid='" + value_SelWaerId + "']").val() == "扣版" || $("select[name='PSF_PrintedColorPositive'][value_selspec='" + value_SelWaerId + "']").val() == "双色") {
                        $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").val("2");
                    } else {
                        $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").val("1");
                    }
                }
            });
            $("select[name='PSF_PressesDesk']").live("change", function () {
                var value_SelWaerId = $(this).attr("value_selspec");
                if ($(this).val().indexOf('小森') >= 0) {
                    var selectPSF_PrintedColorPositive = $("select[name='PSF_PrintedColorPositive'][value_selspec='" + value_SelWaerId + "']");
                    // 清空现有的option
                    selectPSF_PrintedColorPositive.empty();
                    const newOptions1 = [
                        { value: '单色', text: '单色' },
                        { value: '双色', text: '双色' },
                        { value: '三色', text: '三色' },
                        { value: '四色', text: '四色' },
                    ];
                    // 3. 批量新增option到select中
                    let optionHtml1 = '';
                    newOptions1.forEach(item => {
                        // 拼接option标签,直接赋值即可
                        optionHtml1 += `<option value="${item.value}">${item.text}</option>`;
                    });
                    selectPSF_PrintedColorPositive.html(optionHtml1); // 赋值到select,完成新增
                    var selectPSF_PrintedColorRear = $("select[name='PSF_PrintedColorRear'][value_ppwaerid='" + value_SelWaerId + "']");
                    // 清空现有的option
                    selectPSF_PrintedColorRear.empty();
                    const newOptions2 = [
                        { value: '0色', text: '0色' },
                        { value: '单色', text: '单色' },
                        { value: '双色', text: '双色' },
                        { value: '三色', text: '三色' },
                        { value: '四色', text: '四色' },
                    ];
                    // 3. 批量新增option到select中
                    let optionHtml2 = '';
                    newOptions2.forEach(item => {
                        // 拼接option标签,直接赋值即可
                        optionHtml2 += `<option value="${item.value}">${item.text}</option>`;
                    });
                    selectPSF_PrintedColorRear.html(optionHtml2); // 赋值到select,完成新增
                } else {
                    var selectPSF_PrintedColorPositive = $("select[name='PSF_PrintedColorPositive'][value_selspec='" + value_SelWaerId + "']");
                    // 清空现有的option
                    selectPSF_PrintedColorPositive.empty();
                    const newOptions1 = [
                        { value: '单色', text: '单色' },
                        { value: '双色', text: '双色' },
                        { value: '三色', text: '三色' },
                        { value: '四色', text: '四色' },
                        { value: '四+专', text: '四+专' },
                    ];
                    // 3. 批量新增option到select中
                    let optionHtml1 = '';
                    newOptions1.forEach(item => {
                        // 拼接option标签,直接赋值即可
                        optionHtml1 += `<option value="${item.value}">${item.text}</option>`;
                    });
                    selectPSF_PrintedColorPositive.html(optionHtml1); // 赋值到select,完成新增
                    var selectPSF_PrintedColorRear = $("select[name='PSF_PrintedColorRear'][value_ppwaerid='" + value_SelWaerId + "']");
                    // 清空现有的option
                    selectPSF_PrintedColorRear.empty();
                    const newOptions2 = [
                        { value: '0色', text: '0色' },
                        { value: '单色', text: '单色' },
                        { value: '双色', text: '双色' },
                        { value: '三色', text: '三色' },
                        { value: '四色', text: '四色' },
                        { value: '四+专', text: '四+专' },
                    ];
                    // 3. 批量新增option到select中
                    let optionHtml2 = '';
                    newOptions2.forEach(item => {
                        // 拼接option标签,直接赋值即可
                        optionHtml2 += `<option value="${item.value}">${item.text}</option>`;
                    });
                    selectPSF_PrintedColorRear.html(optionHtml2); // 赋值到select,完成新增
                }
                if ($(this).val().indexOf('六开') >= 0) {
                    $("select[name='PSF_PrintedColorPositive'][value_selspec='" + value_SelWaerId + "']").val("单色");
                    $("select[name='PSF_PrintedColorRear'][value_ppwaerid='" + value_SelWaerId + "']").val("单色");
                    $("input[name='CTPSpecName'][value_ppwaerid='" + value_SelWaerId + "']").val("460*395");
                    $("select[name='PSF_OpenSpecifications'][value_selspec='" + value_SelWaerId + "']").val("8开");
                    $("select[name='PSF_OpenSpecifications'][value_selspec='" + value_SelWaerId + "']").change();
                    $("select[name='PSF_OpenSpecifications'][value_selspec='" + value_SelWaerId + "']").show();
                    $("p[name='PSF_OpenSpecificationsspan'][value_selspecspan='" + value_SelWaerId + "']").show();
                    $("p[name='PSF_OpenWidthspan'][value_openwidthspan='" + value_SelWaerId + "']").show();
                    $("input[name='PSF_OpenLength'][value_ppwaerid='" + value_SelWaerId + "']").show();
                    $("input[name='PSF_OpenWidth'][value_ppwaerid='" + value_SelWaerId + "']").show();
                    $(".xialap[value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $("select[name='PSF_Typesetting'][value_ppwaerid='" + value_SelWaerId + "']").show();
                    $("p[name='PSF_yinse'][value_openwidthspan='" + value_SelWaerId + "']").show();
                    $("p[name='PSF_yinsezheng'][value_openwidthspan='" + value_SelWaerId + "']").show();
                    $("p[name='PSF_yinsebei'][value_openwidthspan='" + value_SelWaerId + "']").show();
                    $("p[name='PSF_yinshufangshi'][value_openwidthspan='" + value_SelWaerId + "']").show();
                    $("select[name='PSF_PrintedColorRear'][value_ppwaerid='" + value_SelWaerId + "']").show();
                    $("select[name='PSF_PrintedColorPositive'][value_selspec='" + value_SelWaerId + "']").show();
                    $("tr[name='PSF_PrintedPaperTd'][value_selspec='" + value_SelWaerId + "']").show();
                    $("tr[name='PSF_PrintedPaperTdtr'][value_selspec='" + value_SelWaerId + "']").show();
                    $("tr[name='PSF_PrintedPaperTdtrtr'][value_selspec='" + value_SelWaerId + "']").show();
                    $("select[name='PSF_Typesettinghide'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $(".lbCTPCount[value_ppwaerid='" + value_SelWaerId + "']").show();
                    $(".PSF_Qitadingdanhao[value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").show();
                    if ($("select[name='PSF_Typesetting'][value_ppwaerid='" + value_SelWaerId + "']").val() == "扣版") {
                        $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").val("2");
                    } else {
                        $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").val("1");
                    }
                }
                else if ($(this).val().indexOf('四色') >= 0) {
                    $("select[name='PSF_PrintedColorPositive'][value_selspec='" + value_SelWaerId + "']").val("四色");
                    $("select[name='PSF_PrintedColorRear'][value_ppwaerid='" + value_SelWaerId + "']").val("四色");
                    $("input[name='CTPSpecName'][value_ppwaerid='" + value_SelWaerId + "']").val("1030*770");
                    $("select[name='PSF_OpenSpecifications'][value_selspec='" + value_SelWaerId + "']").val("2开");
                    $("select[name='PSF_OpenSpecifications'][value_selspec='" + value_SelWaerId + "']").change();
                    $("select[name='PSF_OpenSpecifications'][value_selspec='" + value_SelWaerId + "']").show();
                    $("p[name='PSF_OpenSpecificationsspan'][value_selspecspan='" + value_SelWaerId + "']").show();
                    $("p[name='PSF_OpenWidthspan'][value_openwidthspan='" + value_SelWaerId + "']").show();
                    $("input[name='PSF_OpenLength'][value_ppwaerid='" + value_SelWaerId + "']").show();
                    $("input[name='PSF_OpenWidth'][value_ppwaerid='" + value_SelWaerId + "']").show();
                    $(".xialap[value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $("select[name='PSF_Typesetting'][value_ppwaerid='" + value_SelWaerId + "']").show();
                    $("p[name='PSF_yinse'][value_openwidthspan='" + value_SelWaerId + "']").show();
                    $("p[name='PSF_yinsezheng'][value_openwidthspan='" + value_SelWaerId + "']").show();
                    $("p[name='PSF_yinsebei'][value_openwidthspan='" + value_SelWaerId + "']").show();
                    $("p[name='PSF_yinshufangshi'][value_openwidthspan='" + value_SelWaerId + "']").show();
                    $("select[name='PSF_PrintedColorRear'][value_ppwaerid='" + value_SelWaerId + "']").show();
                    $("select[name='PSF_PrintedColorPositive'][value_selspec='" + value_SelWaerId + "']").show();
                    $("tr[name='PSF_PrintedPaperTd'][value_selspec='" + value_SelWaerId + "']").show();
                    $("tr[name='PSF_PrintedPaperTdtr'][value_selspec='" + value_SelWaerId + "']").show();
                    $("tr[name='PSF_PrintedPaperTdtrtr'][value_selspec='" + value_SelWaerId + "']").show();
                    $("select[name='PSF_Typesettinghide'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $(".lbCTPCount[value_ppwaerid='" + value_SelWaerId + "']").show();
                    $(".PSF_Qitadingdanhao[value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").show();
                    //$("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").val("4");
                    if ($("select[name='PSF_Typesetting'][value_ppwaerid='" + value_SelWaerId + "']").val() == "扣版") {
                        $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").val("8");
                    } else {
                        $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").val("4");
                    }
                }
                else if ($(this).val().indexOf('八色') >= 0) {
                    $("select[name='PSF_PrintedColorPositive'][value_selspec='" + value_SelWaerId + "']").val("四色");
                    $("select[name='PSF_PrintedColorRear'][value_ppwaerid='" + value_SelWaerId + "']").val("四色");
                    $("input[name='CTPSpecName'][value_ppwaerid='" + value_SelWaerId + "']").val("1030*790");
                    $("select[name='PSF_OpenSpecifications'][value_selspec='" + value_SelWaerId + "']").val("2开");
                    $("select[name='PSF_OpenSpecifications'][value_selspec='" + value_SelWaerId + "']").change();
                    $("select[name='PSF_OpenSpecifications'][value_selspec='" + value_SelWaerId + "']").show();
                    $("p[name='PSF_OpenSpecificationsspan'][value_selspecspan='" + value_SelWaerId + "']").show();
                    $("p[name='PSF_OpenWidthspan'][value_openwidthspan='" + value_SelWaerId + "']").show();
                    $("input[name='PSF_OpenLength'][value_ppwaerid='" + value_SelWaerId + "']").show();
                    $("input[name='PSF_OpenWidth'][value_ppwaerid='" + value_SelWaerId + "']").show();
                    $(".xialap[value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $("select[name='PSF_Typesetting'][value_ppwaerid='" + value_SelWaerId + "']").show();
                    $("p[name='PSF_yinse'][value_openwidthspan='" + value_SelWaerId + "']").show();
                    $("p[name='PSF_yinsezheng'][value_openwidthspan='" + value_SelWaerId + "']").show();
                    $("p[name='PSF_yinsebei'][value_openwidthspan='" + value_SelWaerId + "']").show();
                    $("p[name='PSF_yinshufangshi'][value_openwidthspan='" + value_SelWaerId + "']").show();
                    $("select[name='PSF_PrintedColorRear'][value_ppwaerid='" + value_SelWaerId + "']").show();
                    $("select[name='PSF_PrintedColorPositive'][value_selspec='" + value_SelWaerId + "']").show();
                    $("tr[name='PSF_PrintedPaperTd'][value_selspec='" + value_SelWaerId + "']").show();
                    $("tr[name='PSF_PrintedPaperTdtr'][value_selspec='" + value_SelWaerId + "']").show();
                    $("tr[name='PSF_PrintedPaperTdtrtr'][value_selspec='" + value_SelWaerId + "']").show();
                    $("select[name='PSF_Typesettinghide'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $(".lbCTPCount[value_ppwaerid='" + value_SelWaerId + "']").show();
                    $(".PSF_Qitadingdanhao[value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").show();
                   // $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").val("4");
                    if ($("select[name='PSF_Typesetting'][value_ppwaerid='" + value_SelWaerId + "']").val() == "扣版") {
                        $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").val("8");
                    } else {
                        $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").val("4");
                    }
                }
                else if ($(this).val().indexOf('黑白') >= 0) {
                    $("select[name='PSF_PrintedColorPositive'][value_selspec='" + value_SelWaerId + "']").val("单色");
                    $("select[name='PSF_PrintedColorRear'][value_ppwaerid='" + value_SelWaerId + "']").val("单色");
                    $("input[name='CTPSpecName'][value_ppwaerid='" + value_SelWaerId + "']").val("920*760");
                    $("select[name='PSF_OpenSpecifications'][value_selspec='" + value_SelWaerId + "']").val("2开");
                    $("select[name='PSF_OpenSpecifications'][value_selspec='" + value_SelWaerId + "']").change();
                    $("select[name='PSF_OpenSpecifications'][value_selspec='" + value_SelWaerId + "']").show();
                    $("p[name='PSF_OpenSpecificationsspan'][value_selspecspan='" + value_SelWaerId + "']").show();
                    $("p[name='PSF_OpenWidthspan'][value_openwidthspan='" + value_SelWaerId + "']").show();
                    $("input[name='PSF_OpenLength'][value_ppwaerid='" + value_SelWaerId + "']").show();
                    $("input[name='PSF_OpenWidth'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $(".xialap[value_ppwaerid='" + value_SelWaerId + "']").show();
                    $("select[name='PSF_Typesetting'][value_ppwaerid='" + value_SelWaerId + "']").show();
                    $("p[name='PSF_yinse'][value_openwidthspan='" + value_SelWaerId + "']").show();
                    $("p[name='PSF_yinsezheng'][value_openwidthspan='" + value_SelWaerId + "']").show();
                    $("p[name='PSF_yinsebei'][value_openwidthspan='" + value_SelWaerId + "']").show();
                    $("p[name='PSF_yinshufangshi'][value_openwidthspan='" + value_SelWaerId + "']").show();
                    $("select[name='PSF_PrintedColorRear'][value_ppwaerid='" + value_SelWaerId + "']").show();
                    $("select[name='PSF_PrintedColorPositive'][value_selspec='" + value_SelWaerId + "']").show();
                    $("tr[name='PSF_PrintedPaperTd'][value_selspec='" + value_SelWaerId + "']").show();
                    $("tr[name='PSF_PrintedPaperTdtr'][value_selspec='" + value_SelWaerId + "']").show();
                    $("tr[name='PSF_PrintedPaperTdtrtr'][value_selspec='" + value_SelWaerId + "']").show();
                    $("select[name='PSF_Typesettinghide'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $(".lbCTPCount[value_ppwaerid='" + value_SelWaerId + "']").show();
                    $(".PSF_Qitadingdanhao[value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").show();
                    $("input[name='PSF_OpenWidthName'][value_ppwaerid='" + value_SelWaerId + "']").val("870");
                    if ($("select[name='PSF_Typesetting'][value_ppwaerid='" + value_SelWaerId + "']").val() == "扣版") {
                        $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").val("2");
                    } else {
                        $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").val("1");
                    }
                }
                else if ($(this).val().indexOf('轮转') >= 0) {
                    $("select[name='PSF_PrintedColorPositive'][value_selspec='" + value_SelWaerId + "']").val("单色");
                    $("select[name='PSF_PrintedColorRear'][value_ppwaerid='" + value_SelWaerId + "']").val("单色");
                    $("input[name='CTPSpecName'][value_ppwaerid='" + value_SelWaerId + "']").val("810*579");
                    $("select[name='PSF_OpenSpecifications'][value_selspec='" + value_SelWaerId + "']").val("");
                    $("select[name='PSF_OpenSpecifications'][value_selspec='" + value_SelWaerId + "']").change();
                    $("select[name='PSF_OpenSpecifications'][value_selspec='" + value_SelWaerId + "']").hide();
                    $(".xialap[value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $("input[name='PSF_OpenWidthName'][value_ppwaerid='" + value_SelWaerId + "']").val("755");
                    $("p[name='PSF_OpenSpecificationsspan'][value_selspecspan='" + value_SelWaerId + "']").hide();
                    $("p[name='PSF_OpenWidthspan'][value_openwidthspan='" + value_SelWaerId + "']").hide();
                    $("input[name='PSF_OpenLength'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $("input[name='PSF_OpenWidth'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $("select[name='PSF_Typesetting'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $("p[name='PSF_yinse'][value_openwidthspan='" + value_SelWaerId + "']").show();
                    $("p[name='PSF_yinsezheng'][value_openwidthspan='" + value_SelWaerId + "']").show();
                    $("p[name='PSF_yinsebei'][value_openwidthspan='" + value_SelWaerId + "']").show();
                    $("p[name='PSF_yinshufangshi'][value_openwidthspan='" + value_SelWaerId + "']").hide();
                    $("select[name='PSF_PrintedColorRear'][value_ppwaerid='" + value_SelWaerId + "']").show();
                    $("select[name='PSF_PrintedColorPositive'][value_selspec='" + value_SelWaerId + "']").show();
                    $("tr[name='PSF_PrintedPaperTd'][value_selspec='" + value_SelWaerId + "']").show();
                    $("tr[name='PSF_PrintedPaperTdtr'][value_selspec='" + value_SelWaerId + "']").show();
                    $("tr[name='PSF_PrintedPaperTdtrtr'][value_selspec='" + value_SelWaerId + "']").show();
                    $("select[name='PSF_Typesettinghide'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $(".lbCTPCount[value_ppwaerid='" + value_SelWaerId + "']").show();
                    $(".PSF_Qitadingdanhao[value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").show();
                    $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").val("2");
                    if ($(this).val().indexOf('小森') >= 0) {
                        $("select[name='PSF_PrintedColorPositive'][value_selspec='" + value_SelWaerId + "']").val("四色");
                        $("select[name='PSF_PrintedColorRear'][value_ppwaerid='" + value_SelWaerId + "']").val("四色");
                        $("input[name='CTPSpecName'][value_ppwaerid='" + value_SelWaerId + "']").val("900*570");
                        $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").val("8");
                    }
                }
                // else if () {
                //    //$("select[name='PSF_OpenSpecifications'][value_selspec='" + value_SelWaerId + "']").show();
                //    //$("p[name='PSF_OpenSpecificationsspan'][value_selspecspan='" + value_SelWaerId + "']").show();
                //    //$("p[name='PSF_OpenWidthspan'][value_openwidthspan='" + value_SelWaerId + "']").show();
                //    //$("input[name='PSF_OpenLength'][value_ppwaerid='" + value_SelWaerId + "']").show();
                //    //$("input[name='PSF_OpenWidth'][value_ppwaerid='" + value_SelWaerId + "']").show();
                //    //$(".xialap[value_ppwaerid='" + value_SelWaerId + "']").hide();
                //    //$("select[name='PSF_Typesetting'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                //    //$("p[name='PSF_yinse'][value_openwidthspan='" + value_SelWaerId + "']").hide();
                //    //$("p[name='PSF_yinsezheng'][value_openwidthspan='" + value_SelWaerId + "']").hide();
                //    //$("p[name='PSF_yinsebei'][value_openwidthspan='" + value_SelWaerId + "']").hide();
                //    //$("select[name='PSF_PrintedColorRear'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                //    //$("select[name='PSF_PrintedColorPositive'][value_selspec='" + value_SelWaerId + "']").hide();
                //    //$("tr[name='PSF_PrintedPaperTd'][value_selspec='" + value_SelWaerId + "']").hide();
                //    //$("tr[name='PSF_PrintedPaperTdtr'][value_selspec='" + value_SelWaerId + "']").hide();
                //    //$("tr[name='PSF_PrintedPaperTdtrtr'][value_selspec='" + value_SelWaerId + "']").hide();
                //    //$("select[name='PSF_Typesettinghide'][value_ppwaerid='" + value_SelWaerId + "']").show();
                //    //$("select[name='PSF_PrintedColorPositive'][value_selspec='" + value_SelWaerId + "']").val("");
                //    //$("select[name='PSF_PrintedColorRear'][value_ppwaerid='" + value_SelWaerId + "']").val("");
                //}
                else if ($(this).val().indexOf('直接修切') >= 0 || $(this).val().indexOf('数码') >= 0 || $(this).val().indexOf('补单') >= 0 ) {
                    $("select[name='PSF_PrintedColorPositive'][value_selspec='" + value_SelWaerId + "']").val("单色");
                    $("select[name='PSF_PrintedColorRear'][value_ppwaerid='" + value_SelWaerId + "']").val("单色");
                    $("input[name='CTPSpecName'][value_ppwaerid='" + value_SelWaerId + "']").val("460*395");
                    $("select[name='PSF_OpenSpecifications'][value_selspec='" + value_SelWaerId + "']").val("");
                    $("select[name='PSF_OpenSpecifications'][value_selspec='" + value_SelWaerId + "']").change();
                    $("select[name='PSF_OpenSpecifications'][value_selspec='" + value_SelWaerId + "']").show();
                    $("p[name='PSF_OpenSpecificationsspan'][value_selspecspan='" + value_SelWaerId + "']").show();
                    $("p[name='PSF_OpenWidthspan'][value_openwidthspan='" + value_SelWaerId + "']").show();
                    $("input[name='PSF_OpenLength'][value_ppwaerid='" + value_SelWaerId + "']").show();
                    $("input[name='PSF_OpenWidth'][value_ppwaerid='" + value_SelWaerId + "']").show();
                    $(".xialap[value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $(".lbCTPCount[value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $(".PSF_Qitadingdanhao[value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").val("");
                    $("select[name='PSF_Typesetting'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $("p[name='PSF_yinse'][value_openwidthspan='" + value_SelWaerId + "']").hide();
                    $("p[name='PSF_yinsezheng'][value_openwidthspan='" + value_SelWaerId + "']").hide();
                    $("p[name='PSF_yinsebei'][value_openwidthspan='" + value_SelWaerId + "']").hide();
                    $("p[name='PSF_yinsebei'][value_openwidthspan='" + value_SelWaerId + "']").hide();
                    $("p[name='PSF_yinshufangshi'][value_openwidthspan='" + value_SelWaerId + "']").hide();
                    $("select[name='PSF_PrintedColorRear'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $("select[name='PSF_PrintedColorPositive'][value_selspec='" + value_SelWaerId + "']").hide();
                    $("tr[name='PSF_PrintedPaperTd'][value_selspec='" + value_SelWaerId + "']").show();
                    $("tr[name='PSF_PrintedPaperTdtr'][value_selspec='" + value_SelWaerId + "']").show();
                    $("tr[name='PSF_PrintedPaperTdtrtr'][value_selspec='" + value_SelWaerId + "']").show();
                    $("select[name='PSF_Typesettinghide'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                }
                else if ($(this).val().indexOf('与其他订单合版') >= 0) {
                    $("select[name='PSF_PrintedColorPositive'][value_selspec='" + value_SelWaerId + "']").val("单色");
                    $("select[name='PSF_PrintedColorRear'][value_ppwaerid='" + value_SelWaerId + "']").val("单色");
                    $("input[name='CTPSpecName'][value_ppwaerid='" + value_SelWaerId + "']").val("460*395");
                    $("select[name='PSF_OpenSpecifications'][value_selspec='" + value_SelWaerId + "']").val("");
                    $("select[name='PSF_OpenSpecifications'][value_selspec='" + value_SelWaerId + "']").change();
                    $("select[name='PSF_OpenSpecifications'][value_selspec='" + value_SelWaerId + "']").show();
                    $("p[name='PSF_OpenSpecificationsspan'][value_selspecspan='" + value_SelWaerId + "']").show();
                    $("p[name='PSF_OpenWidthspan'][value_openwidthspan='" + value_SelWaerId + "']").show();
                    $("input[name='PSF_OpenLength'][value_ppwaerid='" + value_SelWaerId + "']").show();
                    $("input[name='PSF_OpenWidth'][value_ppwaerid='" + value_SelWaerId + "']").show();
                    $(".xialap[value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $(".lbCTPCount[value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $(".PSF_Qitadingdanhao[value_ppwaerid='" + value_SelWaerId + "']").show();
                    $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").val("");
                    $("select[name='PSF_Typesetting'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $("p[name='PSF_yinse'][value_openwidthspan='" + value_SelWaerId + "']").hide();
                    $("p[name='PSF_yinsezheng'][value_openwidthspan='" + value_SelWaerId + "']").hide();
                    $("p[name='PSF_yinsebei'][value_openwidthspan='" + value_SelWaerId + "']").hide();
                    $("p[name='PSF_yinsebei'][value_openwidthspan='" + value_SelWaerId + "']").hide();
                    $("p[name='PSF_yinshufangshi'][value_openwidthspan='" + value_SelWaerId + "']").hide();
                    $("select[name='PSF_PrintedColorRear'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $("select[name='PSF_PrintedColorPositive'][value_selspec='" + value_SelWaerId + "']").hide();
                    $("tr[name='PSF_PrintedPaperTd'][value_selspec='" + value_SelWaerId + "']").hide();
                    $("tr[name='PSF_PrintedPaperTdtr'][value_selspec='" + value_SelWaerId + "']").hide();
                    $("tr[name='PSF_PrintedPaperTdtrtr'][value_selspec='" + value_SelWaerId + "']").hide();
                    $("select[name='PSF_Typesettinghide'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                }
                if ($(this).val().indexOf('轮转') >= 0) {
                    var selectElement =  $("select[name='PSF_Typesetting'][value_ppwaerid='" + value_SelWaerId + "']");
                    // 清空现有的option
                    selectElement.empty();
                    const newOptions = [
                        { value: '扣版', text: '扣版' },
                        { value: '单面', text: '单面' }
                    ];
                    // 3. 批量新增option到select中
                    let optionHtml = '';
                    newOptions.forEach(item => {
                        // 拼接option标签,直接赋值即可
                        optionHtml += `<option value="${item.value}">${item.text}</option>`;
                    });
                    selectElement.html(optionHtml); // 赋值到select,完成新增
                    $("p[name='PSF_Zhizhangshuliang'][value_selspecspan='" + value_SelWaerId + "']").hide();
                    $("p[name='PSF_Kailiaoguige'][value_selspecspan='" + value_SelWaerId + "']").hide();
                    $("p[name='PSF_Zhizhangshulianga'][value_selspecspan='" + value_SelWaerId + "']").hide();
                    $("p[name='PSF_Yinshuazhengshu'][value_selspecspan='" + value_SelWaerId + "']").hide();
                    $("p[name='PSF_Xiaohao'][value_selspecspan='" + value_SelWaerId + "']").hide();
                    $("p[name='PSF_Kuandu'][value_selspecspan='" + value_SelWaerId + "']").hide();
                    $("p[name='PSF_OpenSpecificationsspan'][value_selspecspan='" + value_SelWaerId + "']").hide();
                    $("p[name='PSF_OpenWidthspan'][value_openwidthspan='" + value_SelWaerId + "']").hide();
                    $("input[name='PSF_PrintedCount'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $("input[name='PSF_PrintedPositive'][value_positiveid='" + value_SelWaerId + "']").hide();
                    $("input[name='PSF_LastNum'][value_lastnumid='" + value_SelWaerId + "']").hide();
                    $("select[name='PSF_OpenSpecifications'][value_selspec='" + value_SelWaerId + "']").hide();
                    $("input[name='PSF_OpenWidth'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                    $("input[name='PSF_OpenLength'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                }
                else {
                    var selectElement = $("select[name='PSF_Typesetting'][value_ppwaerid='" + value_SelWaerId + "']")
                    // 清空现有的option
                    selectElement.empty();
                    const newOptions = [
                        { value: '自翻', text: '自翻' },
                        { value: '滚翻', text: '滚翻' },
                        { value: '扣版', text: '扣版' },
                        { value: '单面', text: '单面' }
                    ];
                    // 3. 批量新增option到select中
                    let optionHtml = '';
                    newOptions.forEach(item => {
                        // 拼接option标签,直接赋值即可
                        optionHtml += `<option value="${item.value}">${item.text}</option>`;
                    });
                    selectElement.html(optionHtml); // 赋值到select,完成新增
                    $("p[name='PSF_Zhizhangshuliang'][value_selspecspan='" + value_SelWaerId + "']").show();
                    $("p[name='PSF_Kailiaoguige'][value_selspecspan='" + value_SelWaerId + "']").show();
                    $("p[name='PSF_Zhizhangshulianga'][value_selspecspan='" + value_SelWaerId + "']").show();
                    $("p[name='PSF_Yinshuazhengshu'][value_selspecspan='" + value_SelWaerId + "']").show();
                    $("p[name='PSF_Xiaohao'][value_selspecspan='" + value_SelWaerId + "']").show();
                    $("p[name='PSF_Kuandu'][value_selspecspan='" + value_SelWaerId + "']").show();
                    $("p[name='PSF_OpenSpecificationsspan'][value_selspecspan='" + value_SelWaerId + "']").show();
                    $("p[name='PSF_OpenWidthspan'][value_openwidthspan='" + value_SelWaerId + "']").show();
                    $("input[name='PSF_PrintedCount'][value_ppwaerid='" + value_SelWaerId + "']").show();
                    $("input[name='PSF_PrintedPositive'][value_positiveid='" + value_SelWaerId + "']").show();
                    $("input[name='PSF_LastNum'][value_lastnumid='" + value_SelWaerId + "']").show();
                    $("select[name='PSF_OpenSpecifications'][value_selspec='" + value_SelWaerId + "']").show();
                    $("input[name='PSF_OpenWidth'][value_ppwaerid='" + value_SelWaerId + "']").show();
                    $("input[name='PSF_OpenLength'][value_ppwaerid='" + value_SelWaerId + "']").show();
                    if ($(this).val().indexOf('黑白') >= 0) {
                        $("input[name='PSF_OpenWidth'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                    }
                }
              });
            $("select[name='PSF_PrintedColorRear']").live("change", function () {
                var value_SelWaerId = $(this).attr("value_ppwaerid");
                if ($(this).val() == "0色") {
                    $("select[name='PSF_Typesetting'][value_ppwaerid='" + value_SelWaerId + "']").val("单面");
                }
            });
            $("input[name='PSF_Forumsid']").each(function (ii, vv) {
                var keyid = "<%=keyidstr %>";
                if (keyid != "") {
                    $(vv).parent().parent().parent().parent().parent().find("select[name='PSF_Component']").val($(vv).attr("value_hide_psf_component"));
                    $(vv).parent().parent().parent().parent().parent().find("select[name='PSF_PressesDesk']").val($(vv).attr("value_hide_psf_pressesdesk"));
                    $(vv).parent().parent().parent().parent().parent().find("select[name='PSF_PrintedColorPositive']").val($(vv).attr("value_hide_psf_printedcolorpositive"));
                    $(vv).parent().parent().parent().parent().parent().find("select[name='PSF_PrintedColorRear']").val($(vv).attr("value_hide_psf_printedcolorrear"));
                    $(vv).parent().parent().parent().parent().parent().find("select[name='PSF_Typesetting']").val($(vv).attr("value_hide_psf_typesetting"));
                    $(vv).parent().parent().parent().parent().parent().find("select[name='PSF_Typesettinghide']").val($(vv).attr("value_hide_psf_typesetting"));
                   // $(vv).parent().parent().parent().parent().parent().find("select[name='PSF_Fabantaoshu']").val($(vv).attr("value_hide_psf_fabantaoshu"));
                    $(vv).parent().parent().parent().parent().parent().find("select[name='PSF_PaperSource']").val($(vv).attr("value_hide_psf_papersource"));
                    $(vv).parent().parent().parent().parent().parent().find("select[name='PSF_OpenSpecifications']").val($(vv).attr("value_hide_psf_openspecifications"));
                    $(vv).parent().parent().parent().parent().parent().find("select[name='selPaperName']").val($(vv).attr("value_hide_psf_selPaperName"));
                    $(vv).parent().parent().parent().parent().parent().find("select[name='SelPaperSpec']").val($(vv).attr("value_hide_psf_SelPaperSpec"));
                    $(vv).parent().parent().parent().parent().parent().find("select[name='selPlateType']").val($(vv).attr("value_hide_psf_selPlateType"));
                    $(vv).parent().parent().parent().parent().parent().find("select[name='selCTPSpec']").val($(vv).attr("value_hide_psf_selCTPSpec"));
                    $(vv).parent().parent().parent().parent().parent().find("select[name='selFilmSpec']").val($(vv).attr("value_hide_psf_selFilmSpec"));
                }
            });
            //            $(".FromWarehouse").click(function () {
            //                var value_pparid = $(this).attr("value_waerid");
            //                top.Dialog.open({ URL: "/Pages/business/AgConWarehouse.aspx?CommidityType=纸张&&value_pparid=" + value_pparid, Width: 800, Height: 560, Title: "选择货品参数" });
            //            });
            $("select[name='PSF_PaperSource']").each(function (ii, vv) {
                $(vv).change();
            });
            $("select[name='selPlateType']").each(function (ii, vv) {
                $(vv).change();
            });
            $("select[name='PSF_OpenSpecifications']").each(function (ii, vv) {
                var keyid = "<%=keyidstr %>";
                 if (keyid != "") {
                 } else {
                     $(vv).val("8开");
                 }
             });
            $("select[name='PSF_OpenSpecifications']").each(function (ii, vv) {
                var keyid = "<%=keyidstr %>";
                if (keyid != "") {
                } else {
                    $(vv).change();
                }
            });
            $("select[name='PSF_PressesDesk']").each(function (ii, vv) {
                var keyid = "<%=keyidstr %>";
                if (keyid != "") {
                    var value_SelWaerId = $(this).attr("value_selspec");
                    if ($(vv).val().indexOf('六开') >= 0) {
                        $("select[name='PSF_OpenSpecifications'][value_selspec='" + value_SelWaerId + "']").show();
                        $("p[name='PSF_OpenSpecificationsspan'][value_selspecspan='" + value_SelWaerId + "']").show();
                        $("p[name='PSF_OpenWidthspan'][value_openwidthspan='" + value_SelWaerId + "']").show();
                        $("input[name='PSF_OpenLength'][value_ppwaerid='" + value_SelWaerId + "']").show();
                        $("input[name='PSF_OpenWidth'][value_ppwaerid='" + value_SelWaerId + "']").show();
                        $(".xialap[value_ppwaerid='" + value_SelWaerId + "']").hide();
                        $("select[name='PSF_Typesetting'][value_ppwaerid='" + value_SelWaerId + "']").show();
                        $("p[name='PSF_yinse'][value_openwidthspan='" + value_SelWaerId + "']").show();
                        $("p[name='PSF_yinsezheng'][value_openwidthspan='" + value_SelWaerId + "']").show();
                        $("p[name='PSF_yinsebei'][value_openwidthspan='" + value_SelWaerId + "']").show();
                        $("p[name='PSF_yinshufangshi'][value_openwidthspan='" + value_SelWaerId + "']").show();
                        $("select[name='PSF_PrintedColorRear'][value_ppwaerid='" + value_SelWaerId + "']").show();
                        $("select[name='PSF_PrintedColorPositive'][value_selspec='" + value_SelWaerId + "']").show();
                        $("tr[name='PSF_PrintedPaperTd'][value_selspec='" + value_SelWaerId + "']").show();
                        $("tr[name='PSF_PrintedPaperTdtr'][value_selspec='" + value_SelWaerId + "']").show();
                        $("tr[name='PSF_PrintedPaperTdtrtr'][value_selspec='" + value_SelWaerId + "']").show();
                        $("select[name='PSF_Typesettinghide'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                        $(".lbCTPCount[value_ppwaerid='" + value_SelWaerId + "']").show();
                        $(".PSF_Qitadingdanhao[value_ppwaerid='" + value_SelWaerId + "']").hide();
                        $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").show();
                    }
                    else if ($(vv).val().indexOf('四色') >= 0) {
                        $("select[name='PSF_OpenSpecifications'][value_selspec='" + value_SelWaerId + "']").show();
                        $("p[name='PSF_OpenSpecificationsspan'][value_selspecspan='" + value_SelWaerId + "']").show();
                        $("p[name='PSF_OpenWidthspan'][value_openwidthspan='" + value_SelWaerId + "']").show();
                        $("input[name='PSF_OpenLength'][value_ppwaerid='" + value_SelWaerId + "']").show();
                        $("input[name='PSF_OpenWidth'][value_ppwaerid='" + value_SelWaerId + "']").show();
                        $(".xialap[value_ppwaerid='" + value_SelWaerId + "']").hide();
                        $("select[name='PSF_Typesetting'][value_ppwaerid='" + value_SelWaerId + "']").show();
                        $("p[name='PSF_yinse'][value_openwidthspan='" + value_SelWaerId + "']").show();
                        $("p[name='PSF_yinsezheng'][value_openwidthspan='" + value_SelWaerId + "']").show();
                        $("p[name='PSF_yinsebei'][value_openwidthspan='" + value_SelWaerId + "']").show();
                        $("p[name='PSF_yinshufangshi'][value_openwidthspan='" + value_SelWaerId + "']").show();
                        $("select[name='PSF_PrintedColorRear'][value_ppwaerid='" + value_SelWaerId + "']").show();
                        $("select[name='PSF_PrintedColorPositive'][value_selspec='" + value_SelWaerId + "']").show();
                        $("tr[name='PSF_PrintedPaperTd'][value_selspec='" + value_SelWaerId + "']").show();
                        $("tr[name='PSF_PrintedPaperTdtr'][value_selspec='" + value_SelWaerId + "']").show();
                        $("tr[name='PSF_PrintedPaperTdtrtr'][value_selspec='" + value_SelWaerId + "']").show();
                        $("select[name='PSF_Typesettinghide'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                        $(".lbCTPCount[value_ppwaerid='" + value_SelWaerId + "']").show();
                        $(".PSF_Qitadingdanhao[value_ppwaerid='" + value_SelWaerId + "']").hide();
                        $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").show();
                    }
                    else if ($(vv).val().indexOf('八色') >= 0) {
                        $("select[name='PSF_OpenSpecifications'][value_selspec='" + value_SelWaerId + "']").show();
                        $("p[name='PSF_OpenSpecificationsspan'][value_selspecspan='" + value_SelWaerId + "']").show();
                        $("p[name='PSF_OpenWidthspan'][value_openwidthspan='" + value_SelWaerId + "']").show();
                        $("input[name='PSF_OpenLength'][value_ppwaerid='" + value_SelWaerId + "']").show();
                        $("input[name='PSF_OpenWidth'][value_ppwaerid='" + value_SelWaerId + "']").show();
                        $(".xialap[value_ppwaerid='" + value_SelWaerId + "']").hide();
                        $("select[name='PSF_Typesetting'][value_ppwaerid='" + value_SelWaerId + "']").show();
                        $("p[name='PSF_yinse'][value_openwidthspan='" + value_SelWaerId + "']").show();
                        $("p[name='PSF_yinsezheng'][value_openwidthspan='" + value_SelWaerId + "']").show();
                        $("p[name='PSF_yinsebei'][value_openwidthspan='" + value_SelWaerId + "']").show();
                        $("p[name='PSF_yinshufangshi'][value_openwidthspan='" + value_SelWaerId + "']").show();
                        $("select[name='PSF_PrintedColorRear'][value_ppwaerid='" + value_SelWaerId + "']").show();
                        $("select[name='PSF_PrintedColorPositive'][value_selspec='" + value_SelWaerId + "']").show();
                        $("tr[name='PSF_PrintedPaperTd'][value_selspec='" + value_SelWaerId + "']").show();
                        $("tr[name='PSF_PrintedPaperTdtr'][value_selspec='" + value_SelWaerId + "']").show();
                        $("tr[name='PSF_PrintedPaperTdtrtr'][value_selspec='" + value_SelWaerId + "']").show();
                        $("select[name='PSF_Typesettinghide'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                        $(".lbCTPCount[value_ppwaerid='" + value_SelWaerId + "']").show();
                        $(".PSF_Qitadingdanhao[value_ppwaerid='" + value_SelWaerId + "']").hide();
                        $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").show();
                    }
                    else if ($(vv).val().indexOf('黑白') >= 0) {
                        $("select[name='PSF_OpenSpecifications'][value_selspec='" + value_SelWaerId + "']").show();
                        $("p[name='PSF_OpenSpecificationsspan'][value_selspecspan='" + value_SelWaerId + "']").show();
                        $("p[name='PSF_OpenWidthspan'][value_openwidthspan='" + value_SelWaerId + "']").show();
                        $("input[name='PSF_OpenLength'][value_ppwaerid='" + value_SelWaerId + "']").show();
                        $("input[name='PSF_OpenWidth'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                        $(".xialap[value_ppwaerid='" + value_SelWaerId + "']").show();
                        $("select[name='PSF_Typesetting'][value_ppwaerid='" + value_SelWaerId + "']").show();
                        $("p[name='PSF_yinse'][value_openwidthspan='" + value_SelWaerId + "']").show();
                        $("p[name='PSF_yinsezheng'][value_openwidthspan='" + value_SelWaerId + "']").show();
                        $("p[name='PSF_yinsebei'][value_openwidthspan='" + value_SelWaerId + "']").show();
                        $("p[name='PSF_yinshufangshi'][value_openwidthspan='" + value_SelWaerId + "']").show();
                        $("select[name='PSF_PrintedColorRear'][value_ppwaerid='" + value_SelWaerId + "']").show();
                        $("select[name='PSF_PrintedColorPositive'][value_selspec='" + value_SelWaerId + "']").show();
                        $("tr[name='PSF_PrintedPaperTd'][value_selspec='" + value_SelWaerId + "']").show();
                        $("tr[name='PSF_PrintedPaperTdtr'][value_selspec='" + value_SelWaerId + "']").show();
                        $("tr[name='PSF_PrintedPaperTdtrtr'][value_selspec='" + value_SelWaerId + "']").show();
                        $("select[name='PSF_Typesettinghide'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                        $(".lbCTPCount[value_ppwaerid='" + value_SelWaerId + "']").show();
                        $(".PSF_Qitadingdanhao[value_ppwaerid='" + value_SelWaerId + "']").hide();
                        $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").show();
                       // $("input[name='PSF_OpenWidthName'][value_ppwaerid='" + value_SelWaerId + "']").val("870");
                    }
                    else if ($(vv).val().indexOf('轮转') >= 0) {
                        $("select[name='PSF_OpenSpecifications'][value_selspec='" + value_SelWaerId + "']").hide();
                        $(".xialap[value_ppwaerid='" + value_SelWaerId + "']").hide();
                       // $("input[name='PSF_OpenWidthName'][value_ppwaerid='" + value_SelWaerId + "']").val("755");
                        $("p[name='PSF_OpenSpecificationsspan'][value_selspecspan='" + value_SelWaerId + "']").hide();
                        $("p[name='PSF_OpenWidthspan'][value_openwidthspan='" + value_SelWaerId + "']").hide();
                        $("input[name='PSF_OpenLength'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                        $("input[name='PSF_OpenWidth'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                        $("select[name='PSF_Typesetting'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                        $("p[name='PSF_yinse'][value_openwidthspan='" + value_SelWaerId + "']").show();
                        $("p[name='PSF_yinsezheng'][value_openwidthspan='" + value_SelWaerId + "']").show();
                        $("p[name='PSF_yinsebei'][value_openwidthspan='" + value_SelWaerId + "']").show();
                        $("p[name='PSF_yinshufangshi'][value_openwidthspan='" + value_SelWaerId + "']").hide();
                        $("select[name='PSF_PrintedColorRear'][value_ppwaerid='" + value_SelWaerId + "']").show();
                        $("select[name='PSF_PrintedColorPositive'][value_selspec='" + value_SelWaerId + "']").show();
                        $("tr[name='PSF_PrintedPaperTd'][value_selspec='" + value_SelWaerId + "']").show();
                        $("tr[name='PSF_PrintedPaperTdtr'][value_selspec='" + value_SelWaerId + "']").show();
                        $("tr[name='PSF_PrintedPaperTdtrtr'][value_selspec='" + value_SelWaerId + "']").show();
                        $("select[name='PSF_Typesettinghide'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                        $(".lbCTPCount[value_ppwaerid='" + value_SelWaerId + "']").show();
                        $(".PSF_Qitadingdanhao[value_ppwaerid='" + value_SelWaerId + "']").hide();
                        $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").show();
                    }
                    else if ($(vv).val().indexOf('直接修切') >= 0 || $(vv).val().indexOf('数码') >= 0 || $(this).val().indexOf('补单') >= 0 ) {
                        $("select[name='PSF_OpenSpecifications'][value_selspec='" + value_SelWaerId + "']").show();
                        $("p[name='PSF_OpenSpecificationsspan'][value_selspecspan='" + value_SelWaerId + "']").show();
                        $("p[name='PSF_OpenWidthspan'][value_openwidthspan='" + value_SelWaerId + "']").show();
                        $("input[name='PSF_OpenLength'][value_ppwaerid='" + value_SelWaerId + "']").show();
                        $("input[name='PSF_OpenWidth'][value_ppwaerid='" + value_SelWaerId + "']").show();
                        $(".xialap[value_ppwaerid='" + value_SelWaerId + "']").hide();
                        $(".lbCTPCount[value_ppwaerid='" + value_SelWaerId + "']").hide();
                        $(".PSF_Qitadingdanhao[value_ppwaerid='" + value_SelWaerId + "']").hide();
                        $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                        $("select[name='PSF_Typesetting'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                        $("p[name='PSF_yinse'][value_openwidthspan='" + value_SelWaerId + "']").hide();
                        $("p[name='PSF_yinsezheng'][value_openwidthspan='" + value_SelWaerId + "']").hide();
                        $("p[name='PSF_yinsebei'][value_openwidthspan='" + value_SelWaerId + "']").hide();
                        $("p[name='PSF_yinsebei'][value_openwidthspan='" + value_SelWaerId + "']").hide();
                        $("p[name='PSF_yinshufangshi'][value_openwidthspan='" + value_SelWaerId + "']").hide();
                        $("select[name='PSF_PrintedColorRear'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                        $("select[name='PSF_PrintedColorPositive'][value_selspec='" + value_SelWaerId + "']").hide();
                        $("tr[name='PSF_PrintedPaperTd'][value_selspec='" + value_SelWaerId + "']").show();
                        $("tr[name='PSF_PrintedPaperTdtr'][value_selspec='" + value_SelWaerId + "']").show();
                        $("tr[name='PSF_PrintedPaperTdtrtr'][value_selspec='" + value_SelWaerId + "']").show();
                        $("select[name='PSF_Typesettinghide'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                    }
                    else if ($(vv).val().indexOf('与其他订单合版') >= 0 ) {
                        $("select[name='PSF_OpenSpecifications'][value_selspec='" + value_SelWaerId + "']").show();
                        $("p[name='PSF_OpenSpecificationsspan'][value_selspecspan='" + value_SelWaerId + "']").show();
                        $("p[name='PSF_OpenWidthspan'][value_openwidthspan='" + value_SelWaerId + "']").show();
                        $("input[name='PSF_OpenLength'][value_ppwaerid='" + value_SelWaerId + "']").show();
                        $("input[name='PSF_OpenWidth'][value_ppwaerid='" + value_SelWaerId + "']").show();
                        $(".xialap[value_ppwaerid='" + value_SelWaerId + "']").hide();
                        $(".lbCTPCount[value_ppwaerid='" + value_SelWaerId + "']").hide();
                        $(".PSF_Qitadingdanhao[value_ppwaerid='" + value_SelWaerId + "']").show();
                        $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                        $("select[name='PSF_Typesetting'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                        $("p[name='PSF_yinse'][value_openwidthspan='" + value_SelWaerId + "']").hide();
                        $("p[name='PSF_yinsezheng'][value_openwidthspan='" + value_SelWaerId + "']").hide();
                        $("p[name='PSF_yinsebei'][value_openwidthspan='" + value_SelWaerId + "']").hide();
                        $("p[name='PSF_yinsebei'][value_openwidthspan='" + value_SelWaerId + "']").hide();
                        $("p[name='PSF_yinshufangshi'][value_openwidthspan='" + value_SelWaerId + "']").hide();
                        $("select[name='PSF_PrintedColorRear'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                        $("select[name='PSF_PrintedColorPositive'][value_selspec='" + value_SelWaerId + "']").hide();
                        $("tr[name='PSF_PrintedPaperTd'][value_selspec='" + value_SelWaerId + "']").hide();
                        $("tr[name='PSF_PrintedPaperTdtr'][value_selspec='" + value_SelWaerId + "']").hide();
                        $("tr[name='PSF_PrintedPaperTdtrtr'][value_selspec='" + value_SelWaerId + "']").hide();
                        $("select[name='PSF_Typesettinghide'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                    }
                    if ($(vv).val().indexOf('轮转') >= 0) {
                        var selectElement = $("select[name='PSF_Typesetting'][value_ppwaerid='" + value_SelWaerId + "']");
                        var sssssss = selectElement.val();
                        // 清空现有的option
                        selectElement.empty();
                        const newOptions = [
                            { value: '扣版', text: '扣版' },
                            { value: '单面', text: '单面' }
                        ];
                        // 3. 批量新增option到select中
                        let optionHtml = '';
                        newOptions.forEach(item => {
                            // 拼接option标签,直接赋值即可
                            optionHtml += `<option value="${item.value}">${item.text}</option>`;
                        });
                        selectElement.html(optionHtml); // 赋值到select,完成新增
                        selectElement.val(sssssss);
                        $("p[name='PSF_Zhizhangshuliang'][value_selspecspan='" + value_SelWaerId + "']").hide();
                        $("p[name='PSF_Kailiaoguige'][value_selspecspan='" + value_SelWaerId + "']").hide();
                        $("p[name='PSF_Zhizhangshulianga'][value_selspecspan='" + value_SelWaerId + "']").hide();
                        $("p[name='PSF_Yinshuazhengshu'][value_selspecspan='" + value_SelWaerId + "']").hide();
                        $("p[name='PSF_Xiaohao'][value_selspecspan='" + value_SelWaerId + "']").hide();
                        $("p[name='PSF_Kuandu'][value_selspecspan='" + value_SelWaerId + "']").hide();
                        $("p[name='PSF_OpenSpecificationsspan'][value_selspecspan='" + value_SelWaerId + "']").hide();
                        $("p[name='PSF_OpenWidthspan'][value_openwidthspan='" + value_SelWaerId + "']").hide();
                        $("input[name='PSF_PrintedCount'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                        $("input[name='PSF_PrintedPositive'][value_positiveid='" + value_SelWaerId + "']").hide();
                        $("input[name='PSF_LastNum'][value_lastnumid='" + value_SelWaerId + "']").hide();
                        $("select[name='PSF_OpenSpecifications'][value_selspec='" + value_SelWaerId + "']").hide();
                        $("input[name='PSF_OpenWidth'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                        $("input[name='PSF_OpenLength'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                    }
                    else {
                        var selectElement = $("select[name='PSF_Typesetting'][value_ppwaerid='" + value_SelWaerId + "']")
                        var sssssss =  selectElement.val();
                        // 清空现有的option
                        selectElement.empty();
                        const newOptions = [
                            { value: '自翻', text: '自翻' },
                            { value: '滚翻', text: '滚翻' },
                            { value: '扣版', text: '扣版' },
                            { value: '单面', text: '单面' }
                        ];
                        // 3. 批量新增option到select中
                        let optionHtml = '';
                        newOptions.forEach(item => {
                            // 拼接option标签,直接赋值即可
                            optionHtml += `<option value="${item.value}">${item.text}</option>`;
                        });
                        selectElement.html(optionHtml); // 赋值到select,完成新增
                        selectElement.val(sssssss);
                        $("p[name='PSF_Zhizhangshuliang'][value_selspecspan='" + value_SelWaerId + "']").show();
                        $("p[name='PSF_Kailiaoguige'][value_selspecspan='" + value_SelWaerId + "']").show();
                        $("p[name='PSF_Zhizhangshulianga'][value_selspecspan='" + value_SelWaerId + "']").show();
                        $("p[name='PSF_Yinshuazhengshu'][value_selspecspan='" + value_SelWaerId + "']").show();
                        $("p[name='PSF_Xiaohao'][value_selspecspan='" + value_SelWaerId + "']").show();
                        $("p[name='PSF_Kuandu'][value_selspecspan='" + value_SelWaerId + "']").show();
                        $("p[name='PSF_OpenSpecificationsspan'][value_selspecspan='" + value_SelWaerId + "']").show();
                        $("p[name='PSF_OpenWidthspan'][value_openwidthspan='" + value_SelWaerId + "']").show();
                        $("input[name='PSF_PrintedCount'][value_ppwaerid='" + value_SelWaerId + "']").show();
                        $("input[name='PSF_PrintedPositive'][value_positiveid='" + value_SelWaerId + "']").show();
                        $("input[name='PSF_LastNum'][value_lastnumid='" + value_SelWaerId + "']").show();
                        $("select[name='PSF_OpenSpecifications'][value_selspec='" + value_SelWaerId + "']").show();
                        $("input[name='PSF_OpenWidth'][value_ppwaerid='" + value_SelWaerId + "']").show();
                        $("input[name='PSF_OpenLength'][value_ppwaerid='" + value_SelWaerId + "']").show();
                        if ($(this).val().indexOf('黑白') >= 0) {
                            $("input[name='PSF_OpenWidth'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                        }
                    }
                    if ($(vv).val().indexOf('小森') >= 0) {
                        var selectPSF_PrintedColorPositive = $("select[name='PSF_PrintedColorPositive'][value_selspec='" + value_SelWaerId + "']");
                        var sssssss = selectPSF_PrintedColorPositive.val();
                        // 清空现有的option
                        selectPSF_PrintedColorPositive.empty();
                        const newOptions1 = [
                            { value: '单色', text: '单色' },
                            { value: '双色', text: '双色' },
                            { value: '三色', text: '三色' },
                            { value: '四色', text: '四色' },
                        ];
                        // 3. 批量新增option到select中
                        let optionHtml1 = '';
                        newOptions1.forEach(item => {
                            // 拼接option标签,直接赋值即可
                            optionHtml1 += `<option value="${item.value}">${item.text}</option>`;
                        });
                        selectPSF_PrintedColorPositive.html(optionHtml1); // 赋值到select,完成新增
                        selectPSF_PrintedColorPositive.val(sssssss);
                        var selectPSF_PrintedColorRear = $("select[name='PSF_PrintedColorRear'][value_ppwaerid='" + value_SelWaerId + "']");
                        var ssssssss = selectPSF_PrintedColorRear.val();
                        // 清空现有的option
                        selectPSF_PrintedColorRear.empty();
                        const newOptions2 = [
                            { value: '0色', text: '0色' },
                            { value: '单色', text: '单色' },
                            { value: '双色', text: '双色' },
                            { value: '三色', text: '三色' },
                            { value: '四色', text: '四色' },
                        ];
                        // 3. 批量新增option到select中
                        let optionHtml2 = '';
                        newOptions2.forEach(item => {
                            // 拼接option标签,直接赋值即可
                            optionHtml2 += `<option value="${item.value}">${item.text}</option>`;
                        });
                        selectPSF_PrintedColorRear.html(optionHtml2); // 赋值到select,完成新增
                        selectPSF_PrintedColorRear.val(ssssssss);
                    } else {
                        var selectPSF_PrintedColorPositive = $("select[name='PSF_PrintedColorPositive'][value_selspec='" + value_SelWaerId + "']");
                        var sssssss = selectPSF_PrintedColorPositive.val();
                        // 清空现有的option
                        selectPSF_PrintedColorPositive.empty();
                        const newOptions1 = [
                            { value: '单色', text: '单色' },
                            { value: '双色', text: '双色' },
                            { value: '三色', text: '三色' },
                            { value: '四色', text: '四色' },
                            { value: '四+专', text: '四+专' },
                        ];
                        // 3. 批量新增option到select中
                        let optionHtml1 = '';
                        newOptions1.forEach(item => {
                            // 拼接option标签,直接赋值即可
                            optionHtml1 += `<option value="${item.value}">${item.text}</option>`;
                        });
                        selectPSF_PrintedColorPositive.html(optionHtml1); // 赋值到select,完成新增
                        selectPSF_PrintedColorPositive.val(sssssss);
                        var selectPSF_PrintedColorRear = $("select[name='PSF_PrintedColorRear'][value_ppwaerid='" + value_SelWaerId + "']");
                        var ssssssss = selectPSF_PrintedColorRear.val();
                        // 清空现有的option
                        selectPSF_PrintedColorRear.empty();
                        const newOptions2 = [
                            { value: '0色', text: '0色' },
                            { value: '单色', text: '单色' },
                            { value: '双色', text: '双色' },
                            { value: '三色', text: '三色' },
                            { value: '四色', text: '四色' },
                            { value: '四+专', text: '四+专' },
                        ];
                        // 3. 批量新增option到select中
                        let optionHtml2 = '';
                        newOptions2.forEach(item => {
                            // 拼接option标签,直接赋值即可
                            optionHtml2 += `<option value="${item.value}">${item.text}</option>`;
                        });
                        selectPSF_PrintedColorRear.html(optionHtml2); // 赋值到select,完成新增
                        selectPSF_PrintedColorRear.val(ssssssss);
                    }
                 }
             });
            $("input[name='CTPSpecName']").each(function (ii, vv) {
                var keyid = "<%=keyidstr %>";
                 if (keyid != "") {
                 } else {
                     $(vv).val("460*395");
                }
            });
            $(function () {
                $(".FromWarehouse").click(function () {
                    value_WaerId = $(this).attr("value_waerid");
                    var value_pparid = "1";
                    top.Dialog.open({ URL: "/Pages/business/AgConWarehouse.aspx?CommidityType=纸张&&value_pparid=" + value_pparid, Width: 1000, Height: 650, Title: "选择货品参数" });
                });
                $(".FromWarehouseByBanCai").click(function () {
                    value_WaerId = $(this).attr("value_waerid");
                    var value_pparid = "2";
                    top.Dialog.open({ URL: "/Pages/business/AgConWarehouse.aspx?CommidityType=版材&&value_pparid=" + value_pparid, Width: 1000, Height: 650, Title: "选择货品参数" });
                });
                $(".FromWarehouseByBanCai1").click(function () {
                    value_WaerId = $(this).attr("value_waerid");
                    var value_pparid = "3";
                    top.Dialog.open({ URL: "/Pages/business/AgConWarehouse.aspx?CommidityType=版材&&value_pparid=" + value_pparid, Width: 1000, Height: 650, Title: "选择货品参数" });
                });
            });
            $(".xialap").hover(function () {
                $(this).find(".xialapb").show();
            }, function () {
                $(this).find(".xialapb").hide();
            });
            $(".xialapr").hover(function () {
                $(this).find(".xialapb").show();
                $(this).removeClass("xialapr").addClass("xialaprh");
            }, function () {
                $(this).removeClass("xialaprh").addClass("xialapr");
                $(this).find(".xialapb").hide();
            });
            $(".xialapr").click(function () {
                $(this).parent().parent().find("input").val($(this).text());
                $(".xialapb").hide();
            });
            $(".xialapp").hover(function () {
                $(this).find(".xialapbp").show();
            }, function () {
                $(this).find(".xialapbp").hide();
            });
            $(".xialaprp").hover(function () {
                $(this).find(".xialapbp").show();
                $(this).removeClass("xialaprp").addClass("xialaprhp");
            }, function () {
                $(this).removeClass("xialaprhp").addClass("xialaprp");
                $(this).find(".xialapbp").hide();
            });
            $(".xialaprp").click(function () {
                $(this).parent().parent().find("input").val($(this).text());
                $(".xialapbp").hide();
            });
        });
         function CorrectText() {
             $("select").each(function (ii, vv) {
                 $(vv).val($(vv).val().replace(",", ",+-+,"));
             });
             $("input").each(function (ii, vv) {
                 $(vv).val($(vv).val().replace(",", ",+-+,"));
             });
             $("textarea").each(function (ii, vv) {
                 $(vv).val($(vv).val().replace(",", ",+-+,"));
             });
         }
        //纸张采购
         function GetGoodsData(value_pparid, goodsName, SpecificationName, InventoryCounttext, Keyid, papernum1) {
             if (value_pparid == "1") {
                 $("input[name='PSF_PaperName'][value_ppwaerid='" + value_WaerId + "']").val(goodsName);
                 $("input[name='PSF_MaterialSpecifications'][value_ppwaerid='" + value_WaerId + "']").val(SpecificationName);
                 $("input[name='PSF_PrintedCount'][value_ppwaerid='" + value_WaerId + "']").val(InventoryCounttext);
                 $("input[name='PSF_PaperId'][value_ppwaerid='" + value_WaerId + "']").val(Keyid);
                 $("input[name='PMS_PaperCount1'][value_ppwaerid='" + value_WaerId + "']").val(papernum1);
             }
             else if (value_pparid == "2") {
                 $("input[name='CTPSpecName'][value_ppwaerid='" + value_WaerId + "']").val(SpecificationName);
                 $("input[name='CTPCount'][value_ppwaerid='" + value_WaerId + "']").val(InventoryCounttext);
                 //alert(InventoryCounttext);
                 $("input[name='PSF_PaperId2'][value_ppwaerid='" + value_WaerId + "']").val(Keyid);
             }
             else if (value_pparid == "3") {
                 $("input[name='PSF_PSBan'][value_ppwaerid='" + value_WaerId + "']").val(SpecificationName);
                 $("input[name='PSCount'][value_ppwaerid='" + value_WaerId + "']").val(InventoryCounttext);
                 $("input[name='PSF_PaperId3'][value_ppwaerid='" + value_WaerId + "']").val(Keyid);
             }
         }
     //纸张采购
        function zhizhangcaigou() {
            top.Dialog.open({ URL: "/Pages/procurement/ProcurementADD.aspx", Title: "纸张采购", Width: 1100, Height: 700 });
        }
    </script>
     </script>
</body>
</html>