瀏覽代碼

商品列表更改筛选框/收款二级分类

zhijiezhao 2 年之前
父節點
當前提交
111b4306b9

+ 3 - 0
src/main/java/com/caimei/modules/newhome/dao/NewPageHomeimageDao.java

@@ -3,6 +3,7 @@ package com.caimei.modules.newhome.dao;
 import com.thinkgem.jeesite.common.persistence.CrudDao;
 import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
 import com.caimei.modules.newhome.entity.NewPageHomeimage;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * 新首页轮播图DAO接口
@@ -13,4 +14,6 @@ import com.caimei.modules.newhome.entity.NewPageHomeimage;
 public interface NewPageHomeimageDao extends CrudDao<NewPageHomeimage> {
 
     void updateStatusByIds(NewPageHomeimage newPageHomeimage);
+
+    void updateSort(@Param("id") String id, @Param("sort") String sort);
 }

+ 72 - 55
src/main/java/com/caimei/modules/newhome/service/NewPageHomeimageService.java

@@ -4,6 +4,7 @@ import java.util.List;
 
 import com.caimei.dfs.image.beens.ImageUploadInfo;
 import com.caimei.modules.common.utils.UploadUtils;
+import com.caimei.modules.consult.entity.type.CmConsulttype;
 import com.caimei.modules.miniprogram.entity.CmWxArticle;
 import com.caimei.modules.sys.utils.UploadImageUtils;
 import com.thinkgem.jeesite.common.config.Global;
@@ -22,71 +23,87 @@ import javax.servlet.http.HttpServletRequest;
 
 /**
  * 新首页轮播图Service
+ *
  * @author ye.qin
  * @version 2019-03-13
  */
 @Service
 @Transactional(readOnly = true)
 public class NewPageHomeimageService extends CrudService<NewPageHomeimageDao, NewPageHomeimage> {
-	@Autowired
-	private NewPageHomeimageDao newPageHomeimageDao;
+    @Autowired
+    private NewPageHomeimageDao newPageHomeimageDao;
 
-	public NewPageHomeimage get(String id) {
-		return super.get(id);
-	}
-	
-	public List<NewPageHomeimage> findList(NewPageHomeimage newPageHomeimage) {
-		return super.findList(newPageHomeimage);
-	}
-	
-	public Page<NewPageHomeimage> findPage(Page<NewPageHomeimage> page, NewPageHomeimage newPageHomeimage) {
-		page.setOrderBy("sort");
-		return super.findPage(page, newPageHomeimage);
-	}
-	
-	@Transactional(readOnly = false)
-	public void save(NewPageHomeimage newPageHomeimage,HttpServletRequest request) {
-		if(null != newPageHomeimage.getImage() && !"".equals(newPageHomeimage.getImage())){
-			String img = saveImageToServer(newPageHomeimage.getImage(),request);
-			newPageHomeimage.setImage(img);
-		}
-		if(null != newPageHomeimage.getCrmImage() && !"".equals(newPageHomeimage.getCrmImage())){
-			String img = saveImageToServer(newPageHomeimage.getCrmImage(),request);
-			newPageHomeimage.setCrmImage(img);
-		}
-		super.save(newPageHomeimage);
-	}
-	
-	@Transactional(readOnly = false)
-	public void delete(NewPageHomeimage newPageHomeimage) {
-		super.delete(newPageHomeimage);
-	}
+    public NewPageHomeimage get(String id) {
+        return super.get(id);
+    }
 
+    public List<NewPageHomeimage> findList(NewPageHomeimage newPageHomeimage) {
+        return super.findList(newPageHomeimage);
+    }
 
-	public String saveImageToServer(String imagesHead, HttpServletRequest request){
-		String photoServer = Global.getConfig("photoServer");//获取文件服务器地址
-		String res = "";
-		ImageUploadInfo saveImageSerivce=new ImageUploadInfo();
-		if(StringUtils.isNotBlank(imagesHead) && !imagesHead.startsWith("http:") && !imagesHead.startsWith("https:")){
-			imagesHead= Encodes.urlDecode(imagesHead);
+    public Page<NewPageHomeimage> findPage(Page<NewPageHomeimage> page, NewPageHomeimage newPageHomeimage) {
+        page.setOrderBy("sort");
+        return super.findPage(page, newPageHomeimage);
+    }
+
+    @Transactional(readOnly = false)
+    public void save(NewPageHomeimage newPageHomeimage, HttpServletRequest request) {
+        if (null != newPageHomeimage.getImage() && !"".equals(newPageHomeimage.getImage())) {
+            String img = saveImageToServer(newPageHomeimage.getImage(), request);
+            newPageHomeimage.setImage(img);
+        }
+        if (null != newPageHomeimage.getCrmImage() && !"".equals(newPageHomeimage.getCrmImage())) {
+            String img = saveImageToServer(newPageHomeimage.getCrmImage(), request);
+            newPageHomeimage.setCrmImage(img);
+        }
+        super.save(newPageHomeimage);
+    }
+
+    @Transactional(readOnly = false)
+    public void delete(NewPageHomeimage newPageHomeimage) {
+        super.delete(newPageHomeimage);
+    }
+
+
+    public String saveImageToServer(String imagesHead, HttpServletRequest request) {
+        String photoServer = Global.getConfig("photoServer");//获取文件服务器地址
+        String res = "";
+        ImageUploadInfo saveImageSerivce = new ImageUploadInfo();
+        if (StringUtils.isNotBlank(imagesHead) && !imagesHead.startsWith("http:") && !imagesHead.startsWith("https:")) {
+            imagesHead = Encodes.urlDecode(imagesHead);
 //			String realPath = request.getSession().getServletContext().getRealPath(imagesHead);
             String realPath = UploadImageUtils.getAbsolutePath(imagesHead);
-			//			realPath=Encodes.urlDecode(realPath);
-			int pointerIndex = realPath.lastIndexOf(".");
-			try {
-				saveImageSerivce = UploadUtils.saveImageSerivce(realPath, pointerIndex,realPath);
-				res = photoServer+saveImageSerivce.getSource();
-			} catch (Exception e) {
-				logger.error("图片上传错误:"+e.toString(),e);
-			}
-		}else{
-			res = imagesHead;
-		}
-		return res;
-	}
+            //			realPath=Encodes.urlDecode(realPath);
+            int pointerIndex = realPath.lastIndexOf(".");
+            try {
+                saveImageSerivce = UploadUtils.saveImageSerivce(realPath, pointerIndex, realPath);
+                res = photoServer + saveImageSerivce.getSource();
+            } catch (Exception e) {
+                logger.error("图片上传错误:" + e.toString(), e);
+            }
+        } else {
+            res = imagesHead;
+        }
+        return res;
+    }
+
+    @Transactional(readOnly = false)
+    public void updateStatusByIds(NewPageHomeimage newPageHomeimage) {
+        newPageHomeimageDao.updateStatusByIds(newPageHomeimage);
+    }
 
-	@Transactional(readOnly = false)
-	public void updateStatusByIds(NewPageHomeimage newPageHomeimage) {
-		newPageHomeimageDao.updateStatusByIds(newPageHomeimage);
-	}
+    @Transactional(readOnly = false)
+    public void updateSorts(String sortNums) {
+        if (sortNums.contains(",")) {
+            String[] sortNum = sortNums.split(",");
+            for (String s : sortNum) {
+                String[] s1 = s.split("_");
+                if (2 == s1.length) {
+                    String id=s1[0];
+                    String sort=s1[1];
+                    newPageHomeimageDao.updateSort(id,sort);
+                }
+            }
+        }
+    }
 }

