Ver código fonte

打印机页面修改

liujiankang 7 anos atrás
pai
commit
fbc815e973

+ 6 - 2
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/add_detect.ftl

@@ -48,7 +48,7 @@
                         <tr>
 
                         <td>
-                            <input type="radio" id="radio-${product.productId!''}" name="productId" value="${product.productId!''}" <#if product_index == 0>checked</#if>/>${product.productName!''}
+                            <input type="radio" onclick="emptyingNumber();" id="radio-${product.productId!''}" name="productId" value="${product.productId!''}" <#if product_index == 0>checked</#if>/>${product.productName!''}
                         </td>
                         <td>
                             <select name="colorId${product.productId!''}" id="colorId${product.productId!''}" style="width:90%" class="my-select">
@@ -162,7 +162,11 @@
 </article>
 <script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
 <script type="text/javascript">
-
+    function emptyingNumber() {
+        $("input[name='productId']").each(function () {
+            $("#maintenanceEquipmentNumber"+$(this).val()).val("");
+        });
+    }
 
     function  add() {
         $("input[name='checkbox']:checkbox:checked").each(function () {

+ 6 - 2
watero-rst-web/src/main/webapp/WEB-INF/views/cm/maintenance/add_maintenance.ftl

@@ -47,7 +47,7 @@
                         <#list productList as product>
                         <tr>
                             <td>
-                                <input type="radio" id="radio-${product.productId!''}" name="productId" value="${product.productId!''}" <#if product_index == 0>checked</#if>/>${product.productName!''}
+                                <input type="radio" onclick="emptyingNumber();" id="radio-${product.productId!''}" name="productId" value="${product.productId!''}" <#if product_index == 0>checked</#if>/>${product.productName!''}
                             </td>
                             <td>
                                 <select name="colorId${product.productId!''}" id="colorId${product.productId!''}" style="width:90%" class="my-select">
@@ -154,7 +154,11 @@
 </article>
 <script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
 <script type="text/javascript">
-
+    function emptyingNumber() {
+        $("input[name='productId']").each(function () {
+            $("#maintenanceEquipmentNumber"+$(this).val()).val("");
+        });
+    }
 
     function  add() {
         var maintenanceContentDate = $("#maintenanceContentDate").val();

+ 12 - 7
watero-rst-web/src/main/webapp/WEB-INF/views/cm/maintenance/update_maintenance.ftl

@@ -48,17 +48,17 @@
                         <#list productList as product>
                         <tr>
                             <td>
-                                <input type="radio" id="radio-${product.productId!''}" name="productId" value="${product.productId!''}" <#if product.productId == maintenanceInfo.productId>checked</#if>/>${product.productName!''}
+                                <input type="radio" onclick="emptyingNumber();" id="radio-${product.productId!''}" name="productId" value="${product.productId!''}" <#if product.productId == maintenanceInfo.productId>checked</#if>/>${product.productName!''}
                             </td>
                             <td>
                                 <select name="colorId${product.productId!''}" id="colorId${product.productId!''}" style="width:90%;" class="my-select">
                                     <#if (product.colorList?size > 0)>
-                                        <#list product.colorList as colorList>
-                                            <option value ="${colorList.colorId!''}">${colorList.colorName!''}</option>
-                                        </#list>
-                                    <#else>
-                                        <option value ="">暂无颜色</option>
-                                    </#if>
+                                    <#list product.colorList as colorList>
+                                        <option value ="${colorList.colorId!''}">${colorList.colorName!''}</option>
+                                    </#list>
+                                <#else>
+                                    <option value ="">暂无颜色</option>
+                                </#if>
                                 </select>
                             </td>
                             <td>
@@ -154,6 +154,11 @@
 </article>
 <script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
 <script type="text/javascript">
+    function emptyingNumber() {
+        $("input[name='productId']").each(function () {
+            $("#maintenanceEquipmentNumber"+$(this).val()).val("");
+        });
+    }
 
 
     function  add() {