From ae6e40362a745caef9ead36f81f38313fb8c2c66 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期一, 12 五月 2025 16:54:46 +0800
Subject: [PATCH] 扣板:2张  双面机只有“扣板”是2张,其他是1张

---
 CY_ECommercePlatform/CY.WebForm/Pages/business/AgSpecialOrderEdit.aspx |  173 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 165 insertions(+), 8 deletions(-)

diff --git a/CY_ECommercePlatform/CY.WebForm/Pages/business/AgSpecialOrderEdit.aspx b/CY_ECommercePlatform/CY.WebForm/Pages/business/AgSpecialOrderEdit.aspx
index a84ccae..d65a555 100644
--- a/CY_ECommercePlatform/CY.WebForm/Pages/business/AgSpecialOrderEdit.aspx
+++ b/CY_ECommercePlatform/CY.WebForm/Pages/business/AgSpecialOrderEdit.aspx
@@ -369,7 +369,7 @@
                                 <td style="display:none;">
                                     鐗堟潗绫诲瀷
                                 </td>
-                                <td colspan="2">
+                                <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">
@@ -395,7 +395,7 @@
                                     <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" >
+                                <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" >
@@ -626,7 +626,7 @@
                 $("select[name='PSF_OpenSpecifications']").last().val("8寮�");
                 $("select[name='PSF_OpenSpecifications']").last().change();
                 $("input[name='CTPSpecName']").last().val("395*460");
-                $("select[name='PSF_PressesDesk']").last().change();
+               
 
                 if ($("select[name='PSF_Component']").first().val() == "灏侀潰") {
                     $("select[name='PSF_Component']").last().val("鍐呴〉");
@@ -640,6 +640,7 @@
                 $("input[name='PSF_LastNum']").last().last().val("");
                // $("input[name='CTPSpecName']").last().val("");
                 $("input[name='CTPCount']").last().last().val("");
+                $("select[name='PSF_PressesDesk']").last().change();
                 
             });
 
@@ -770,6 +771,20 @@
                 }
             });
 