+ 9 - 0
src/main/java/com/caimei/modules/newhome/web/NewPageHomeimageController.java

@@ -5,6 +5,7 @@ import com.caimei.modules.newhome.entity.NewPageHomeimage;
 import com.caimei.modules.newhome.service.NewPageHomeimageService;
 import com.caimei.modules.opensearch.GenerateUtils;
 import com.caimei.redis.RedisService;
+import com.caimei.vo.JsonModel;
 import com.google.common.collect.Maps;
 import com.thinkgem.jeesite.common.config.Global;
 import com.thinkgem.jeesite.common.persistence.Page;
@@ -66,6 +67,14 @@ public class NewPageHomeimageController extends BaseController {
         return "modules/newhome/newPageHomeimageForm";
     }
 
+    @RequestMapping(value = "updateSort")
+    @ResponseBody
+    public JsonModel updateSort(String sortNums) {
+        JsonModel jsonMode = JsonModel.newInstance();
+        newPageHomeimageService.updateSorts(sortNums);
+        return jsonMode.success("批量更新排序成功");
+    }
+
     @RequiresPermissions("newhome:newPageHomeimage:edit")
     @RequestMapping(value = "save")
     public String save(NewPageHomeimage newPageHomeimage, Model model, RedirectAttributes redirectAttributes, HttpServletRequest request) {

+ 9 - 0
src/main/java/com/caimei/modules/product/entity/Product.java

@@ -15,6 +15,7 @@ public class Product extends DataEntity<Product> {
     private String name;
     private String shopName;//供应商名称
     private String validFlag; //0暂存中 1待审核 2已上架 3已下架 8 审核不通过 9已冻结
+    private String[] validFlagString; //0暂存中 1待审核 2已上架 3已下架 8 审核不通过 9已冻结
     private Integer preferredFlag; //新品上线(001) 优惠商品(010) 常用商品(100),三者同时存在111
     private String displayOnCRMFlag; //是否在crm可以被搜索到 1是 0否
     private Integer productID;        // productIDprice1
@@ -277,6 +278,14 @@ public class Product extends DataEntity<Product> {
      */
     public String qualificationLink;
 
+    public String[] getValidFlagString() {
+        return validFlagString;
+    }
+
+    public void setValidFlagString(String[] validFlagString) {
+        this.validFlagString = validFlagString;
+    }
+
     public String getQualificationNo() {
         return qualificationNo;
     }

+ 21 - 16
src/main/java/com/caimei/modules/product/web/ProductNewController.java

@@ -100,7 +100,7 @@ public class ProductNewController extends BaseController {
     @RequiresPermissions("product:product:view")
     @RequestMapping(value = {"list", ""})
     public String list(Product product, HttpServletRequest request, HttpServletResponse response, Model model) {
-      Product pro=product;
+        Product pro = product;
         String id = product.getId();
         if (StringUtils.isEmpty(id)) {
             String shopName = product.getSearchShopName();
@@ -136,8 +136,12 @@ public class ProductNewController extends BaseController {
             if (null != searchTinyTypeID) {
                 product.setTinyTypeID(searchTinyTypeID);
             }
-            if (StringUtils.isNotEmpty(searchValidFlag)) {
-                product.setValidFlag(searchValidFlag);
+            if (StringUtils.isNotEmpty(searchValidFlag) && !"on".equals(searchValidFlag)) {
+                if(searchValidFlag.contains("7")){
+                    searchValidFlag=searchValidFlag.replace("7","10");
+                }
+                String[] split = searchValidFlag.split(",");
+                product.setValidFlagString(split);
             }
             if (StringUtils.isNotEmpty(searchActStatus)) {
                 product.setActStatus(searchActStatus);
@@ -232,12 +236,12 @@ public class ProductNewController extends BaseController {
         model.addAttribute("searchBigTypeID", product.getBigTypeID());
         model.addAttribute("searchSmallTypeID", product.getSmallTypeID());
         model.addAttribute("searchTinyTypeID", product.getTinyTypeID());
-        model.addAttribute("searchValidFlag", product.getValidFlag());
         model.addAttribute("searchActStatus", product.getActStatus());
         model.addAttribute("searchProductType", product.getProductType());
         model.addAttribute("searchBrandID", product.getBrandID());
         model.addAttribute("searchPreferredFlag", product.getPreferredFlag());
         model.addAttribute("searchProductCategory", product.getProductCategory());
+        model.addAttribute("searchValidFlag", product.getSearchValidFlag());
         if (StringUtils.isNotEmpty(id)) {
             // 单个商品搜索
             model.addAttribute("editFlag", "1");
@@ -379,7 +383,7 @@ public class ProductNewController extends BaseController {
             product.setSupplierTaxPoint(product.getTaxPoint());
         }
         List<SplitCode> splitCodeList = productNewDao.findSplitCode(product.getShopID());
-        model.addAttribute("splitCodeList",splitCodeList);
+        model.addAttribute("splitCodeList", splitCodeList);
         model.addAttribute("combinationList", combinationList);
         model.addAttribute("brandList", brandList);
         model.addAttribute("shopList", shopList);
@@ -452,10 +456,10 @@ public class ProductNewController extends BaseController {
     @RequestMapping(value = "productSave")
     public String productSave(Product product, ProductDetailInfo productDetailInfo, RedirectAttributes redirectAttributes) {
 
-       if("2".equals(product.getProductType())){
-           product.setVisibility("4");
-           product.setPriceFlag("3");
-       }
+        if ("2".equals(product.getProductType())) {
+            product.setVisibility("4");
+            product.setPriceFlag("3");
+        }
         // 组合搜索关键词
         List<String> searchKeyList = product.getSearchKeyList();
         String searchKeyStr = "";
@@ -853,7 +857,7 @@ public class ProductNewController extends BaseController {
 
     @RequestMapping("auditProduct")
     @ResponseBody
-    public Map<String, Object> auditProduct(String validFlag,Integer newvalidFlag,String showtime, Integer productID, String remarks) {
+    public Map<String, Object> auditProduct(String validFlag, Integer newvalidFlag, String showtime, Integer productID, String remarks) {
         Map<String, Object> map = Maps.newLinkedHashMap();
         try {
             if (StringUtils.isBlank(validFlag) || null == productID) {
@@ -886,7 +890,7 @@ public class ProductNewController extends BaseController {
                 }
             }
 
-            productNewService.auditProduct(validFlag,newvalidFlag,showtime, beforeValidFlag, productID);
+            productNewService.auditProduct(validFlag, newvalidFlag, showtime, beforeValidFlag, productID);
 
             map.put("success", true);
             map.put("msg", "操作成功");
@@ -922,7 +926,7 @@ public class ProductNewController extends BaseController {
             if (null == validFlag || "".equals(validFlag) || null == productID) {
                 throw new Exception("参数错误!");
             }
-            productNewService.auditProduct(validFlag,null,null,null, productID);
+            productNewService.auditProduct(validFlag, null, null, null, productID);
             map.put("success", true);
             map.put("msg", "操作成功");
             // 更新二手商品上架信息
@@ -980,7 +984,7 @@ public class ProductNewController extends BaseController {
 
             }
             // 更新商品库上下架状态
-            productNewService.auditProduct(validFlag,null, null,null, productId);
+            productNewService.auditProduct(validFlag, null, null, null, productId);
             map.put("success", true);
             cleanRedisCache();
         } catch (Exception e) {
@@ -1114,18 +1118,19 @@ public class ProductNewController extends BaseController {
      */
     @RequestMapping("/hehe/move")
     @ResponseBody
-    public String moveHeheProducts(){
+    public String moveHeheProducts() {
         productNewService.moveHeheProducts();
         return "success";
     }
 
     /**
      * 补充数据
+     *
      * @return
      */
     @RequestMapping("/hehe/data/add")
     @ResponseBody
-    public String addProductData(){
+    public String addProductData() {
         productNewService.addProductData();
         return "success";
     }
@@ -1135,7 +1140,7 @@ public class ProductNewController extends BaseController {
      */
     @RequestMapping("/hehe/back")
     @ResponseBody
-    public String backHeheProducts(){
+    public String backHeheProducts() {
         productNewService.backHeheProducts();
         return "success";
     }

+ 5 - 7
src/main/resources/mappings/modules/newhome/NewPageHomeimageMapper.xml

@@ -52,13 +52,7 @@
 				AND a.crmEnabledStatus = 	#{crmEnabledStatus}
 			</if>
 		</where>
-		<choose>
-			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
-				ORDER BY ${page.orderBy},a.createDate desc
-			</when>
-			<otherwise>
-			</otherwise>
-		</choose>
+			ORDER BY a.sort desc,a.createDate desc
 	</select>
 	
 	<select id="findAllList" resultType="NewPageHomeimage">
@@ -152,4 +146,8 @@
 			#{id}
 		</foreach>
 	</update>
+	<update id="updateSort">
+		update new_page_homeimage set sort=#{sort}
+		where id= #{id}
+	</update>
 </mapper>

+ 5 - 2
src/main/resources/mappings/modules/product/ProductNewMapper.xml

@@ -207,8 +207,11 @@
                 <if test="dbName == 'mssql'">'%'+#{shopName}+'%'</if>
                 <if test="dbName == 'mysql'">concat('%',#{shopName},'%')</if>
             </if>
-            <if test="validFlag !=null and validFlag !=''">
-                AND a.validFlag=#{validFlag}
+            <if test="validFlagString !=null and validFlagString !=''">
+                AND a.validFlag in
+                <foreach collection="validFlagString" separator="," item="valid" open="(" close=")">
+                    #{valid}
+                </foreach>
             </if>
             <if test="actFlag !=null and actFlag !=''">
                 AND a.actFlag=#{actFlag}

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/newhome/newPageHomeimageForm.jsp

@@ -93,7 +93,7 @@
 		<div class="control-group">
 			<label class="control-label"><span class="help-inline"><font color="red">*</font> </span>排序:</label>
 			<div class="controls">
-				<form:input path="sort" htmlEscape="false" maxlength="9" class="input-xlarge required digits" value="${empty newPageHomeimage.sort?0:(newPageHomeimage.sort) }"/>
+				<form:input path="sort" htmlEscape="false" maxlength="9" class="input-xlarge required digits" value="${empty newPageHomeimage.sort?1:(newPageHomeimage.sort+1) }"/>
 			</div>
 		</div>
 		<div class="control-group crmstatus" style="" >

+ 184 - 126
src/main/webapp/WEB-INF/views/modules/newhome/newPageHomeimageList.jsp

@@ -1,156 +1,214 @@
 <%@ page contentType="text/html;charset=UTF-8" %>
-<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
+<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
 <html>
 <head>
-	<title>新首页轮播图管理</title>
-	<meta name="decorator" content="default"/>
-	<style type="text/css">
-		.table th{text-align: center;}
-		.table td{text-align: center;}
-	</style>
-	<script type="text/javascript">
-		$(document).ready(function() {
+    <title>新首页轮播图管理</title>
+    <meta name="decorator" content="default"/>
+    <style type="text/css">
+        .table th {
+            text-align: center;
+        }
+
+        .table td {
+            text-align: center;
+        }
+    </style>
+    <script type="text/javascript">
+        $(document).ready(function () {
+
+        });
+
+        var changeSortNumber = [];
+        function changeSort(id) {
+            changeSortNumber.push(id);
+            console.log("changeSortNumber------------>" + changeSortNumber);
+        }
 
-		});
-		function page(n,s){
-			$("#pageNo").val(n);
-			$("#pageSize").val(s);
-			$("#searchForm").submit();
-        	return false;
+        var changeSorts = "";
+        //批量保存排序
+        function updateSortIndex() {
+            for (let i = 0; i < changeSortNumber.length; i++) {
+                var id = changeSortNumber[i];
+                var sortNum = $("#sortNum" + id).val();
+                changeSorts += id + '_' + sortNum + ',';
+            }
+            $.post("${ctx}/newhome/newPageHomeimage/updateSort", {'sortNums': changeSorts}, function (result) {
+                $.jBox.tip(result.data, 'info');
+                setTimeout(function () {
+                    $("#searchForm").submit();
+                }, 500);
+            })
+            changeSortNumber = null;
+            changeSorts = null;
+        }
+
+        function page(n, s) {
+            $("#pageNo").val(n);
+            $("#pageSize").val(s);
+            $("#searchForm").submit();
+            return false;
         }
+
         //PC端状态修改
-        function updateEnabledStatus(status,ids){
-            var msg='确定开启?';
-            if('0'==status){
-                msg='确定停用?';
+        function updateEnabledStatus(status, ids) {
+            var msg = '确定开启?';
+            if ('0' == status) {
+                msg = '确定停用?';
             }
-            top.$.jBox.confirm(msg,'系统提示',function(v,h,f){
-                if(v=='ok'){
-                    $.post("${ctx}/newhome/newPageHomeimage/updateEnabledStatus",{'enabledStatus':status,'ids':ids}, function(data) {
-                        if(true==data.success){
+            top.$.jBox.confirm(msg, '系统提示', function (v, h, f) {
+                if (v == 'ok') {
+                    $.post("${ctx}/newhome/newPageHomeimage/updateEnabledStatus", {
+                        'enabledStatus': status,
+                        'ids': ids
+                    }, function (data) {
+                        if (true == data.success) {
                             $.jBox.tip(data.msg, 'info');
                         } else {
-                            $.jBox.tip(data.msg,'error');
+                            $.jBox.tip(data.msg, 'error');
                         }
                         $("#searchForm").submit();
-                    },"JSON");//这里返回的类型有:json,html,xml,text
+                    }, "JSON");//这里返回的类型有:json,html,xml,text
                 }
                 return;
-            },{buttonsFocus:1,persistent: true});
+            }, {buttonsFocus: 1, persistent: true});
         }
 
+        function onlynum(obj) {
+            obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
+        }
 
         //CRM端状态修改
-        function updateCrmEnabledStatusByIds(status,ids){
-            var msg='确定开启?';
-            if('0'==status){
-                msg='确定停用?';
+        function updateCrmEnabledStatusByIds(status, ids) {
+            var msg = '确定开启?';
+            if ('0' == status) {
+                msg = '确定停用?';
             }
-            top.$.jBox.confirm(msg,'系统提示',function(v,h,f){
-                if(v=='ok'){
-                    $.post("${ctx}/newhome/newPageHomeimage/updateCrmEnabledStatusByIds",{'crmEnabledStatus':status,'ids':ids}, function(data) {
-                        if(true==data.success){
+            top.$.jBox.confirm(msg, '系统提示', function (v, h, f) {
+                if (v == 'ok') {
+                    $.post("${ctx}/newhome/newPageHomeimage/updateCrmEnabledStatusByIds", {
+                        'crmEnabledStatus': status,
+                        'ids': ids
+                    }, function (data) {
+                        if (true == data.success) {
                             $.jBox.tip(data.msg, 'info');
                         } else {
-                            $.jBox.tip(data.msg,'error');
+                            $.jBox.tip(data.msg, 'error');
                         }
                         $("#searchForm").submit();
-                    },"JSON");//这里返回的类型有:json,html,xml,text
+                    }, "JSON");//这里返回的类型有:json,html,xml,text
                 }
                 return;
-            },{buttonsFocus:1,persistent: true});
+            }, {buttonsFocus: 1, persistent: true});
         }
-	</script>
+    </script>
 </head>
 <body>
-	<ul class="nav nav-tabs">
-		<li class="active"><a href="${ctx}/newhome/newPageHomeimage/">新首页轮播图列表</a></li>
-		<shiro:hasPermission name="newhome:newPageHomeimage:edit"><li><a href="${ctx}/newhome/newPageHomeimage/form">新首页轮播图添加</a></li></shiro:hasPermission>
-	</ul>
-	<form:form id="searchForm" modelAttribute="newPageHomeimage" action="${ctx}/newhome/newPageHomeimage/" method="post" class="breadcrumb form-search">
-		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
-		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
-		<div class="ul-form">
-			<label>ID:</label>
-			<form:input path="id" htmlEscape="false" maxlength="11" class="input-mini"/>
-			<label>标题:</label>
-			<form:input path="title" htmlEscape="false" maxlength="40" class="input-small"/>
+<ul class="nav nav-tabs">
+    <li class="active"><a href="${ctx}/newhome/newPageHomeimage/">新首页轮播图列表</a></li>
+    <shiro:hasPermission name="newhome:newPageHomeimage:edit">
+        <li><a href="${ctx}/newhome/newPageHomeimage/form">新首页轮播图添加</a></li>
+    </shiro:hasPermission>
+</ul>
+<form:form id="searchForm" modelAttribute="newPageHomeimage" action="${ctx}/newhome/newPageHomeimage/" method="post"
+           class="breadcrumb form-search">
+    <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+    <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+    <div class="ul-form">
+        <label>ID:</label>
+        <form:input path="id" htmlEscape="false" maxlength="11" class="input-mini"/>
+        <label>标题:</label>
+        <form:input path="title" htmlEscape="false" maxlength="40" class="input-small"/>
+
+        <label>小程序端状态:</label>
+        <form:select path="crmEnabledStatus" class="input-small">
+            <form:option value="" label=" "/>
+            <form:options items="${fns:getDictList('enabled_status')}" itemLabel="label" itemValue="value"
+                          htmlEscape="false"/>
+        </form:select>
+        <label>PC端状态:</label>
+        <form:select path="wwwEnabledStatus" class="input-small">
+            <form:option value="" label=" "/>
+            <form:options items="${fns:getDictList('enabled_status')}" itemLabel="label" itemValue="value"
+                          htmlEscape="false"/>
+        </form:select>
+        &nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
+        <c:if test="${cmImage.flag eq 4}">
+            <label style="float:right;">活动专区首页:<a href="${fns:getConfig('wwwServer')}cmpage/area.html"
+                                                  target="_blank">${fns:getConfig('wwwServer')}cmpage/area.html</a></label>
+        </c:if>
+        <input class="btn btn-primary" type="button" value="一键排序" onclick="updateSortIndex()"
+               style="margin-left: 15px"/>
+        <div class="clearfix"></div>
+    </div>
+</form:form>
+<sys:message content="${message}"/>
+<table id="contentTable" class="table table-striped table-bordered table-condensed">
+    <thead>
+    <tr>
+        <th>ID</th>
+        <th>标题</th>
+        <th>图片</th>
+        <th>链接</th>
+        <th>排序</th>
+        <th>小程序端状态</th>
+        <th>PC端状态</th>
+        <th>创建时间</th>
+        <shiro:hasPermission name="newhome:newPageHomeimage:edit">
+            <th>操作</th>
+        </shiro:hasPermission>
+    </tr>
+    </thead>
+    <tbody>
+    <c:forEach items="${page.list}" var="newPageHomeimage">
+        <tr>
+            <td>${newPageHomeimage.id}</td>
+            <td>${newPageHomeimage.title}</td>
+            <td><img style="width:120px;height: 80px;" src="${newPageHomeimage.image}"/></td>
+            <td><a href="${newPageHomeimage.link}" target="_blank">${newPageHomeimage.link}</a></td>
 
-			<label>小程序端状态:</label>
-			<form:select path="crmEnabledStatus" class="input-small">
-				<form:option value="" label=" "/>
-				<form:options items="${fns:getDictList('enabled_status')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
-			</form:select>
-			<label>PC端状态:</label>
-			<form:select path="wwwEnabledStatus" class="input-small">
-				<form:option value="" label=" "/>
-				<form:options items="${fns:getDictList('enabled_status')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
-			</form:select>
-			&nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
-			<c:if test="${cmImage.flag eq 4}">
-				<label style="float:right;">活动专区首页:<a href="${fns:getConfig('wwwServer')}cmpage/area.html" target="_blank">${fns:getConfig('wwwServer')}cmpage/area.html</a></label>
-			</c:if>
-			<div class="clearfix"></div>
-		</div>
-	</form:form>
-	<sys:message content="${message}"/>
-	<table id="contentTable" class="table table-striped table-bordered table-condensed">
-		<thead>
-			<tr>
-				<th>ID</th>
-				<th>标题</th>
-				<th>图片</th>
-				<th>链接</th>
-				<th>排序</th>
-				<th>小程序端状态</th>
-				<th>PC端状态</th>
-				<th>创建时间</th>
-				<shiro:hasPermission name="newhome:newPageHomeimage:edit"><th>操作</th></shiro:hasPermission>
-			</tr>
-		</thead>
-		<tbody>
-		<c:forEach items="${page.list}" var="newPageHomeimage">
-			<tr>
-				<td>${newPageHomeimage.id}</td>
-				<td>${newPageHomeimage.title}</td>
-				<td><img style="width:120px;height: 80px;" src="${newPageHomeimage.image}"/></td>
-				<td><a href="${newPageHomeimage.link}" target="_blank">${newPageHomeimage.link}</a></td>
-				<td>${newPageHomeimage.sort}</td>
-				<td><shiro:hasPermission name="newhome:newPageHomeimage:edit">
-					<c:if test="${newPageHomeimage.crmEnabledStatus eq 1 }">
-						<a href="javascript:void(0);" onclick="updateCrmEnabledStatusByIds('0','${newPageHomeimage.id}');" >
-							<img alt="启用" src="/static/images/yes.gif" width="15px" border="none" title="启用">
-						</a>
-					</c:if>
-					<c:if test="${newPageHomeimage.crmEnabledStatus ne 1 }">
-						<a href="javascript:void(0)" onclick="updateCrmEnabledStatusByIds('1','${newPageHomeimage.id}');">
-							<img alt="停用" src="/static/images/no.gif" width="15px" border="none" title="停用">
-						</a>
-					</c:if>
-				</shiro:hasPermission></td>
-				<td><shiro:hasPermission name="newhome:newPageHomeimage:edit">
-					<c:if test="${newPageHomeimage.wwwEnabledStatus eq 1 }">
-						<a href="javascript:void(0);" onclick="updateEnabledStatus('0','${newPageHomeimage.id}');" >
-							<img alt="启用" src="/static/images/yes.gif" width="15px" border="none" title="启用">
-						</a>
-					</c:if>
-					<c:if test="${newPageHomeimage.wwwEnabledStatus ne 1 }">
-						<a href="javascript:void(0)" onclick="updateEnabledStatus('1','${newPageHomeimage.id}');">
-							<img alt="停用" src="/static/images/no.gif" width="15px" border="none" title="停用">
-						</a>
-					</c:if>
-				</shiro:hasPermission></td>
-				<td><fmt:formatDate value="${newPageHomeimage.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
-				<shiro:hasPermission name="newhome:newPageHomeimage:edit"><td>
-    				<a href="${ctx}/newhome/newPageHomeimage/form?id=${newPageHomeimage.id}">编辑</a>
-    				<shiro:hasPermission name="newhome:newPageHomeimage:delete">
-					<a href="${ctx}/newhome/newPageHomeimage/delete?id=${newPageHomeimage.id}" onclick="return confirmx('确认要删除该新首页轮播图吗?', this.href)">删除</a>
-					</shiro:hasPermission>
-				</td></shiro:hasPermission>
-			</tr>
-		</c:forEach>
-		</tbody>
-	</table>
-	<div class="pagination">${page}</div>
+            <td>
+                <input id="sortNum${newPageHomeimage.id}" type="text" name="sort" style="width:50px;"
+                       value="${newPageHomeimage.sort}" onkeyup="onlynum(this)"
+                       onchange="changeSort(${newPageHomeimage.id})"/>
+            </td>
+            <td><shiro:hasPermission name="newhome:newPageHomeimage:edit">
+                <c:if test="${newPageHomeimage.crmEnabledStatus eq 1 }">
+                    <a href="javascript:void(0);" onclick="updateCrmEnabledStatusByIds('0','${newPageHomeimage.id}');">
+                        <img alt="启用" src="/static/images/yes.gif" width="15px" border="none" title="启用">
+                    </a>
+                </c:if>
+                <c:if test="${newPageHomeimage.crmEnabledStatus ne 1 }">
+                    <a href="javascript:void(0)" onclick="updateCrmEnabledStatusByIds('1','${newPageHomeimage.id}');">
+                        <img alt="停用" src="/static/images/no.gif" width="15px" border="none" title="停用">
+                    </a>
+                </c:if>
+            </shiro:hasPermission></td>
+            <td><shiro:hasPermission name="newhome:newPageHomeimage:edit">
+                <c:if test="${newPageHomeimage.wwwEnabledStatus eq 1 }">
+                    <a href="javascript:void(0);" onclick="updateEnabledStatus('0','${newPageHomeimage.id}');">
+                        <img alt="启用" src="/static/images/yes.gif" width="15px" border="none" title="启用">
+                    </a>
+                </c:if>
+                <c:if test="${newPageHomeimage.wwwEnabledStatus ne 1 }">
+                    <a href="javascript:void(0)" onclick="updateEnabledStatus('1','${newPageHomeimage.id}');">
+                        <img alt="停用" src="/static/images/no.gif" width="15px" border="none" title="停用">
+                    </a>
+                </c:if>
+            </shiro:hasPermission></td>
+            <td><fmt:formatDate value="${newPageHomeimage.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
+            <shiro:hasPermission name="newhome:newPageHomeimage:edit">
+                <td>
+                    <a href="${ctx}/newhome/newPageHomeimage/form?id=${newPageHomeimage.id}">编辑</a>
+                    <shiro:hasPermission name="newhome:newPageHomeimage:delete">
+                        <a href="${ctx}/newhome/newPageHomeimage/delete?id=${newPageHomeimage.id}"
+                           onclick="return confirmx('确认要删除该新首页轮播图吗?', this.href)">删除</a>
+                    </shiro:hasPermission>
+                </td>
+            </shiro:hasPermission>
+        </tr>
+    </c:forEach>
+    </tbody>
+</table>
+<div class="pagination">${page}</div>
 </body>
 </html>

+ 3 - 2
src/main/webapp/WEB-INF/views/modules/order/cmDiscernReceiptForm.jsp

@@ -168,6 +168,7 @@
                             <c:if test="${cmDiscernReceipt.newReceiptType eq 2}">-服务返佣</c:if>
                             <c:if test="${cmDiscernReceipt.newReceiptType eq 3}">-认证通会员</c:if>
                             <c:if test="${cmDiscernReceipt.newReceiptType eq 4}">-认证通企划</c:if>
+                            <c:if test="${cmDiscernReceipt.newReceiptType eq 5}">-其他</c:if>
                         </c:if>
 						<c:if test="${vo.receiptType == 3}">
                             <c:if test="${vo.payType == 10}">
@@ -238,9 +239,9 @@
             <div class="not-order-type">
                 <span><label>确认人:</label> ${vo.confirmer}</span>
                 <span><label>确认时间: </label>${vo.confirmTime}</span>
-                <c:if test="${ vo.shopName != null && cmDiscernReceipt.newReceiptType != 2 }"> <br> <span
+                <c:if test="${vo.shopName != null && cmDiscernReceipt.newReceiptType != 2 && cmDiscernReceipt.newReceiptType != 5}"> <br> <span
                         class="not-order-reason"><label>关联供应商:</label>${vo.shopName}</span></c:if>
-                <c:if test="${vo.shopName == null && cmDiscernReceipt.newReceiptType != 2}"> <br> <span
+                <c:if test="${vo.shopName == null && cmDiscernReceipt.newReceiptType != 2 && cmDiscernReceipt.newReceiptType != 5}"> <br> <span
                         class="not-order-reason"><label>关联供应商:</label>无</span> <br></c:if>
                 <br>
                 <c:if test="${not empty vo.noOrderReason}">

+ 1 - 0
src/main/webapp/WEB-INF/views/modules/order/cmDiscernReceiptList.jsp

@@ -143,6 +143,7 @@
                 <form:option value="2" label="服务返佣"/>
                 <form:option value="3" label="认证通会员"/>
                 <form:option value="4" label="认证通企划"/>
+                <form:option value="5" label="其他"/>
             </form:select>
 
             <label>收款状态:</label>

File diff suppressed because it is too large
+ 720 - 398
src/main/webapp/WEB-INF/views/modules/product-new/productList.jsp


Some files were not shown because too many files changed in this diff