浏览代码

优化订单列表展示

xian 4 年之前
父节点
当前提交
834440fba0
共有 20 个文件被更改,包括 326 次插入212 次删除
  1. 12 2
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/ProcMethod.java
  2. 10 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/ProcType.java
  3. 9 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/order/Product.java
  4. 3 3
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/SalesOrderServiceImpl.java
  5. 3 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/procMethodMapper.xml
  6. 3 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/procTypeMapper.xml
  7. 19 26
      watero-rst-service/src/main/java/com/iamberry/rst/service/product/mapper/productMapper.xml
  8. 13 1
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminAfterSaleController.java
  9. 4 2
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminProcMethodController.java
  10. 9 2
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminSalesOrderController.java
  11. 44 2
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/product/AdminProductController.java
  12. 33 33
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_detail.ftl
  13. 3 3
      watero-rst-web/src/main/webapp/WEB-INF/views/order/store/add.ftl
  14. 1 1
      watero-rst-web/src/main/webapp/WEB-INF/views/order/store/list.ftl
  15. 2 1
      watero-rst-web/src/main/webapp/WEB-INF/views/order/store/update.ftl
  16. 97 81
      watero-rst-web/src/main/webapp/WEB-INF/views/product/add_product.ftl
  17. 8 11
      watero-rst-web/src/main/webapp/WEB-INF/views/product/product_list.ftl
  18. 39 42
      watero-rst-web/src/main/webapp/WEB-INF/views/product/update_product.ftl
  19. 13 1
      watero-rst-web/src/main/webapp/WEB-INF/views/yulia/add.ftl
  20. 1 1
      watero-rst-web/src/main/webapp/common/js/product/product.js

+ 12 - 2
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/ProcMethod.java

