wangxiaoming 6 anni fa
parent
commit
dcf0fcecd1

+ 1 - 1
watero-common-core/src/main/java/com/iamberry/wechat/core/entity/AdminUtils.java

@@ -84,7 +84,7 @@ public class AdminUtils {
 //		cookie.setPath("/" + NameUtils.getConfig("ROOT_PATH"));
 		cookie.setPath("/");
 		cookie.setHttpOnly(true);
-		cookie.setDomain(".iamberry.com");
+		cookie.setDomain(NameUtils.getConfig("DO_MAIN"));
 		response.addCookie(cookie);
 	}
 

+ 1 - 0
watero-common-web/src/main/java/com/iamberry/common/web/SimpleCORSFilter.java

@@ -37,6 +37,7 @@ public class SimpleCORSFilter implements Filter {
 		origins.add("test.iamberry.com:801");
 		origins.add("w.iamberry.com:8848");
 		origins.add("test.iamberry.com:8848");
+		origins.add("rst.iamberry.com:8848");
 	}
     public void init(FilterConfig filterConfig) throws ServletException {}
     public void doFilter(ServletRequest servletRequest, ServletResponse

+ 1 - 1
watero-rst-core/src/main/java/com.iamberry.rst.core/order/ProductColor.java

@@ -31,7 +31,7 @@ public class ProductColor implements Serializable {
 
     private String colorPicture;    //介绍图
 
-    private Integer colorStatus;    //状态
+    private Integer colorStatus;    //状态 1:在售;2:停止销售;3:删除',
 
     private Date colorCretaeTime;   //创建时间
 

+ 4 - 1
watero-rst-core/src/main/java/com.iamberry.rst.core/sys/Dept.java

@@ -21,7 +21,10 @@ public class Dept {
         depts.put(3, new DeptInfo(3, "客服运营部", "CS-RUN"));
         depts.put(4, new DeptInfo(4, "广州销售部", "SALVE"));
         depts.put(5, new DeptInfo(5, "财务部", "FINANCE"));
-        depts.put(5, new DeptInfo(6, "工厂生产部", "FINANCE"));
+        depts.put(6, new DeptInfo(6, "工厂生产部", "PRODUCE"));
+        depts.put(7, new DeptInfo(7, "管理部", "MANAGEMENT"));
+        depts.put(8, new DeptInfo(8, "工厂仓库部", "WAREHOUSE"));
+        //7.管理部8工厂仓库部
     }
 
     /**

+ 1 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/product/ProductServiceImpl.java

@@ -194,6 +194,7 @@ public class ProductServiceImpl implements ProductService {
         List<ProductColor> productColorList = product.getColorList();
         for (ProductColor productColor : productColorList) {
             productColor.setColorProductId(product.getProductId());
+            productColor.setColorStatus(1);
         }
         flag = productColorMapper.saveList(productColorList);
         if(flag < 1){

+ 3 - 1
watero-rst-web/src/main/java/com/iamberry/rst/controllers/product/AdminProductController.java

@@ -93,7 +93,9 @@ public class AdminProductController {
     @RequestMapping("/to_add_product")
     public ModelAndView toAddProduct(HttpServletRequest request) {
         ModelAndView mv = new ModelAndView("product/add_product");
-
+        ProductType productType = new ProductType();
+        List<ProductType> productTypeList = productService.listProductType(productType);
+        mv.addObject("productTypeList",productTypeList);
         return mv;
     }
 

+ 3 - 1
watero-rst-web/src/main/resources/platform.properties

@@ -93,7 +93,7 @@ appSecret=39c8f8742c3f084e1da5b75520436a70
 #appSecret=97b2f2991e4ff0f2567fbc625f858377
 
 # wechat auth back url
-WECHAT_BACK_URL=http://test.iamberry.com/wechatBack
+WECHAT_BACK_URL=http://rst.iamberry.com/wechatBack
 
 # index redirect url
 redirectUrl_index=redirect:/wechat/index
@@ -110,4 +110,6 @@ scanningQrCode=https://w.iamberry.com/tooth/wechat/qr/
 ReqURL=http://api.kdniao.com/api/Eorderservice
 #ReqURL=http://testapi.kdniao.cc:8081/api/EOrderService
 
+DO_MAIN=rst.iamberry.com
+
 

+ 28 - 8
watero-rst-web/src/main/webapp/WEB-INF/views/product/add_product.ftl

@@ -75,13 +75,15 @@
             </div>
 
             <div class="row cl">
-                <label class="form-label col-1 col-sm-1">类型:</label>
+                <label class="form-label col-1 col-sm-1">产品类型:</label>
                 <div class="formControls col-2 col-sm-2" style="">
                     <span class="select-box">
-                        <select class="select" id="salesBatchId" name="salesBatchId" >
-                            <#list productTypeList as productType>
-                                <option value="${productType.typeId}" >${productType.typeName}</option>
-                            </#list>
+                        <select class="select" id="productType" name="productType" >
+                            <#if productTypeList??>
+                                <#list productTypeList as productType>
+                                    <option value="${productType.typeId}" >${productType.typeName}</option>
+                                </#list>
+                            </#if>
                         </select>
 				    </span>
                 </div>
@@ -92,12 +94,30 @@
                 </div>
             </div>
 
-            <div class="row cl" id="" style="">
+            <div class="row cl">
+                <label class="form-label col-1 col-sm-1">是否可批发:</label>
+                <div class="formControls col-2 col-sm-2" style="">
+                    <span class="select-box">
+                        <select class="select" id="productWholesale" name="productWholesale" >
+                            <option value="1" >可批发</option>
+                            <option value="2" >不可批发</option>
+                        </select>
+				    </span>
+                </div>
+
+                <label class="form-label col-1 col-sm-1">产品备注:</label>
+                <div class="formControls col-2 col-sm-2" style="">
+                    <input type="text" class="input-text" value="" placeholder="产品备注" id="productRemark" name="productRemark">
+                </div>
+            </div>
+
+
+           <#-- <div class="row cl" id="" style="">
                 <label class="form-label col-1 col-sm-1">备注:</label>
                 <div class="formControls col-6 col-sm-6" style="">
-                    <input type="text" class="input-text" value="" placeholder="填写产品型号" id="productRemark" name="productRemark" datatype="*1-15" errormsg="产品型号格式不正确!">
+                    <input type="text" class="input-text" value="" placeholder="产品备注" id="productRemark" name="productRemark">
                 </div>
-            </div>
+            </div>-->
 
             <div class="row cl">
                 <label class="form-label col-3">

+ 1 - 1
watero-rst-web/src/main/webapp/WEB-INF/views/sys/list_admin.ftl

@@ -33,7 +33,7 @@
         </tr>
         </thead>
         <tbody>
-        <#if (page.dataList?size <= 0)> {
+        <#if (page.dataList?size <= 0)>
             <tr class="text-c"><td colspan="9">暂无数据</td></tr>
         <#else>
             <#list page.dataList as o>

+ 8 - 3
watero-rst-web/src/main/webapp/common/js/product/product.js

@@ -10,7 +10,7 @@ color.html = '<tr class="color_list">'
             + '<td style="text-align: center;" width="10"><input type="text" class="input-text input-number item-num" value="0" name="colorPrice" id=""  style="width: 100%;text-align: center;" placeholder="原价" onkeyup="keyFun($(this),9999,1)" onpaste="keyFun($(this),9999,1)"></td>'
             + '<td style="text-align: center;" width="10"><input type="text" class="input-text input-number item-num" value="" name="colorBar" id="" placeholder="69码"  datatype="*1-20" errormsg="69码格式不正确!"></td>'
             + '<td style="text-align: center;" width="10"><input type="text" class="input-text input-number item-num" value="0" name="colorIsWeight" id=""  style="width: 100%;text-align: center;"  placeholder="重量" onkeyup="keyFun($(this),9999,1)" onpaste="keyFun($(this),9999,1)"></td>'
-            + '<td style="text-align: center;" width="10"><select class="select" id="" name="colorIsMachine" > <option value="1" >是</option><option value="1" >否</option></select></td>'
+            + '<td style="text-align: center;" width="10"><select class="select" id="" name="colorIsMachine" ><option value="2" >否</option><option value="1" >是</option></select></td>'
             + '<td style="text-align: center;" width="10"><input type="file" class="color_file" name="file" id="fileId_'+ colorNum +'" style="display: none">'
             + '<a href="javascript:void(0)" class="del_product all_down" onclick="fileOnclick(this)">上传图片</a>'
             + '<input name="colorPicture" style="display: none;"></td>'
@@ -73,6 +73,12 @@ $(function(){
                     var inputName = $(this).attr("name");
                     color[inputName] = $(this).val()
                 })
+
+                $(this).find("select").each(function(){
+                    var inputName = $(this).attr("name");
+                    color[inputName] = $(this).val()
+                })
+
                 colorList.push(color);
             })
 
@@ -117,8 +123,7 @@ function fileUpload(nodo) {
         dataType: 'json',   //json
         success: function (data) {
             if(data.returnCode == 200){
-                $("#"+nodo)
-                $("#fileDiv").prepend('<input type="file" name="file" id="fileid" style="opacity: 0; position: absolute; width: 90px;height: 80px;" onchange="fileUpload()">');
+
             }else{
                 layer.msg('上传失败,请重试!',{icon: 5,time:2000});
             }