qinqi 6 дней назад
Родитель
Сommit
dd0bed6846

+ 1 - 1
wwwroot/main/PreProductCheck/api/GetWaterLabelCode.ashx

@@ -21,7 +21,7 @@ public class GetGoodsRepair : IHttpHandler, IRequiresSessionState
         {
             DataTable dt = conn.ExecuteDatatable(@"
                    SELECT
-                     NVL(GLS.waterlabelcode, G.WaterLabelCode) WaterLabelCode 
+                     NVL(GLS.waterlabelcode, G.WaterLabelCode) WaterLabelCode ,TPGL.LUOCIFLAG
                     FROM
                       TP_PM_GROUTINGDAILYDETAIL TPGL
                        INNER JOIN TP_MST_GOODS G

+ 50 - 6
wwwroot/main/PreProductCheck/index.html

@@ -25,7 +25,7 @@
         tr, th, td {
             height: 22px !important;
             padding: 4px !important;
-        }
+        } 
     </style>
     <title>东科软件</title>
 </head>
@@ -87,6 +87,24 @@
                             <div class="form-group col-4" style="display:block;">
                                 <input onkeydown="if (event.keyCode == 13) GetWaterLabelCode();" value="" type="text" class="form-control" id="水效标" placeholder="请输入" required>
                             </div>
+                            <!--裸瓷按钮-->
+                            <div style="display:none;">
+                                <label for="裸瓷">裸瓷</label>
+                                <select id="裸瓷" onchange="goodsLuoci_OnChange()" class="custom-select" required disabled>
+                                    <option value="0">非裸瓷</option>
+                                    <option value="1">裸瓷</option>
+                                </select>
+                            </div>
+                            <div class="form-group col-4" style="display:block;">
+                                <div class="d-flex gap-2 w-100">
+                                    <label id="裸瓷0" class="btn btn-info flex-grow-1" onclick="goodsLuoci_OnChange('0')">
+                                        <input type="radio" name="裸瓷_radio" value="0" checked> 非裸瓷
+                                    </label>
+                                    <label id="裸瓷1" class="btn btn-info flex-grow-1" onclick="goodsLuoci_OnChange('1')">
+                                        <input type="radio" name="裸瓷_radio" value="1"> 裸瓷
+                                    </label>
+                                </div>
+                            </div>
                         </div>
                             <div class="form-row">
                                 <div class="form-group col-8">
@@ -192,6 +210,7 @@
 
         var Waterlaflag = 0;
         var WaterlabeCode = null
+        var luociFlag = 0;
 
 
         //操作方式 insert update
@@ -212,7 +231,8 @@
 
             //加载工号产量
             loadTotal();
-
+            //裸瓷标识 默认非裸瓷
+            goodsLuoci_OnChange(0);
         });
 
         //判断水效标是否一致
@@ -338,8 +358,18 @@
                 var json = JSON.parse(data);
                 //输入条码对应的水效标
                 WaterlabeCode = json.rows[0]["WATERLABELCODE"];
+                luociFlag = json.rows[0]["LUOCIFLAG"];
+                if (luociFlag == 1) { 
+                    //裸瓷标识 
+                    goodsLuoci_OnChange(luociFlag);
+                }
+                else {
+                    //裸瓷标识 
+                    goodsLuoci_OnChange(0);
+                }
             });
-            $('#水效标').val('');
+            $('#水效标').val('');   
+
             //重置缺陷数据
             productionDefects = [];
             defectJson = [];
@@ -687,7 +717,18 @@
             }
         }
 
-
+        function goodsLuoci_OnChange(val) {
+            // 去掉所有按钮高亮
+            document.querySelectorAll('[id^="裸瓷"]').forEach(lab => {
+                lab.classList.remove('active');
+            });
+            // 高亮当前按钮
+            document.getElementById('裸瓷' + val).classList.add('active');
+             
+            $('input[name="裸瓷_radio"][value="' + val + '"]').prop('checked', true);
+             
+            $('#裸瓷').val(val);
+        }
 
         //启用禁用 产品分级 保存按钮
         function resetSaveButton() {
@@ -719,6 +760,7 @@
             resetProductDefect(true);
             if (clearBarCode) $('#产品条码').val('');
             $('#产品条码').focus();
+            $('#裸瓷').val(0);
         }
         //启用禁用 产品缺陷 页
         function resetProductDefect(disabled) {
@@ -1366,7 +1408,8 @@
                         //"Remarks": $('#备注').val(),
                         "IsPDA": 1,
                         "ProductionDefects": productionDefects,
-                        "OPTimeStampPDA": completeProcedure[0]["CONVERTOPTIMESTAMP"]
+                        "OPTimeStampPDA": completeProcedure[0]["CONVERTOPTIMESTAMP"],
+                        "LuociFlag": $("#裸瓷").val()
                     }];
                 }
                 //拼合更新数据
@@ -1388,7 +1431,8 @@
                         //只有编辑时使用
                         "ProductionDataID": productionDataID,
                         "PDACheckTime": jsonProductData["CheckTime"],
-                        "OrgGoodsLevelTypeID": jsonProductData["GoodsLevelTypeID"]
+                        "OrgGoodsLevelTypeID": jsonProductData["GoodsLevelTypeID"],
+                        "LuociFlag": $("#裸瓷").val()
                     }];
                 }