+
+            $("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 || $("select[name='PSF_PressesDesk'][value_selspec='" + value_SelWaerId + "']").val().indexOf('榛戠櫧') >= 0) {
+                    if ($("select[name='PSF_Typesetting'][value_ppwaerid='" + value_SelWaerId + "']").val() == "鎵f澘") {
+                        $("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) {
@@ -805,6 +820,12 @@
 
                     $(".lbCTPCount[value_ppwaerid='" + value_SelWaerId + "']").show();
                     $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").show();
+                    if ($("select[name='PSF_Typesetting'][value_ppwaerid='" + value_SelWaerId + "']").val() == "鎵f澘") {
+                        $("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) {
@@ -837,6 +858,7 @@
                     $("select[name='PSF_Typesettinghide'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                     $(".lbCTPCount[value_ppwaerid='" + value_SelWaerId + "']").show();
                     $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").show();
+                    $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").val("4");
                 }
                 else if ($(this).val().indexOf('鍏壊') >= 0) {
                     $("select[name='PSF_PrintedColorPositive'][value_selspec='" + value_SelWaerId + "']").val("鍥涜壊");
@@ -869,6 +891,7 @@
                     $("select[name='PSF_Typesettinghide'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                     $(".lbCTPCount[value_ppwaerid='" + value_SelWaerId + "']").show();
                     $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").show();
+                    $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").val("4");
                 }
                 else if ($(this).val().indexOf('榛戠櫧') >= 0) {
                     $("select[name='PSF_PrintedColorPositive'][value_selspec='" + value_SelWaerId + "']").val("鍗曡壊");
@@ -901,7 +924,12 @@
                     $("select[name='PSF_Typesettinghide'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                     $(".lbCTPCount[value_ppwaerid='" + value_SelWaerId + "']").show();
                     $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").show();
-                    $("input[name='PSF_OpenWidthName'][value_ppwaerid='" + value_SelWaerId + "']").val("755");
+                    $("input[name='PSF_OpenWidthName'][value_ppwaerid='" + value_SelWaerId + "']").val("870");
+                    if ($("select[name='PSF_Typesetting'][value_ppwaerid='" + value_SelWaerId + "']").val() == "鎵f澘") {
+                        $("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("鍗曡壊");
@@ -938,6 +966,7 @@
                     $("select[name='PSF_Typesettinghide'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                     $(".lbCTPCount[value_ppwaerid='" + value_SelWaerId + "']").show();
                     $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").show();
+                    $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").val("2");
                 }
                 // else if () {
                 //    //$("select[name='PSF_OpenSpecifications'][value_selspec='" + value_SelWaerId + "']").show();
@@ -974,9 +1003,66 @@
                     $("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("395*460");
-                    $("select[name='PSF_OpenSpecifications'][value_selspec='" + value_SelWaerId + "']").val("4寮�");
+                    $("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();
+
+                    if ($("#spanOrderPrintDemand").html() != "") {
+                        var sss = $("#spanOrderPrintDemand").html().split('锛�');
+                        if (sss != null) {
+
+                            for (var i = 0; i < sss.length; i++) {
+                                var sfdsdfdf = sss[i].split('锛�');
+
+
+
+
+                                if (sfdsdfdf[0].indexOf('(') >= 0 && sfdsdfdf[0].indexOf(')') >= 0) {
+
+
+                                    // 鍋囪瑕佹埅鍙栫殑瀛楃涓蹭负str锛屽紑濮嬪瓧绗︿覆涓簊tart锛岀粨鏉熷瓧绗︿覆涓篹nd
+                                    var startIndex = sfdsdfdf[0].indexOf('(') + 1;
+                                    var endIndex = sfdsdfdf[0].indexOf(')');
+                                    var substr = sfdsdfdf[0].slice(startIndex, endIndex);
+
+
+                                    var ssssaaa = substr;
+
+                                    if (ssssaaa.indexOf('脳') >= 0) {
+
+                                        var dfdfdf = ssssaaa.split('脳');
+                                        $("input[name='PSF_OpenWidth'][value_ppwaerid='" + value_SelWaerId + "']").val(dfdfdf[0].replace("mm",""));
+                                        $("input[name='PSF_OpenLength'][value_ppwaerid='" + value_SelWaerId + "']").val(dfdfdf[1].replace("mm", ""));
+                                    } else if (ssssaaa.indexOf('*') >= 0) {
+
+                                        var dfdfdf = ssssaaa.split('*');
+                                        $("input[name='PSF_OpenWidth'][value_ppwaerid='" + value_SelWaerId + "']").val(dfdfdf[0].replace("mm", ""));
+                                        $("input[name='PSF_OpenLength'][value_ppwaerid='" + value_SelWaerId + "']").val(dfdfdf[1].replace("mm", ""));
+                                    }
+
+
+
+                                } else {
+                                    if (sss[i].indexOf('脳') >= 0) {
+                                        var sfdsdfdf = sss[i].split('锛�');
+
+                                        var dfdfdf = sfdsdfdf[0].split('脳');
+                                        $("input[name='PSF_OpenWidth'][value_ppwaerid='" + value_SelWaerId + "']").val(dfdfdf[0].replace("mm", ""));
+                                        $("input[name='PSF_OpenLength'][value_ppwaerid='" + value_SelWaerId + "']").val(dfdfdf[1].replace("mm", ""));
+                                    } else if (sss[i].indexOf('*') >= 0) {
+
+                                        var sfdsdfdf = sss[i].split('锛�');
+
+                                        var dfdfdf = sfdsdfdf[0].split('*');
+                                        $("input[name='PSF_OpenWidth'][value_ppwaerid='" + value_SelWaerId + "']").val(dfdfdf[0].replace("mm", ""));
+                                        $("input[name='PSF_OpenLength'][value_ppwaerid='" + value_SelWaerId + "']").val(dfdfdf[1].replace("mm", ""));
+                                    } 
+                                }
+                               
+                            }
+                        }
+                    }
+
                     $("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();
@@ -985,6 +1071,7 @@
 
                     $(".lbCTPCount[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();
@@ -1004,7 +1091,45 @@
                     $("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("395*460");
+                    $("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();
+                    $("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();
+
+                }
                   
               });
             
@@ -1186,7 +1311,7 @@
                         $("select[name='PSF_Typesettinghide'][value_ppwaerid='" + value_SelWaerId + "']").hide();
                         $(".lbCTPCount[value_ppwaerid='" + value_SelWaerId + "']").show();
                         $("input[name='CTPCount'][value_ppwaerid='" + value_SelWaerId + "']").show();
-                        $("input[name='PSF_OpenWidthName'][value_ppwaerid='" + value_SelWaerId + "']").val("755");
+                        $("input[name='PSF_OpenWidthName'][value_ppwaerid='" + value_SelWaerId + "']").val("870");
                     }
                     else if ($(vv).val().indexOf('杞浆') >= 0) {
            
@@ -1253,6 +1378,38 @@
 
                     }
 
+
+                    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();
+                        $("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();
+
+                    }
                  } 
              });
 
@@ -1372,7 +1529,7 @@
         //绾稿紶閲囪喘
         function zhizhangcaigou() {
              
-            top.Dialog.open({ URL: "/Pages/procurement/ProcurementADD.aspx", Title: "绾稿紶閲囪喘", Width: 1100, Height: 700 });
+            top.Dialog.open({ URL: "/Pages/procurement/ProcurementADD.aspx?orderIdstrrrr=<%=orderIdstrrrr %>", Title: "绾稿紶閲囪喘", Width: 1100, Height: 700 });
             
         }
     </script>

--
Gitblit v1.9.1