@@ -27,10 +27,20 @@ public class ProcMethod  implements  Serializable{
     private Date procMethodCreateTime;
     //处理方式修改时间'
     private Date procMethodUpdateTime;
-    //是否收费
-    private Integer procMethodIsCharge;//1.收费2不收费 0待定
+    //是否收费 1.收费2不收费 0待定
+    private Integer procMethodIsCharge;
 
     private String procTypeName;
+    // 是否展示给优尼雅售后系统其他客户 1:不展示,默认 2:展示
+    private Integer procMethodIsShow;
+
+    public Integer getProcMethodIsShow() {
+        return procMethodIsShow;
+    }
+
+    public void setProcMethodIsShow(Integer procMethodIsShow) {
+        this.procMethodIsShow = procMethodIsShow;
+    }
 
     public Integer getProcMethodId(){
         return procMethodId;

+ 10 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/ProcType.java

@@ -23,6 +23,16 @@ public class ProcType  implements  Serializable{
     private Date procTypeCreateTime;
     //处理方式修改时间'
     private Date procTypeUpdateTime;
+    // 是否展示给优尼雅售后系统其他客户 1:不展示,默认 2:展示
+    private Integer procTypeIsShow;
+
+    public Integer getProcTypeIsShow() {
+        return procTypeIsShow;
+    }
+
+    public void setProcTypeIsShow(Integer procTypeIsShow) {
+        this.procTypeIsShow = procTypeIsShow;
+    }
 
     public Integer getProcTypeId(){
         return procTypeId;

+ 9 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/order/Product.java

@@ -37,11 +37,20 @@ public class Product implements Serializable {
     private Integer productIsCombination;//是否组合产品 1.否。2是
     private Integer productIsSplit;     //录入是否需要拆分  1需要 2不需要
     private Integer produceId;          // 生产产品id
+    private Integer companyId;          // 所属公司
 
     private List<ProductColor> colorList = new ArrayList<ProductColor>();                    //产品颜色集合
     private List<ProductAreaRela> productAreaRelaList = new ArrayList<>();        //区域
     private List<ProductCombinatInfo> productCombinatList = new ArrayList<ProductCombinatInfo>();   //组合产品集合
 
+    public Integer getCompanyId() {
+        return companyId;
+    }
+
+    public void setCompanyId(Integer companyId) {
+        this.companyId = companyId;
+    }
+
     public Integer getProduceId() {
         return produceId;
     }

+ 3 - 3
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/SalesOrderServiceImpl.java

@@ -1496,7 +1496,7 @@ public class SalesOrderServiceImpl implements SalesOrderService {
             boolean isDefectiveProduct = false;
             if (listDetect != null && !listDetect.isEmpty()) {
                 int result = listDetect.get(0).getDetectState();
-                if (result == 32 || result == 36 || result == 37) {
+                if (result == 32 || result == 36 || result == 37 || result == 39) {
                     // 凡是(付费维修-维修完成)、(免费维修-维修完成)、(机器无故障,原机退回)都走不良品
                     isDefectiveProduct = true;
                 }
@@ -1506,16 +1506,16 @@ public class SalesOrderServiceImpl implements SalesOrderService {
                 // 如果已出库则返还库存
                 for (SalesOrderItem soi:listOrderitem) {
                     InventoryInfo inventoryInfo2 = new InventoryInfo();
-                    //良品数量
-                    inventoryInfo2.setInventoryGoodProductNum(soi.getItemNum());
                     inventoryInfo2.setInventoryProductBar(soi.getItemColorBar());
                     inventoryInfo2.setWarehouseId(so.getSalesWarehouseId());
                     //类型1.采购 2.发货 3.次品
                     inventoryInfo2.setLogType(2);
                     //产品质量类型 1良品 2 不良品
                     if (isDefectiveProduct) {
+                        inventoryInfo2.setInventoryDefectiveProductNum(soi.getItemNum());
                         inventoryInfo2.setQualityType(2);
                     } else {
+                        inventoryInfo2.setInventoryGoodProductNum(soi.getItemNum());
                         inventoryInfo2.setQualityType(1);
                     }
                     inventoryInfo2.setInventoryRecentRecord("出库-订单号:"+ so.getSalesDealCode());

+ 3 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/procMethodMapper.xml

@@ -48,6 +48,9 @@
             <if test="procMethodIsSend != null ">
                 AND t.proc_method_is_send = #{procMethodIsSend}
             </if >
+            <if test="procMethodIsShow != null ">
+                AND t.proc_method_is_show = #{procMethodIsShow}
+            </if >
         </where>
     </select>
     <select id="getProcMethodById" resultMap="BaseResultMap" parameterType="Integer" >

+ 3 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/procTypeMapper.xml

@@ -36,6 +36,9 @@
             <if test="procTypeSaleStatus != null ">
                 AND t.proc_type_sale_status = #{procTypeSaleStatus}
             </if >
+            <if test="procTypeIsShow != null ">
+                AND t.proc_type_is_show = #{procTypeIsShow}
+            </if >
         </where>
     </select>
     <select id="getProcTypeById" resultMap="BaseResultMap" parameterType="Integer" >

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

@@ -277,6 +277,9 @@
             <if test="productId != null ">
                 AND t.product_id = #{productId}
             </if >
+            <if test="companyId != null ">
+                AND t.company_id = #{companyId}
+            </if >
             <if test="productName != null and productName != ''">
                 AND t.product_name  like  CONCAT ('%',#{productName},'%')
             </if >
@@ -310,36 +313,26 @@
     </select>
 
     <insert id="save" parameterType="Product"   useGeneratedKeys="true"  keyProperty="productId" >
-        insert into
-        tb_rst_product_info
+        insert into tb_rst_product_info
         (
-        product_id,
-        product_name,
-        product_abbreviation,
-        product_salesnum,
-        product_status,
-        product_remark,
-        product_type,
-        product_number,
-        product_is_detection,
-        product_wholesale,
-        product_is_combination,
-        product_is_split
+                product_id, product_name, product_abbreviation, product_salesnum, product_status, product_remark, product_type,
+                product_number, product_is_detection, product_wholesale, product_is_combination, product_is_split, company_id
         )
         values
         (
-        #{productId},
-        #{productName},
-        #{productAbbreviation},
-        #{productSalesnum},
-        #{productStatus},
-        #{productRemark},
-        #{productType},
-        #{productNumber},
-        #{productIsDetection},
-        #{productWholesale},
-        #{productIsCombination},
-        #{productIsSplit}
+            #{productId},
+            #{productName},
+            #{productAbbreviation},
+            #{productSalesnum},
+            #{productStatus},
+            #{productRemark},
+            #{productType},
+            #{productNumber},
+            #{productIsDetection},
+            #{productWholesale},
+            #{productIsCombination},
+            #{productIsSplit},
+            #{companyId}
         )
     </insert>
     <update id="update" parameterType="Product" >

+ 13 - 1
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminAfterSaleController.java

@@ -12,6 +12,7 @@ import com.iamberry.rst.core.order.ProductType;
 import com.iamberry.rst.core.page.PageRequest;
 import com.iamberry.rst.core.page.PagedResult;
 import com.iamberry.rst.core.pts.Produce;
+import com.iamberry.rst.core.pts.PtsBatch;
 import com.iamberry.rst.core.pts.PtsMachine;
 import com.iamberry.rst.core.sys.Admin;
 import com.iamberry.rst.faces.cm.StoreInfoService;
@@ -19,10 +20,12 @@ import com.iamberry.rst.faces.fm.ComplaintDetectInfoService;
 import com.iamberry.rst.faces.product.ProductService;
 import com.iamberry.rst.faces.pts.MachineService;
 import com.iamberry.rst.faces.pts.ProduceService;
+import com.iamberry.rst.faces.pts.PtsBatchService;
 import com.iamberry.rst.service.cm.mapper.ComplaintQuestionInfoMapper;
 import com.iamberry.rst.util.GenerateKeyUtil;
 import com.iamberry.rst.utils.*;
 import com.iamberry.url.URLUtils;
+import com.iamberry.wechat.tools.DateTimeUtil;
 import com.iamberry.wechat.tools.ResponseJson;
 import com.iamberry.wechat.tools.StrUtils;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
@@ -61,6 +64,8 @@ public class AdminAfterSaleController {
     private ProduceService produceService;
     @Autowired
     private GenerateKeyUtil generateKeyUtil;
+    @Autowired
+    private PtsBatchService batchService;
 
     @RequiresPermissions("afterSales:SysAfterSales")
     @RequestMapping(value = "/adafterSalesUI")
@@ -97,6 +102,10 @@ public class AdminAfterSaleController {
         if (machine == null) {
             return ResponseJson.getFAILURE();
         }
+        // 生产批次
+        PtsBatch batchTemp = new PtsBatch();
+        batchTemp.setBatchId(machine.getMachineBatchId());
+        PtsBatch ptsBatch = batchService.getPtsBatch(batchTemp);
         // 查询生产产品
         Produce produce = new Produce();
         produce.setProduceId(machine.getMachineProduceId());
@@ -110,7 +119,10 @@ public class AdminAfterSaleController {
             return ResponseJson.getFAILURE();
         }
 
-        return ResponseJson.getSUCCESS().addResponseKeyValue("product", productService.getProduce(productId));
+        return ResponseJson.getSUCCESS()
+                .addResponseKeyValue("batchNO", ptsBatch.getBatchNo())
+                .addResponseKeyValue("ctrDate", DateTimeUtil.format(machine.getMachineCreateTime(), "yyyy-MM-dd"))
+                .addResponseKeyValue("product", productService.getProduce(productId));
     }
 
     /**

+ 4 - 2
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminProcMethodController.java

@@ -39,7 +39,8 @@ public class AdminProcMethodController {
     @ResponseBody
     @RequestMapping("/type")
     public ResponseJson type(HttpServletRequest request,ProcType procType) {
-         List<ProcType> procTypeList = new ArrayList<>();    ////因为在前端不判断,所以需要直接初始化
+        //因为在前端不判断,所以需要直接初始化
+        List<ProcType> procTypeList = new ArrayList<>();
         procType.setProcTypeStatus(1);
         procTypeList = procTypeService.getProcTypeList(procType);
         ResponseJson rj = new ResponseJson(200, "查询成功", 200);
@@ -55,7 +56,8 @@ public class AdminProcMethodController {
     @ResponseBody
     @RequestMapping("/method")
     public ResponseJson method(HttpServletRequest request,ProcMethod procMethod) {
-        List<ProcMethod> procMethodList = new ArrayList<>();    //因为在前端不判断,所以需要直接初始化
+        //因为在前端不判断,所以需要直接初始化
+        List<ProcMethod> procMethodList = new ArrayList<>();
         procMethod.setProcMethodStatus(1);
         procMethodList = procMethodService.getProcMethodList(procMethod);
         ResponseJson rj = new ResponseJson(200, "查询成功", 200);

+ 9 - 2
watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminSalesOrderController.java

@@ -1393,7 +1393,11 @@ public class AdminSalesOrderController {
     @RequestMapping("/listStoreInfo")
     @RequiresPermissions("salesOrder:listStoreInfo")
     public ModelAndView listStoreInfo() {
-        List<StoreInfo> listStoreInfo = storeInfoService.listStore(new StoreInfo());
+        // 如果当前客户指定了客户,只查询指定客户的店铺信息
+        StoreInfo store = new StoreInfo();
+        store.setCompanyId(AdminUtils.getLoginAdmin().getAdminPcId());
+        // 查询指定的店铺
+        List<StoreInfo> listStoreInfo = storeInfoService.listStore(store);
         if (listStoreInfo != null && listStoreInfo.size() >= 1) {
             for (StoreInfo temp : listStoreInfo) {
                 temp.setCompanyInfo(companyInfoService.getCompanyInfoById(temp.getCompanyId()));
@@ -1413,7 +1417,10 @@ public class AdminSalesOrderController {
     @RequestMapping("/addStoreInfoUI")
     @RequiresPermissions("salesOrder:store:add")
     public ModelAndView addStoreInfoUI() {
-        return new ModelAndView("order/store/add").addObject("list", companyInfoService.listCompanyInfo(new CompanyInfo()));
+        // 如果当前客户是指定的客户,只查询当前客户的内容
+        CompanyInfo company = new CompanyInfo();
+        company.setCompanyId(AdminUtils.getLoginAdmin().getAdminPcId());
+        return new ModelAndView("order/store/add").addObject("list", companyInfoService.listCompanyInfo(company));
     }
     @RequestMapping("/updateStoreInfoUI")
     @RequiresPermissions("salesOrder:store:update")

+ 44 - 2
watero-rst-web/src/main/java/com/iamberry/rst/controllers/product/AdminProductController.java

@@ -1,12 +1,15 @@
 package com.iamberry.rst.controllers.product;
 
 import com.iamberry.rst.controllers.sys.SysController;
+import com.iamberry.rst.core.cm.CompanyInfo;
 import com.iamberry.rst.core.order.*;
 import com.iamberry.rst.core.page.PagedResult;
+import com.iamberry.rst.faces.cm.CompanyInfoService;
 import com.iamberry.rst.faces.product.ProductAreaRelaService;
 import com.iamberry.rst.faces.product.ProductAreaService;
 import com.iamberry.rst.faces.product.ProductColorService;
 import com.iamberry.rst.faces.product.ProductService;
+import com.iamberry.rst.utils.AdminUtils;
 import com.iamberry.rst.utils.StitchAttrUtil;
 import com.iamberry.rst.utils.UploadFileUtils;
 import com.iamberry.wechat.tools.ResponseJson;
@@ -51,7 +54,8 @@ public class AdminProductController {
     private ProductAreaRelaService productAreaRelaService;
     @Autowired
     private ProductColorService productColorService;
-
+    @Autowired
+    private CompanyInfoService companyInfoService;
 
     @ResponseBody
     @RequestMapping("/get_product")
@@ -132,6 +136,14 @@ public class AdminProductController {
                                          @RequestParam(value = "pageSize", defaultValue = "10", required = false) Integer pageSize,
                                          @RequestParam(value = "pageNO", defaultValue = "1", required = false) Integer pageNO,
                                          @RequestParam(value = "totalNum", defaultValue = "0", required = false) Integer totalNum) {
+        if (product == null) {
+            product = new Product();
+        }
+        // 如果是优尼雅售后系统的客户进入系统,则只能查询当前客户对应的产品
+        if (AdminUtils.getLoginAdmin().getAdminPcId() != null) {
+            product.setCompanyId(AdminUtils.getLoginAdmin().getAdminPcId());
+        }
+
         ModelAndView mv = new ModelAndView("product/product_list");
 
         PagedResult<Product> pagedResult = productService.listProductPage(pageNO, pageSize, product, totalNum == 0);
@@ -159,15 +171,26 @@ public class AdminProductController {
     @RequiresPermissions("salesOrder:save:product")
     @RequestMapping("/to_add_product")
     public ModelAndView toAddProduct(HttpServletRequest request) {
+        boolean isYulia = false;
         ModelAndView mv = new ModelAndView("product/add_product");
+        // 产品类型
         ProductType productType = new ProductType();
         productType.setTypeStatus(1);
         List<ProductType> productTypeList = productService.listProductType(productType);
         mv.addObject("productTypeList",productTypeList);
+        // 产品使用区域
         ProductArea productArea = new ProductArea();
         productArea.setProductAreaStatus(1);
         List<ProductArea> productAreaList = productAreaService.getProductAreaList(productArea);
         mv.addObject("productAreaList",productAreaList);
+        // 所属公司
+        CompanyInfo company = new CompanyInfo();
+        if (AdminUtils.getLoginAdmin().getAdminPcId() != null) {
+            company.setCompanyId(AdminUtils.getLoginAdmin().getAdminPcId());
+            isYulia = true;
+        }
+        mv.addObject("companyList", companyInfoService.listCompanyInfo(company));
+        mv.addObject("isYulia", isYulia);
         return mv;
     }
 
@@ -292,37 +315,56 @@ public class AdminProductController {
     @RequiresPermissions("salesOrder:update:product")
     @RequestMapping("/to_update_product")
     public ModelAndView toUpdateProduct(HttpServletRequest request,Integer productId) {
+        // 是否是优尼雅的客户
+        boolean isYulia = false;
+
         ModelAndView mv = new ModelAndView("product/update_product");
+        // 查询产品类型
         ProductType productType = new ProductType();
         List<ProductType> productTypeList = productService.listProductType(productType);
         mv.addObject("productTypeList",productTypeList);
 
+        // 产品产品信息
         Product product = productService.getProduce(productId);
         mv.addObject("product",product);
 
+        // 查询产品作用区域
         ProductArea productArea = new ProductArea();
         productArea.setProductAreaStatus(1);
         List<ProductArea> productAreaList = productAreaService.getProductAreaList(productArea);
 
+        // 查询产品类
         ProductAreaRela productAreaRela = new ProductAreaRela();
         productAreaRela.setProductId(productId);
         List<ProductAreaRela> productAreaRelaList = productAreaRelaService.getProductAreaRelaList(productAreaRela);
         for (ProductArea pa:productAreaList) {
             pa.setIsUse(2);
             for (ProductAreaRela par:productAreaRelaList) {
-                if(pa.getProductAreaId() == par.getProductAreaId()){
+                if(pa.getProductAreaId().intValue() == par.getProductAreaId()){
                     pa.setIsUse(1);
                 }
             }
         }
         mv.addObject("productAreaList",productAreaList);
 
+        // 查询产品颜色
         ProductColor productColor = new ProductColor();
         productColor.setColorProductId(productId);
         List<ProductColor> productColorList = productColorService.getProductColorList(productColor);
         mv.addObject("productColorList",productColorList);
+
+        // 查询组合产品
         List<ProductCombinatInfo> productCombinatList =  productService.combinatList(productId);
         mv.addObject("productCombinatList",productCombinatList);
+        // 所属公司
+        CompanyInfo company = new CompanyInfo();
+        if (AdminUtils.getLoginAdmin().getAdminPcId() != null) {
+            company.setCompanyId(AdminUtils.getLoginAdmin().getAdminPcId());
+            isYulia = true;
+        }
+        mv.addObject("companyList", companyInfoService.listCompanyInfo(company));
+        mv.addObject("isYulia", isYulia);
+
         return mv;
     }
 

+ 33 - 33
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_detail.ftl

@@ -359,15 +359,15 @@
                 <th width="10">检测现象:</th>
                 <td width="10" style="  font-weight: normal;" colspan="5"><span>
                 <#if detectPhenomenonList??>
-                                <#if (detectPhenomenonList?size > 0)>
-                                    <#list detectPhenomenonList as detectPhenomenon>
-                                    <li class="b-close" id="configDetele1">
-                                        <input type="hidden" value="${detectPhenomenon.itemConfigId!''}" name="configli1">
-                                        ${detectPhenomenon.itemDetectContent!''}
-                                        <span style="display: none" class="my-close" onclick="deleteli(this)"></span>
-                                    </li>
-                                    </#list>
-                                </#if>
+                    <#if (detectPhenomenonList?size > 0)>
+                        <#list detectPhenomenonList as detectPhenomenon>
+                        <li class="b-close" id="configDetele1">
+                            <input type="hidden" value="${detectPhenomenon.itemConfigId!''}" name="configli1">
+                            ${detectPhenomenon.itemDetectContent!''}
+                            <span style="display: none" class="my-close" onclick="deleteli(this)"></span>
+                        </li>
+                        </#list>
+                    </#if>
                 </#if>
                 </span></td>
             </tr>
@@ -380,7 +380,7 @@
                                <li class="b-close" id="configDetele2">
                                    <input type="hidden" value="${detectFailureCause.itemConfigId!''}" name="configli2">
                                    ${detectFailureCause.itemDetectContent!''}
-                                   <span class="my-close" onclick="deleteli(this)"></span>
+                                   <span style="display: none" class="my-close" onclick="deleteli(this)"></span>
                                 </li>
                          </#list>
                          </#if>
@@ -391,15 +391,15 @@
                 <th width="10">判定结果:</th>
                 <td width="10" style="font-weight: normal;" colspan="5"><span>
                 <#if detectResultsList??>
-                                <#if (detectResultsList?size > 0)>
-                                    <#list detectResultsList as detectResults>
-                                    <li class="b-close" id="configDetele3">
-                                        <input type="hidden" value="${detectResults.itemConfigId!''}" name="configli3">
-                                        ${detectResults.itemDetectContent!''}
-                                        <span class="my-close" onclick="deleteli(this)"></span>
-                                    </li>
-                                    </#list>
-                                </#if>
+                    <#if (detectResultsList?size > 0)>
+                        <#list detectResultsList as detectResults>
+                        <li class="b-close" id="configDetele3">
+                            <input type="hidden" value="${detectResults.itemConfigId!''}" name="configli3">
+                            ${detectResults.itemDetectContent!''}
+                            <span style="display: none" class="my-close" onclick="deleteli(this)"></span>
+                        </li>
+                        </#list>
+                    </#if>
                 </#if>
                 </span></td>
             </tr>
@@ -407,13 +407,13 @@
                 <th width="10">故障指向:</th>
                 <td width="10" style="font-weight: normal;" colspan="5"><span>
                 <#if (detectPointList?size > 0)>
-                                    <#list detectPointList as detectPoint>
-                                    <li class="b-close" id="configDetele4">
-                                        <input type="hidden" value="${detectPoint.itemConfigId!''}" name="configli4">
-                                        ${detectPoint.itemDetectContent!''}
-                                        <span class="my-close" onclick="deleteli(this)"></span>
-                                    </li>
-                                    </#list>
+                    <#list detectPointList as detectPoint>
+                        <li class="b-close" id="configDetele4">
+                            <input type="hidden" value="${detectPoint.itemConfigId!''}" name="configli4">
+                            ${detectPoint.itemDetectContent!''}
+                            <span style="display: none" class="my-close" onclick="deleteli(this)"></span>
+                        </li>
+                    </#list>
                 </#if>
                 </span></td>
             </tr>
@@ -421,13 +421,13 @@
                 <th width="10">原因分析:</th>
                 <td width="10" style="font-weight: normal;" colspan="5"><span>
                 <#if (detectNalysisList?size > 0)>
-                                    <#list detectNalysisList as detectNalysis>
-                                    <li class="b-close" id="configDetele5">
-                                        <input type="hidden" value="${detectNalysis.itemConfigId!''}" name="configli5">
-                                        ${detectNalysis.itemDetectContent!''}
-                                        <span class="my-close" onclick="deleteli(this)"></span>
-                                    </li>
-                                    </#list>
+                    <#list detectNalysisList as detectNalysis>
+                        <li class="b-close" id="configDetele5">
+                            <input type="hidden" value="${detectNalysis.itemConfigId!''}" name="configli5">
+                            ${detectNalysis.itemDetectContent!''}
+                            <span style="display: none" class="my-close" onclick="deleteli(this)"></span>
+                        </li>
+                    </#list>
                 </#if>
                 </span></td>
             </tr>

+ 3 - 3
watero-rst-web/src/main/webapp/WEB-INF/views/order/store/add.ftl

@@ -36,9 +36,9 @@
         </div>
 
         <div class="row cl">
-            <label class="form-label col-xs-4 col-sm-3" style="padding-left: 0;margin-left: 0px;width: 17%;"><span class="c-red">*</span>Efast:</label>
+            <label class="form-label col-xs-4 col-sm-3" style="padding-left: 0;margin-left: 0px;width: 17%;"><span class="c-red">*</span>店铺编号:</label>
             <div class="formControls col-xs-8 col-sm-9">
-                <input type="text" class="input-text" id="storeEfast" name="storeEfast" datatype="s1-30" nullmsg="不能为空">
+                <input type="text" placeholder="店铺编号必须唯一,可用品牌名称+型号" class="input-text" id="storeEfast" name="storeEfast" datatype="s1-30" nullmsg="不能为空">
             </div>
             <div class="col-4"> </div>
         </div>
@@ -86,7 +86,7 @@
             </div>
             <div class="col-4"> </div>
         </div>
-        <span style="margin-left: 50px;"><strong>提示:新增店铺后,需要联系销售人员将此店铺和客户信息绑定</strong></span>
+        <span style="margin-left: 17%;"><strong>提示:若此店铺不在优尼雅工厂发货,发货人信息可默认不修改</strong></span>
         <div class="row cl">
             <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
                 <input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">

+ 1 - 1
watero-rst-web/src/main/webapp/WEB-INF/views/order/store/list.ftl

@@ -23,7 +23,7 @@
             <th width="40">店铺id</th>
             <th width="50">店铺名称</th>
             <th width="50">所属公司</th>
-            <th width="50">Efast店铺编号</th>
+            <th width="50">店铺编号</th>
             <th width="80">店铺备注</th>
             <th width="40">状态</th>
             <th width="40">创建时间</th>

+ 2 - 1
watero-rst-web/src/main/webapp/WEB-INF/views/order/store/update.ftl

@@ -36,7 +36,7 @@
         </div>
 
         <div class="row cl">
-            <label class="form-label col-xs-4 col-sm-3" style="padding-left: 0;margin-left: 0px;width: 17%;"><span class="c-red">*</span>Efast:</label>
+            <label class="form-label col-xs-4 col-sm-3" style="padding-left: 0;margin-left: 0px;width: 17%;"><span class="c-red">*</span>店铺编号:</label>
             <div class="formControls col-xs-8 col-sm-9">
                 <input type="text" class="input-text" id="storeEfast" name="storeEfast" datatype="s1-30" nullmsg="不能为空" value="${storeInfo.storeEfast!''}">
             </div>
@@ -86,6 +86,7 @@
             </div>
             <div class="col-4"> </div>
         </div>
+        <span style="margin-left: 17%;"><strong>提示:若此店铺不在优尼雅工厂发货,发货人信息可默认不修改</strong></span>
 
         <div class="row cl">
             <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">

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

@@ -4,10 +4,12 @@
     <meta charset="utf-8">
     <meta name="renderer" content="webkit|ie-comp|ie-stand">
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
-    <meta name="viewport"
-          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
+    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
     <meta http-equiv="Cache-Control" content="no-siteapp"/>
-<#include "/base/add_base.ftl">
+    <#include "/base/add_base.ftl">
+
+    <!-- 新增需求引入js、css -->
+    <link href="${path}/common/lib/bootstrap/bootstrap.min.css" rel="stylesheet" />
 
     <style>
         .tit{position: relative;text-align: left;font-size: 16px;padding-left: 10px;}
@@ -38,19 +40,14 @@
         .all_down{text-decoration: underline;color: #00c;}
         input[type=radio]{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-1.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
         input[type=radio]:checked{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-2.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
-
+        .input-text {
+            height: 31px;
+        }
     </style>
     <title>添加产品 - 产品管理 - RST</title>
 </head>
 <body>
-<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
-    <span class="c-gray en">/</span> 产品管理
-    <span class="c-gray en">/</span> 添加产品
-    <a class="btn radius r"
-       href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
-    <a class="btn radius r"
-       href="javascript:history.back(-1);" title="后退"><i class="Hui-iconfont">&#xe6d4;</i></a>
-</nav>
+
 <article class="page-container" style="padding: 10px;">
     <div class="pd-20 cl">
         <form action="${path}/admin/product/add_product" method="post" class="form form-horizontal" id="form-order-add"  onkeydown="if(event.keyCode==13)return false;">
@@ -63,87 +60,91 @@
                 </div>
             </div>
 
+            <div class="row cl">
+                <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>所属公司:</label>
+                <div class="formControls col-2 col-sm-2" style="">
+                    <select class="select" id="companyId" name="companyId" >
+                        <#if companyList??>
+                            <#list companyList as c>
+                                <option value="${c.companyId}" >${c.companyName}</option>
+                            </#list>
+                        </#if>
+                    </select>
+                </div>
+            </div>
+
             <div class="row cl" id="" style="">
                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>产品名称:</label>
                 <div class="formControls col-2 col-sm-2">
-                    <input type="text" class="input-text" value="" placeholder="填写产品名称" id="productName" name="productName" datatype="*1-32" errormsg="产品名称格式只支持1-32个字符!" >
+                    <input type="text" style="height: 31px;" class="input-text" value="" placeholder="填写产品名称" id="productName" name="productName" datatype="*1-32" errormsg="产品名称格式只支持1-32个字符!" >
                 </div>
                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>产品简称:</label>
                 <div class="formControls col-2 col-sm-2">
-                    <input type="text" class="input-text" value="" placeholder="填写产品简称" id="productAbbreviation" name="productAbbreviation" datatype="*1-17" errormsg="产品简称格式只支持1-17个字符!">
+                    <input type="text" style="height: 31px;" class="input-text" value="" placeholder="填写产品简称" id="productAbbreviation" name="productAbbreviation" datatype="*1-17" errormsg="产品简称格式只支持1-17个字符!">
                 </div>
             </div>
 
             <div class="row cl">
                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>产品类型:</label>
                 <div class="formControls col-2 col-sm-2" style="">
-                    <span class="select-box">
-                        <select class="select" id="productType" name="productType" >
-                            <#if productTypeList??>
-                                <#list productTypeList as productType>
-                                    <option value="${productType.typeId}" >${productType.typeName}</option>
-                                </#list>
-                            </#if>
-                        </select>
-				    </span>
+                    <select class="select" id="productType" name="productType" >
+                        <#if productTypeList??>
+                            <#list productTypeList as productType>
+                                <option value="${productType.typeId}" >${productType.typeName}</option>
+                            </#list>
+                        </#if>
+                    </select>
                 </div>
 
                 <label class="form-label col-1 col-sm-1">产品型号:</label>
                 <div class="formControls col-2 col-sm-2">
-                    <input type="text" class="input-text" value="" placeholder="填写产品型号" id="productNumber" name="productNumber" datatype="*0-15" errormsg="产品型号格式不正确!">
+                    <input type="text" style="height: 31px;" class="input-text" value="" placeholder="填写产品型号" id="productNumber" name="productNumber" datatype="*0-15" errormsg="产品型号格式不正确!">
                 </div>
             </div>
 
-            <div class="row cl">
-                <#--<label class="form-label col-1 col-sm-1"><span class="c-red">*</span>可批发:</label>
-                <div class="formControls col-2 col-sm-2 skin-minimal">
-                    <div class="radio-box">
-                        <input type="radio" id="productWholesale-1" name="productWholesale" value="1" >
-                        <label for="productWholesale-1">可批发</label>
-                    </div>
-                    <div class="radio-box">
-                        <input type="radio" id="productWholesale-2" name="productWholesale" value="2" checked>
-                        <label for="productWholesale-2">不可批发</label>
-                    </div>
-                </div>-->
-
-                   <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>售后检测:</label>
-                   <div class="formControls col-4 col-sm-4">
-                       <div class="radio-box">
-                           <input type="radio" id="productIsDetection-1" name="productIsDetection" value="1" >
-                           <label for="productIsDetection-1">需要</label>
-
-                       </div>
-                       <div class="radio-box">
-                           <input type="radio" id="productIsDetection-2" name="productIsDetection" value="2" checked>
-                           <label for="productIsDetection-2">不需要</label>
-                       </div>
-                   </div>
-
+            <div class="row cl is_yulia_hide">
+                <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>售后检测:</label>
+               <div class="formControls col-4 col-sm-4">
+                   <div class="radio-box">
+                       <label for="productIsDetection-1">
+                           <input type="radio" id="productIsDetection-1" name="productIsDetection" value="1" checked>需要
+                       </label>
 
+                   </div>
+                   <div class="radio-box">
+                       <label for="productIsDetection-2">
+                           <input type="radio" id="productIsDetection-2" name="productIsDetection" value="2">不需要
+                       </label>
+                   </div>
+               </div>
             </div>
-            <div class="row cl">
+
+            <div class="row cl is_yulia_hide">
                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>是否组合产品:</label>
                 <div class="formControls col-4 col-sm-4">
                     <div class="radio-box">
-                        <input type="radio" id="productIsCombination-1" name="productIsCombination" value="1" checked>
-                        <label for="productIsCombination-1">否&nbsp;&nbsp;&nbsp;</label>
+                        <label for="productIsCombination-1">
+                            <input type="radio" id="productIsCombination-1" name="productIsCombination" value="1" checked>否&nbsp;&nbsp;&nbsp;
+                        </label>
                     </div>
                     <div class="radio-box">
-                        <input type="radio" id="productIsCombination-2" name="productIsCombination" value="2">
-                        <label for="productIsCombination-2">是</label>
+                        <label for="productIsCombination-2">
+                            <input type="radio" id="productIsCombination-2" name="productIsCombination" value="2">是
+                        </label>
                     </div>
                 </div>
 
                 <label class="form-label col-1 col-sm-1 productIsSplit_class" style="display: none"><span class="c-red">*</span>录入是否拆分:</label>
                 <div class="formControls col-4 col-sm-4 productIsSplit_class" style="display: none">
                     <div class="radio-box">
-                        <input type="radio" id="productIsSplit-1" name="productIsSplit" value="1" >
-                        <label for="productIsSplit-1">需要</label>
+                        <label for="productIsSplit-1">
+                            <input type="radio" id="productIsSplit-1" name="productIsSplit" value="1" checked>需要
+                        </label>
                     </div>
                     <div class="radio-box">
-                        <input type="radio" id="productIsSplit-2" name="productIsSplit" value="2" checked>
-                        <label for="productIsSplit-2">不需要</label>
+                        <label for="productIsSplit-2">
+                            <input type="radio" id="productIsSplit-2" name="productIsSplit" value="2">不需要
+                        </label>
                     </div>
                 </div>
             </div>
@@ -152,7 +153,7 @@
                 <label class="form-label col-1 col-sm-1"></label>
                 <div class="formControls col-10 col-sm-10">
                     <input type="button" style="color: #32a3d8;border: 1px solid #32a3d8;" class="btn add-order-button" onclick="add_product()" value="选择组合产品" >
-                    <table class="table table-border table-bordered table-bg table-hover table-sort" style="margin-top: 10px;display: none" id="all_add_product">
+                    <table class="table table-bordered table-bg table-hover table-sort" style="margin-top: 10px;display: none" id="all_add_product">
                         <thead>
                         <tr class="text-c" id="table1">
                             <th style="text-align: center;" width="40" >产品名称</th>
@@ -170,7 +171,7 @@
                 <br>
             </div>
 
-            <div class="row cl">
+            <div class="row cl is_yulia_hide">
                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>使用区域:</label>
                 <div class="formControls col-9 col-sm-9 skin-minimal" >
                     <div class="radio-box">
@@ -235,7 +236,7 @@
                 </div>
             </div>
 
-            <div id="addColorHtml" style="display: none">
+            <div id="addColorHtml" style="padding-bottom: 15px;margin-left: 4%;padding-top: 10px;width: 88%;background-color: #e2e2e2;display: none">
                 <input type="hidden" class="colorId" value="">
                 <div class="row cl" id="" style="">
                     <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>颜色名称:</label>
@@ -264,8 +265,8 @@
                     <div class="formControls col-2 col-sm-2">
                         <input type="text" class="input-text add_color str colorBar" value="" placeholder="69码" id="" name="" myMinlength="1"  myMaxlength="20" errormsg="69码必填,只能填写1-20个字符!" >
                     </div>
-                    <label class="form-label col-1 col-sm-1">京东SKU:</label>
-                    <div class="formControls col-2 col-sm-2">
+                    <label class="form-label col-1 col-sm-1 is_yulia_hide">京东SKU:</label>
+                    <div class="formControls col-2 col-sm-2 is_yulia_hide">
                         <input type="text" class="input-text add_color str colorJdProductId" value="" placeholder="京东SKU" id="" name="" myMaxlength="20"  errormsg="京东SKU非必填,可填写1-20个字符!">
                     </div>
                 </div>
@@ -288,47 +289,55 @@
                         <div class="download_file"><a href="javascript:void(0)" class="del_product all_down" onclick="fileOnclick(this)">上传图片</a></div>
                         <input type="hidden" class="add_color str colorPicture " name="" id="" value="" >
                     </div>
-                    <label class="form-label col-1 col-sm-1">添加库存:</label>
-                    <div class="formControls col-2 col-sm-2">
+                    <label class="form-label col-1 col-sm-1 is_yulia_hide">添加库存:</label>
+                    <div class="formControls col-2 col-sm-2 is_yulia_hide">
                         <input type="text" class="input-text add_color str colorInventory" value="10000" placeholder="库存" id="" name=""  myMaxlength="10"  errormsg="库存非必填,可填写1-10个字符!">
                     </div>
                 </div>
 
-                <div class="row cl" id="" style="">
+                <div class="row cl is_yulia_hide">
                     <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>是否为水机:</label>
                     <div class="formControls col-2 col-sm-2 skin-minimal">
                         <div class="radio-box">
-                            <input type="radio" class="colorIsMachine" id="colorIsMachine-1" name="colorIsMachine" value="1" >
-                            <label for="colorIsMachine-1">水机</label>
+                            <label for="colorIsMachine-1">
+                                <input type="radio" class="colorIsMachine" id="colorIsMachine-1" name="colorIsMachine" value="1" checked>水机
+                            </label>
                         </div>
                         <div class="radio-box">
-                            <input type="radio" class="colorNoMachine" id="colorIsMachine-2" name="colorIsMachine" value="2" checked>
-                            <label for="colorIsMachine-2">其他</label>
+                            <label for="colorIsMachine-2">
+                                <input type="radio" class="colorNoMachine" id="colorIsMachine-2" name="colorIsMachine" value="2">其他
+                            </label>
                         </div>
                     </div>
 
                     <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>发货渠道:</label>
-                    <div class="formControls col-2 col-sm-2 skin-minimal">
+                    <div class="formControls col-2 col-sm-2 skin-minimal" style="width: 20%;">
                         <div class="radio-box">
-                            <input type="radio" class="colorIsJdAuto" id="colorIsJdAuto-1" name="colorIsJdAuto" value="1" >
-                            <label for="colorIsJdAuto-1">京东仓</label>
+                            <label for="colorIsJdAuto-1">
+                                <input type="radio" class="colorIsJdAuto" id="colorIsJdAuto-1" name="colorIsJdAuto" value="1" >京东仓
+                            </label>
                         </div>
                         <div class="radio-box">
-                            <input type="radio" class="colorNoJdAuto" id="colorIsJdAuto-2" name="colorIsJdAuto" value="2" checked>
-                            <label for="colorIsJdAuto-2">优尼雅</label>
+                            <label for="colorIsJdAuto-2">
+                                <input type="radio" class="colorNoJdAuto" id="colorIsJdAuto-2" name="colorIsJdAuto" value="2" checked>优尼雅
+                            </label>
                         </div>
                     </div>
                 </div>
+
                 <div class="row cl" id="" style="">
                     <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>状态:</label>
                     <div class="formControls col-5 col-sm-5 skin-minimal">
                         <div class="radio-box">
-                            <input type="radio" class="colorIsStatus" id="colorStatus-1" name="colorStatus" value="1" checked>
-                            <label for="colorStatus-1">使用</label>
+                            <label for="colorStatus-1">
+                                <input type="radio" class="colorIsStatus" id="colorStatus-1" name="colorStatus" value="1" checked>使用
+                            </label>
                         </div>
                         <div class="radio-box">
-                            <input type="radio" class="colorNoStatus" id="colorStatus-2" name="colorStatus" value="2" >
-                            <label for="colorStatus-2">停用</label>
+
+                            <label for="colorStatus-2">
+                                <input type="radio" class="colorNoStatus" id="colorStatus-2" name="colorStatus" value="2" >停用
+                            </label>
                         </div>
                     </div>
                 </div>
@@ -361,7 +370,7 @@
 
             <input type="hidden" id="colorListJson" name="colorListJson" value="" >
             <input type="hidden" id="productAreaRelaStr" name="productAreaRelaStr" value="" >
-
+            <span style="margin-left: 17%;"><strong>提示:首次录入,需要告知和您对接的业务员,由业务员审核和绑定信息</strong></span>
             <div class="row cl" style="margin-bottom: 20px">
                 <div class="col-2 col-sm-2 col-offset-3">
                     <button class="btn btn-block btn-primary size-XL" type="submit">确认录入</button>
@@ -379,6 +388,13 @@
 <script type="text/javascript" src="${path}/common/lib/jquery/1.9.1/ajaxfileupload.js"></script>
 
 <script type="text/javascript">
+    $(function() {
+       let isYulia = ${(isYulia)?string("true", "false")};
+       if (isYulia) {
+           $(".is_yulia_hide").hide();
+       }
+    });
+
     $('.skin-minimal input').iCheck({
         checkboxClass: 'icheckbox-blue',
         radioClass: 'iradio-blue',

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

@@ -8,7 +8,9 @@
     <meta http-equiv="Cache-Control" content="no-siteapp" />
     <link rel="Bookmark" href="/favicon.ico" >
     <link rel="Shortcut Icon" href="/favicon.ico" />
-<#include "/base/list_base.ftl">
+    <#include "/base/list_base.ftl">
+    <!-- 新增需求引入js、css -->
+    <link href="${path}/common/lib/bootstrap/bootstrap.min.css" rel="stylesheet" />
     <title>订单批次列表</title>
     <style>
         html{-webkit-text-size-adjust:none;}
@@ -24,27 +26,22 @@
     </style>
 </head>
 <body>
-<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
-    <span class="c-gray en">/</span> 订单管理
-    <span class="c-gray en">/</span> 产品列表
-    <a class="btn radius r" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
-</nav>
 <div class="page-container">
     <div class="text-c">
         <form action="${path}/admin/product/product_page" method="post">
 
             <div style="position: relative;float: left;display: block;width: 110px;height: 30px;" id="addOrderDiv" >
-                <button type="button" style="cursor:pointer" class="my-btn-search my-order" id="addProduct" onclick="to_add()" >添加产品</button>
+                <button type="button" style="cursor:pointer" class="my-btn-search my-order btn" id="addProduct" onclick="to_add()" >添加产品</button>
             </div>
 
-            <select class="my-select" name="productType" id="productType" style="height: 36px;width: 132px;margin: 0px;padding: 12px 10px 6px 15px;margin-bottom: 10px;">
+            <select class="select" name="productType" id="productType" style="height: 31px;width: 120px;margin: 0px;margin-bottom: 10px;">
                 <option value="">产品分类</option>
                 <#list productTypeList as productType>
                     <option value="${productType.typeId}"  <#if product.productType??><#if product.productType == productType.typeId >selected="selected"</#if></#if> >${productType.typeName}</option>
                 </#list>
             </select>
 
-            <select class="my-select" name="productStatus" id="productStatus" style="height: 36px;width: 132px;margin: 0px;padding: 12px 10px 6px 15px;margin-bottom: 10px;">
+            <select class="select" name="productStatus" id="productStatus" style="height: 31px;width: 120px;margin: 0px;margin-bottom: 10px;">
                 <option value="">状态</option>
                 <option value="1" <#if product.productStatus??><#if product.productStatus == 1 >selected="selected"</#if></#if>>使用</option>
                 <option value="2" <#if product.productStatus??><#if product.productStatus == 2 >selected="selected"</#if></#if>>禁用</option>
@@ -54,13 +51,13 @@
             <input type="text" class="my-input trim_input"  style="width:120px;margin-right: 0px; margin-bottom: 8px;" value="${product.colorName!}" placeholder="颜色名称" id="colorName" name="colorName">
             <input type="text" class="my-input trim_input"  style="width:120px;margin-right: 0px; margin-bottom: 8px;" value="${product.colorBar!}" placeholder="69码" id="colorBar" name="colorBar">
 
-            <button type="submit" class="btn" style="background: #50a2ea;border: 1px solid #50a2ea;color: #fff;height: 35px;margin-top: -8px;"><i class="Hui-iconfont">&#xe665;</i> 查询</button>
+            <button type="submit" class="btn" style="background: #50a2ea;border: 1px solid #50a2ea;color: #fff;height: 31px;margin-top: -8px;"><i class="Hui-iconfont">&#xe665;</i> 查询</button>
 
         </form>
     </div>
 
     <div class="mt-20">
-        <table class="table table-border table-bordered table-bg table-hover table-sort">
+        <table class="table table-bordered table-bg table-hover table-sort">
             <thead>
                 <tr class="text-c">
                     <th width="50">类型</th>

+ 39 - 42
watero-rst-web/src/main/webapp/WEB-INF/views/product/update_product.ftl

@@ -4,10 +4,11 @@
     <meta charset="utf-8">
     <meta name="renderer" content="webkit|ie-comp|ie-stand">
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
-    <meta name="viewport"
-          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
+    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
     <meta http-equiv="Cache-Control" content="no-siteapp"/>
-<#include "/base/add_base.ftl">
+    <#include "/base/add_base.ftl">
+    <!-- 新增需求引入js、css -->
+    <link href="${path}/common/lib/bootstrap/bootstrap.min.css" rel="stylesheet" />
 
     <style>
         .tit{position: relative;text-align: left;font-size: 16px;padding-left: 10px;}
@@ -42,18 +43,11 @@
     <title>添加产品 - 产品管理 - RST</title>
 </head>
 <body>
-<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
-    <span class="c-gray en">/</span> 产品管理
-    <span class="c-gray en">/</span> 添加产品
-    <a class="btn radius r"
-       href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
-    <a class="btn radius r"
-       href="javascript:history.back(-1);" title="后退"><i class="Hui-iconfont">&#xe6d4;</i></a>
-</nav>
+
 <article class="page-container" style="padding: 10px;">
     <div class="pd-20 cl">
         <form action="${path}/admin/product/update_product" method="post" class="form form-horizontal" id="form-order-add"  onkeydown="if(event.keyCode==13)return false;">
-
+            <input type="hidden" id="productId" name="productId" value="${product.productId!''}">
             <div class="row cl">
                 <label class="form-label col-3">
                     <div class="tit-2">产品基本信息</div>
@@ -62,52 +56,49 @@
                 </div>
             </div>
 
-            <input type="hidden" id="productId" name="productId" value="${product.productId!''}">
+            <div class="row cl">
+                <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>所属公司:</label>
+                <div class="formControls col-2 col-sm-2" style="">
+                    <select class="select" id="companyId" name="companyId" >
+                        <#if companyList??>
+                            <#list companyList as c>
+                                <option value="${c.companyId}" <#if product.companyId == c.companyId>selected</#if>>${c.companyName}</option>
+                            </#list>
+                        </#if>
+                    </select>
+                </div>
+            </div>
 
             <div class="row cl" id="" style="">
                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>产品名称:</label>
                 <div class="formControls col-2 col-sm-2">
-                    <input type="text" class="input-text" value="${product.productName!''}" placeholder="填写产品名称" id="productName" name="productName" datatype="*1-32" errormsg="产品名称格式只支持1-32个字符!" >
+                    <input type="text" style="height: 31px;" class="input-text" value="${product.productName!''}" placeholder="填写产品名称" id="productName" name="productName" datatype="*1-32" errormsg="产品名称格式只支持1-32个字符!" >
                 </div>
                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>产品简称:</label>
                 <div class="formControls col-2 col-sm-2">
-                    <input type="text" class="input-text" value="${product.productAbbreviation!''}" placeholder="填写产品简称" id="productAbbreviation" name="productAbbreviation" datatype="*1-17" errormsg="产品简称格式只支持1-17个字符!">
+                    <input type="text" style="height: 31px;" class="input-text" value="${product.productAbbreviation!''}" placeholder="填写产品简称" id="productAbbreviation" name="productAbbreviation" datatype="*1-17" errormsg="产品简称格式只支持1-17个字符!">
                 </div>
             </div>
 
             <div class="row cl">
                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>产品类型:</label>
                 <div class="formControls col-2 col-sm-2" style="">
-                    <span class="select-box">
-                        <select class="select" id="productType" name="productType" >
+                    <select class="select" id="productType" name="productType" >
                         <#if productTypeList??>
                             <#list productTypeList as productType>
                                 <option value="${productType.typeId}" <#if product.productType == productType.typeId>selected</#if>>${productType.typeName}</option>
                             </#list>
                         </#if>
-                        </select>
-				    </span>
+                    </select>
                 </div>
 
                 <label class="form-label col-1 col-sm-1">产品型号:</label>
                 <div class="formControls col-2 col-sm-2">
-                    <input type="text" class="input-text" value="${product.productNumber!''}" placeholder="填写产品型号" id="productNumber" name="productNumber" datatype="*0-15" errormsg="产品型号格式不正确!">
+                    <input type="text" style="height: 31px;" class="input-text" value="${product.productNumber!''}" placeholder="填写产品型号" id="productNumber" name="productNumber" datatype="*0-15" errormsg="产品型号格式不正确!">
                 </div>
             </div>
 
-            <div class="row cl">
-              <#--  <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>可批发:</label>
-                <div class="formControls col-2 col-sm-2 skin-minimal">
-                    <div class="radio-box">
-                        <input type="radio" id="productWholesale-1" name="productWholesale" value="1" <#if product.productWholesale ==1 >checked</#if>>
-                        <label for="productWholesale-1">可批发</label>
-                    </div>
-                    <div class="radio-box">
-                        <input type="radio" id="productWholesale-2" name="productWholesale" value="2" <#if product.productWholesale ==2 >checked</#if>>
-                        <label for="productWholesale-2">不可批发</label>
-                    </div>
-                </div>-->
-
+            <div class="row cl is_yulia_hide">
                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>售后检测:</label>
                 <div class="formControls col-2 col-sm-4">
                     <div class="radio-box">
@@ -121,8 +112,7 @@
                 </div>
             </div>
 
-            <div class="row cl">
-
+            <div class="row cl is_yulia_hide">
                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>是否组合产品:</label>
                 <div class="formControls col-2 col-sm-4">
                     <div class="radio-box">
@@ -183,7 +173,7 @@
                 <br>
             </div>
 
-            <div class="row cl">
+            <div class="row cl is_yulia_hide">
                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>使用区域:</label>
                 <div class="formControls col-9 col-sm-9 skin-minimal" >
                     <div class="radio-box">
@@ -286,7 +276,7 @@
                 </div>
             </div>
 
-            <div id="addColorHtml" style="display: none">
+            <div id="addColorHtml" style="padding-bottom: 15px;margin-left: 4%;padding-top: 10px;width: 88%;background-color: #e2e2e2;display: none">
                 <input type="hidden" class="colorId" value="">
                 <div class="row cl" id="" style="">
                     <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>颜色名称:</label>
@@ -315,8 +305,8 @@
                     <div class="formControls col-2 col-sm-2">
                         <input type="text" class="input-text add_color str colorBar" value="" placeholder="69码" id="" name="" myMinlength="1"  myMaxlength="20" errormsg="69码必填,只能填写1-20个字符!" >
                     </div>
-                    <label class="form-label col-1 col-sm-1">京东SKU:</label>
-                    <div class="formControls col-2 col-sm-2">
+                    <label class="form-label col-1 col-sm-1 is_yulia_hide">京东SKU:</label>
+                    <div class="formControls col-2 col-sm-2 is_yulia_hide">
                         <input type="text" class="input-text add_color str colorJdProductId" value="" placeholder="京东SKU" id="" name="" myMaxlength="20"  errormsg="京东SKU非必填,可填写1-20个字符!">
                     </div>
                 </div>
@@ -340,14 +330,14 @@
                         <input type="hidden" class="add_color str colorPicture " name="" id="" value="" >
                     </div>
                     <div id="colorInventoryDiv">
-                    <label class="form-label col-1 col-sm-1">添加库存:</label>
-                    <div class="formControls col-2 col-sm-2">
+                    <label class="form-label col-1 col-sm-1 is_yulia_hide">添加库存:</label>
+                    <div class="formControls col-2 col-sm-2 is_yulia_hide">
                         <input type="text" class="input-text add_color str colorInventory" value="" placeholder="库存" id="" name=""  myMaxlength="10"  errormsg="库存非必填,可填写1-10个字符!">
                     </div>
                     </div>
                 </div>
 
-                <div class="row cl" id="" style="">
+                <div class="row cl is_yulia_hide">
                     <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>是否为水机:</label>
                     <div class="formControls col-2 col-sm-2 skin-minimal">
                         <div class="radio-box">
@@ -430,6 +420,13 @@
 <script type="text/javascript" src="${path}/common/lib/jquery/1.9.1/ajaxfileupload.js"></script>
 
 <script type="text/javascript">
+    $(function() {
+        let isYulia = ${(isYulia)?string("true", "false")};
+        if (isYulia) {
+            $(".is_yulia_hide").hide();
+        }
+    });
+
     $('.skin-minimal input').iCheck({
         checkboxClass: 'icheckbox-blue',
         radioClass: 'iradio-blue',

+ 13 - 1
watero-rst-web/src/main/webapp/WEB-INF/views/yulia/add.ftl

@@ -37,6 +37,7 @@
             <div class="formControls col-9 col-sm-9">
                 <input style="height: 31px;width: 70%" type="text" class="input-text" placeholder="请输入机器条码 或 点击上传条码(系统自动识别)" id="machineNo" name="machineNo">
                 <span style="height: 31px;width: 29%" class="btn" id="upload-barcode-btn">上传条码图片</span>
+                <p id="machine-other-p" style="font-size: 10px;color: #656161;margin-top: 5px;"></p>
             </div>
         </div>
 
@@ -118,6 +119,9 @@
                 <button type="button" class="btn btn-primary radius" onclick="add();">确认提交</button>
             </div>
         </div>
+
+        <input type="hidden" id="detectProduction" name="detectProduction">
+        <input type="hidden" id="detectFuselageBarcode" name="detectFuselageBarcode">
     </form>
 </div>
 <script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
@@ -152,6 +156,8 @@
                             setProduct(data);
                             $("#machineNo").val(data.returnMsg.machineNo);
                         } else {
+                            $("#detectProduction").val("");
+                            $("#detectFuselageBarcode").val("");
                             $("#productId").empty();
                             $("#productColorId").empty();
                             layer.msg('产品条码不存在,请重新输入!',{icon: 5,time:1000});
@@ -220,6 +226,11 @@
 
     /** 设置产品 */
     function setProduct(data) {
+        // 设置生产批次和生产日期
+        $("#machine-other-p").html("生产批次:" + data.returnMsg.batchNO + ",生产日期:" + data.returnMsg.ctrDate);
+        $("#detectProduction").val(data.returnMsg.ctrDate);
+        $("#detectFuselageBarcode").val(data.returnMsg.machineNo);
+        // 设置产品信息
         let product = data.returnMsg.product;
         let $productId = $("#productId");
         $productId.empty();
@@ -253,6 +264,7 @@
         $.ajax({
             cache: true,
             type: "POST",
+            data: {"procTypeIsShow":2},
             url: "${path}/admin/proc/type",
             async: false,
             success: function(data){
@@ -283,7 +295,7 @@
         $.ajax({
             cache: true,
             type: "POST",
-            data: {"procTypeId":procTypeId},
+            data: {"procTypeId":procTypeId,"procMethodIsShow":2},
             url: "${path}/admin/proc/method",
             async: false,
             success: function(data){

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

@@ -380,7 +380,7 @@ function colorClear() {
     $("#upload_color_img").change(function() {
         fileUpload("upload_color_img");
     });
-    $(".colorNoMachine").iCheck('check');
+    $(".colorIsMachine").iCheck('check');
     $(".colorIsStatus").iCheck('check');
     $(".colorInventory").val(10000);
 }