Browse Source

Merge branch 'master' of http://git.iamberry.com/hexiugang/iamberry-common-parent

wangxiaoming 7 years ago
parent
commit
d0799f375f

+ 5 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/product/mapper/productMapper.xml

@@ -134,6 +134,11 @@
     <select id="listProductAndColorAndfittings" parameterType="Product" resultMap="productColorFittingsMap">
         select * from
         tb_rst_product_info
+        <where>
+            <if test="productName != null and productName != ''">
+                product_name LIKE CONCAT('%',#{productName},'%')
+            </if>
+        </where>
     </select>
 
     <resultMap id="productColorFittingsMap" type="Product">

+ 30 - 0
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminSignclosedController.java

@@ -324,5 +324,35 @@ public class AdminSignclosedController {
         return msg;
     }
 
+
+    /**
+     * 根据产品名称查询产品数据
+     *
+     * @return
+     */
+    @ResponseBody
+    @RequiresPermissions("signclosed:select:signclosed")
+    @RequestMapping(value = "/select_product")
+    public ResponseJson selectProduct(HttpServletRequest request,String productName){
+        ResponseJson msg = new ResponseJson();
+        if(productName == null){
+            msg.setResultCode(500);
+            msg.setReturnCode(500);
+            return msg;
+        }
+        //获取所有产品及其颜色,配件
+        Product product = new Product();
+        product.setProductName(productName);
+        List<Product> productList = productService.listProductAndColorAndfittings(product);
+        if (productList.size() == 0) {
+            msg.setResultCode(500);
+            msg.setReturnCode(500);
+        } else {
+            msg.setResultCode(200);
+            msg.setReturnCode(200);
+            msg.addResponseKeyValue("productList",productList);
+        }
+        return msg;
+    }
 }
 

+ 31 - 5
watero-rst-web/src/main/webapp/WEB-INF/views/cm/signclosed/add_signclosed.ftl

@@ -76,7 +76,7 @@
                     </div>
 
             </div>
-            <div class="row cl">
+            <#--<div class="row cl">
                 <label class="form-label col-3 col-sm-3"><span class="c-red">*</span>寄回产品:</label>
                 <div class="formControls col-8 col-sm-8 text-c" id="produceSelect">
                     <table class="table table-border table-bg table-bordered">
@@ -119,7 +119,7 @@
                         </tbody>
                     </table>
                 </div>
-            </div>
+            </div>-->
             <div class="row cl">
                 <label class="form-label col-3 col-sm-3"><span class="c-red">*</span>寄回物流:</label>
                 <div class="formControls col-3 col-sm-3 skin-minimal">
@@ -178,6 +178,10 @@
             <div class="row cl" id="renewedProduct">
                 <label class="form-label col-3 col-sm-3"><span class="c-red">*</span>签收产品:</label>
                 <div class="formControls col-8 col-sm-8 text-c" id="produceSelect">
+                    <div>
+                        <input type="text" onchange="selectProduct();" class="input-text" style="width: 716px;" id="selectProcuct" name="selectProcuct" placeholder="请输入产品名称搜索">
+                    </div>
+
                     <table class="table table-border table-bg table-bordered">
                         <thead>
                         <tr class="text-c">
@@ -329,6 +333,31 @@
         $("#objectsStateId").show();
     }
 
+    //动态回显产品js state
+    function selectProduct(){
+        var productName = $("#selectProcuct").val();
+        alert(productName);
+        $.ajax({
+            cache: true,
+            type: "POST",
+            url: "${path}/admin/signclosed/select_product",
+            data:{'productName':productName},
+            async: false,
+            success: function(data){
+                if (data.returnCode == 200) {
+                    layer.msg('查询成功',{icon: 5,time:1000});
+                } else {
+                    layer.msg('查询失败,请刷新页面再试',{icon: 5,time:1000});
+                }
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+                layer.msg('添加错误',{icon: 5,time:1000});
+            }
+        });
+    }
+
+    //动态回显产品js end
+
     $(function(){
         var province = listProvince(null,null);
         var provinceHtml = '';
@@ -408,9 +437,6 @@
                 return;
             }
         }
-
-
-
         $.ajax({
             cache: true,
             type: "POST",

+ 1 - 1
watero-rst-web/src/main/webapp/WEB-INF/views/pts/machine/addRenovationMachine.ftl

@@ -81,7 +81,7 @@
         </div>
 
         <div class="input-box"><span class="input-dic spanhidth">拉线:</span><input class="my-input" type="text" style="width: 76%;"  name="machineLine" id="machineLine" value="A1"/> </div>
-        <div class="input-box"><span class="input-dic spanhidth">机器数量:</span><input class="my-input" type="text" style="width: 76%;"  name="number" id="number" value="10" placeholder="每次最少生成一个机器"/> </div>
+        <div class="input-box"><span class="input-dic spanhidth">机器数量:</span><input class="my-input" type="text" style="width: 76%;"  name="number" id="number" value="4" placeholder="每次最少生成一个机器"/> </div>
 
         <div class="input-box">
             <span class="input-dic spanhidth"></span>