Ver Fonte

新增缴纳费用记录添加操作页面

Duan_xu há 2 anos atrás
pai
commit
f1b0eb4a4a

+ 57 - 1
src/main/java/com/caimei/modules/order/entity/CmDiscernReceipt.java

@@ -73,11 +73,19 @@ public class CmDiscernReceipt extends DataEntity<CmDiscernReceipt> {
     private Integer shopOrderId;//子订单id
     private Double productAmount;//订单总金额
     private Double needPayAmount;//应收金额
-    private String shopName;
+    private String shopName;//关联供应商名称
     private String checkMan;
     private String  shopOrderNos;
     private String jgName;//机构名称
     private String paYee;//收款方(虚拟字段)
+    private Integer shopID;//收款方关联供应商id
+    private String  validityDate;//生效时间期(没存库)
+    private String expirationDate;//到期时间(没存库)
+    private Integer receStatct;//免除上架费标识0,正常1,免除
+    private String receiptID;//收款id
+    private String linkMan;
+
+
 
     public String getPaYee() {
         return paYee;
@@ -562,4 +570,52 @@ public class CmDiscernReceipt extends DataEntity<CmDiscernReceipt> {
     public void setAssociationType(String associationType) {
         this.associationType = associationType;
     }
+
+    public Integer getShopID() {
+        return shopID;
+    }
+
+    public void setShopID(Integer shopID) {
+        this.shopID = shopID;
+    }
+
+    public String getValidityDate() {
+        return validityDate;
+    }
+
+    public void setValidityDate(String validityDate) {
+        this.validityDate = validityDate;
+    }
+
+    public String getExpirationDate() {
+        return expirationDate;
+    }
+
+    public void setExpirationDate(String expirationDate) {
+        this.expirationDate = expirationDate;
+    }
+
+    public Integer getReceStatct() {
+        return receStatct;
+    }
+
+    public void setReceStatct(Integer receStatct) {
+        this.receStatct = receStatct;
+    }
+
+    public String getReceiptID() {
+        return receiptID;
+    }
+
+    public void setReceiptID(String receiptID) {
+        this.receiptID = receiptID;
+    }
+
+    public String getLinkMan() {
+        return linkMan;
+    }
+
+    public void setLinkMan(String linkMan) {
+        this.linkMan = linkMan;
+    }
 }

+ 7 - 0
src/main/java/com/caimei/modules/user/dao/NewCmShopDao.java

@@ -1,6 +1,7 @@
 package com.caimei.modules.user.dao;
 
 import com.caimei.modules.cibe.entity.ShopCert;
+import com.caimei.modules.order.entity.CmDiscernReceipt;
 import com.caimei.modules.user.entity.NewCmShop;
 import com.caimei.modules.user.entity.SplitCode;
 import com.thinkgem.jeesite.common.persistence.CrudDao;
@@ -43,4 +44,10 @@ public interface NewCmShopDao extends CrudDao<NewCmShop> {
     void offline(NewCmShop newCmShop);
 
     void online(NewCmShop newCmShop);
+
+    List<CmDiscernReceipt> maintenanceList(CmDiscernReceipt cmDiscernReceipt);
+
+    void Removethelastfee(CmDiscernReceipt cmDiscernReceipt);
+
+    void Removethelast(CmDiscernReceipt cmDiscernReceipt);
 }

+ 16 - 0
src/main/java/com/caimei/modules/user/service/NewCmShopService.java

@@ -7,6 +7,7 @@ import java.util.Objects;
 import com.caimei.dfs.image.beens.ImageUploadInfo;
 import com.caimei.modules.cibe.entity.ShopCert;
 import com.caimei.modules.common.utils.UploadUtils;
+import com.caimei.modules.order.entity.CmDiscernReceipt;
 import com.caimei.modules.sys.utils.UploadImageUtils;
 import com.caimei.modules.user.dao.CmUserDao;
 import com.caimei.modules.user.entity.SplitCode;
@@ -342,4 +343,19 @@ public class NewCmShopService extends CrudService<NewCmShopDao, NewCmShop> {
     public void online(NewCmShop newCmShop) {
         newCmShopDao.online(newCmShop);
     }
+
+    public Page<CmDiscernReceipt>maintenanceList(Page<CmDiscernReceipt> page,CmDiscernReceipt cmDiscernReceipt){
+        cmDiscernReceipt.setPage(page);
+        page.setList(newCmShopDao.maintenanceList(cmDiscernReceipt));
+        return page;
+    }
+    @Transactional(readOnly = false)
+    public void Removethelastfee(CmDiscernReceipt cmDiscernReceipt) {
+        newCmShopDao.Removethelastfee(cmDiscernReceipt);
+    }
+
+  @Transactional(readOnly = false)
+    public void Removethelast(CmDiscernReceipt cmDiscernReceipt) {
+        newCmShopDao.Removethelast(cmDiscernReceipt);
+    }
 }

+ 121 - 0
src/main/java/com/caimei/modules/user/web/NewCmShopController.java

@@ -2,6 +2,7 @@ package com.caimei.modules.user.web;
 
 import com.caimei.constants.ShopStatus;
 import com.caimei.modules.opensearch.CoreServiceUitls;
+import com.caimei.modules.order.entity.CmDiscernReceipt;
 import com.caimei.modules.sys.utils.CmMsgUtils;
 import com.caimei.modules.sys.utils.SMSUtils;
 import com.caimei.modules.user.dao.CmUserDao;
@@ -33,6 +34,7 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.*;
 
@@ -62,6 +64,8 @@ public class NewCmShopController extends BaseController {
     private NewCmShopDao newCmShopDao;
     @Autowired
     CmOperationalLogService cmOperationalLogService;
+    @Autowired
+    private SysLogService sysLogService;
 
 
     @ModelAttribute
@@ -172,6 +176,123 @@ public class NewCmShopController extends BaseController {
         return "modules/user/newCmShopForm";
     }
 
+
+    @RequestMapping(value = "maintenanceList")
+    public String maintenanceList(CmDiscernReceipt cmDiscernReceipt, HttpServletRequest request, HttpServletResponse response, Model model) throws ParseException {
+        //获取供应商证书信息
+        Page<CmDiscernReceipt>discernReceipt = newCmShopService.maintenanceList(new Page<CmDiscernReceipt>(request, response, 20),cmDiscernReceipt);
+        String date="";
+        int num=0;
+        Calendar calendar = Calendar.getInstance();
+        Date currentTime = new Date();
+        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
+        //当前时间
+        String dateString = formatter.format(currentTime);
+        //到期时间
+        String dateStrings ="";
+        //生效时间
+        String validityDate="";
+        for(int i=0;i<discernReceipt.getList().size();i++){
+            //缴纳时间
+            String receiptDate=discernReceipt.getList().get(i).getReceiptDate();
+            Date time = formatter.parse(receiptDate);
+             validityDate = formatter.format(time);
+            calendar.setTime(time);
+            calendar.add(Calendar.YEAR, 1);
+            //缴纳时间加一年==到期时间
+            dateStrings= formatter.format(calendar.getTime());
+
+
+                num = dateStrings.compareTo(dateString);
+                if (num < 0) {
+                    cmDiscernReceipt.setValidityDate(validityDate);
+                    cmDiscernReceipt.setExpirationDate(dateStrings);
+                }
+                if (num > 0) {
+                    Date times = formatter.parse(receiptDate);
+                    calendar.setTime(times);
+                    calendar.add(Calendar.DATE, 1);
+                    validityDate= formatter.format(calendar.getTime());
+                    cmDiscernReceipt.setValidityDate(validityDate);
+                    Date timed = formatter.parse(dateStrings);
+                    calendar.setTime(timed);
+                    calendar.add(Calendar.DATE, 1);
+                    dateStrings= formatter.format(calendar.getTime());
+                    cmDiscernReceipt.setExpirationDate(dateStrings);
+                }
+            discernReceipt.getList().get(i).setValidityDate(cmDiscernReceipt.getValidityDate());
+            discernReceipt.getList().get(i).setExpirationDate(cmDiscernReceipt.getExpirationDate());
+            cmDiscernReceipt.setShopID(discernReceipt.getList().get(i).getShopID());
+            cmDiscernReceipt.setReceiptID(discernReceipt.getList().get(i).getReceiptID());
+            cmDiscernReceipt.setLinkMan(discernReceipt.getList().get(i).getLinkMan());
+            System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"+num);
+            System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"+"1:"+date+"2:"+dateStrings+"3:"+dateString);
+        }
+            model.addAttribute("CmDiscernReceipt", cmDiscernReceipt);
+        model.addAttribute("discernReceipt", discernReceipt);
+        return "modules/user/maintenanceList";
+    }
+
+    @RequestMapping(value = "Removethelastfee")
+    public String Removethelastfee(CmDiscernReceipt cmDiscernReceipt,Model model) {
+
+
+        OperationalLogs sysLog = new OperationalLogs();
+        Date currentTime = new Date();
+        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
+        //当前时间
+        String dateString = formatter.format(currentTime);
+        cmDiscernReceipt.setReceiptDate(dateString);
+        cmDiscernReceipt.setReceStatct(1);
+        newCmShopService.Removethelastfee(cmDiscernReceipt);
+
+        //获取操作时间
+        sysLog.setOperationtime(new Date());
+
+        //获取操作员
+        SystemAuthorizingRealm.Principal principal = UserUtils.getPrincipal();
+        System.out.println("操作员" + principal.getName());
+        String username = principal.getName();
+        sysLog.setOperator(username);
+        sysLog.setActioncontent("免除上架费");
+        sysLog.setContact(cmDiscernReceipt.getLinkMan());
+        sysLog.setInstitutionName(cmDiscernReceipt.getShopName());
+        sysLog.setOperationtype("编辑");
+        if (!"".equals(sysLog.getActioncontent())) {
+            if (sysLog.getInstitutionName() != null && sysLog.getContact() != null) {
+                int i = sysLogService.insert(sysLog);
+            }
+
+        }
+        return "redirect:" + Global.getAdminPath() + "/user/maintenanceList?shopName=" + cmDiscernReceipt.getShopName();
+    }
+    @RequestMapping(value = "Removethelast")
+    public String Removethelast(CmDiscernReceipt cmDiscernReceipt,Model model)
+    {
+        OperationalLogs sysLog = new OperationalLogs();
+        newCmShopService.Removethelast(cmDiscernReceipt);
+        //获取操作时间
+        sysLog.setOperationtime(new Date());
+
+        //获取操作员
+        SystemAuthorizingRealm.Principal principal = UserUtils.getPrincipal();
+        System.out.println("操作员" + principal.getName());
+        sysLog.setActioncontent("取消免除上架费");
+        String username = principal.getName();
+        sysLog.setOperator(username);
+        sysLog.setContact(cmDiscernReceipt.getLinkMan());
+        sysLog.setInstitutionName(cmDiscernReceipt.getShopName());
+        sysLog.setOperationtype("编辑");
+        if (!"".equals(sysLog.getActioncontent())) {
+            if (sysLog.getInstitutionName() != null && sysLog.getContact() != null) {
+                int i = sysLogService.insert(sysLog);
+            }
+
+        }
+
+        return "redirect:" + Global.getAdminPath() + "/user/maintenanceList?shopName="+cmDiscernReceipt.getShopName();
+    }
+
     /**
      * 供应商审核
      *

+ 34 - 0
src/main/resources/mappings/modules/user/NewCmShopMapper.xml

@@ -434,4 +434,38 @@
 	<update id="online">
 		update shop set status = 90 where shopID= #{shopID}
 	</update>
+
+	<select id="maintenanceList" resultType="CmDiscernReceipt">
+		SELECT
+			a.id as receiptID,a.shopID,a.receiptAmount,a.receiptDate,a.receStatct,s.linkMan
+		FROM cm_discern_receipt a
+		LEFT JOIN shop s ON s.shopID = a.shopID
+		<where>
+		 AND a.shopID=#{shopID}
+		 AND a.newReceiptType=1
+		<if test="startTime != null and startTime != ''">
+			AND (a.receiptDate &gt; #{startTime} OR  a.receiptDate = #{startTime})
+		</if>
+		<if test="endTime != null and endTime != ''">
+			AND (a.receiptDate &lt; #{endTime} OR  a.receiptDate = #{endTime})
+		</if>
+		 or a.receStatct is not null
+			ORDER BY a.receiptDate DESC
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+		</choose>
+	</select>
+	<insert id="Removethelastfee">
+		insert into cm_discern_receipt
+			(shopID, receStatct, receiptDate,delFlag)
+		values (#{shopID},#{receStatct}, #{receiptDate},1)
+	</insert>
+
+	<update id="Removethelast">
+		update cm_discern_receipt set receStatct = 0 where id= #{receiptID}
+	</update>
+
 </mapper>

+ 44 - 465
src/main/webapp/WEB-INF/views/modules/user/maintenanceList.jsp

@@ -2,7 +2,7 @@
 <%@ include file="/WEB-INF/views/include/taglib.jsp"%>
 <html>
 <head>
-	<title>缴纳费用记录</title>
+	<title>上架费记录</title>
 	<meta name="decorator" content="default"/>
 	<style type="text/css">
 		.table th{text-align: center;}
@@ -170,10 +170,10 @@
 <body>
 <ul class="nav nav-tabs">
 	<li><a href="${ctx}/user/newCmShop/">供应商信息列表</a></li>
-	<li class="active"><a href="${ctx}/user/cmOperationalLogsShop/">缴纳费用记录</a></li>
+	<li class="active"><a href="${ctx}/user/newCmShop/maintenanceList?shopID=${cmDiscernReceipt.shopID}&shopName=${cmDiscernReceipt.shopName}">缴纳费用记录</a></li>
 	<%--		<shiro:hasPermission name="user:newCmShop:edit"><li><a href="${ctx}/user/newCmShop/form">供应商信息添加</a></li></shiro:hasPermission>--%>
 </ul>
-<form:form id="searchForm" modelAttribute="newCmShop" action="${ctx}/user/newCmShop/" method="post" class="breadcrumb form-search">
+<form:form id="searchForm" modelAttribute="newCmShop" action="${ctx}/user/newCmShop/maintenanceList?shopID=${cmDiscernReceipt.shopID}&shopName=${cmDiscernReceipt.shopName}" 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">
@@ -185,10 +185,12 @@
 				-
 				<form:input path="endTime" type="text" maxlength="20" class="input-mini Wdate" value="${endTime}"
 							onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+
+			&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
+			&nbsp;&nbsp;<input class="btn btn-primary" onclick="offocea(${CmDiscernReceipt.shopID},'${CmDiscernReceipt.linkMan}')" type="button" value="免除上架费"/>
 			</div>
-			<div class="item">
-				&nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
-			</div>
+<%--		shopId, receStatct, receiptDate--%>
+		<strong>供应商:${CmDiscernReceipt.shopName}</strong>
 		</div>
 	</div>
 </form:form>
@@ -198,489 +200,66 @@
 	<tr>
 		<th>序号</th>
 		<th>金额</th>
-		<th>费用类型</th>
 		<th>缴纳时间</th>
 		<th>生效时间</th>
 		<th>到期时间</th>
-		<th>添加时间</th>
 		<th>操作</th>
 
 	</tr>
 	</thead>
 	<tbody>
-	<c:forEach items="${page.list}" var="newCmShop">
-
-	<td>
-		<a href="${ctx}/user/newCmShop/form?id=${newCmShop.shopID}&editStatus=1">编辑</a>
-
-
-		<a href="javascript:void(0)" > 删除</a>
-
+	<c:forEach items="${discernReceipt.list}" var="discernReceipt">
+		<td>${(page.pageNo-1)*page.pageSize+index.index+1}</td>
+		<c:if test="${discernReceipt.receStatct eq 1}">
+			<td>免除上架费</td>
+			<td>${discernReceipt.receiptDate}</td>
+			<td>${discernReceipt.validityDate}</td>
+			<td>--</td>
+			<td>
+				<a href="javascript:void(0);" onclick="offoceb(${CmDiscernReceipt.receiptID},${CmDiscernReceipt.linkMan})">取消</a>
+			</td>
+		</c:if>
+		<c:if test="${discernReceipt.receStatct eq 0}">
+			<td>免除上架费<span style="color: red">(已取消)</span></td>
+			<td>${discernReceipt.receiptDate}</td>
+			<td>${discernReceipt.validityDate}</td>
+			<td>--</td>
+			<td>
+				--
 			</td>
+		</c:if>
+		<c:if test="${empty discernReceipt.receStatct}">
+			<td>${discernReceipt.receiptAmount}</td>
+			<td>${discernReceipt.receiptDate}</td>
+			<td>${discernReceipt.validityDate}</td>
+			<td>${discernReceipt.expirationDate}</td>
+			<td>
+				--
+			</td>
+		</c:if>
+
 		</tr>
 	</c:forEach>
 	</tbody>
 </table>
-<div class="pagination">${page}</div>
-
+<div class="pagination">${discernReceipt}</div>
 <script>
-	$(document).ready(function() {
+	function offocea(shopId,linkMan) {
+		$.jBox.confirm("确定为该供应商免除上架费吗?","提示",function(v,h,f){
 
-		//供应商默认主营内容
-		var html='';
-		html+='<span class="new-tag up-club-tag" data-typeName="产品">产品</span>',
-				html+='<span class="new-tag up-club-tag" data-typeName="仪器">仪器</span>',
-				html+='<span class="new-tag up-club-tag" data-typeName="服务">服务</span>';
-		$('#shopArea').html(html);
-		//供应商
-		$('.smedical-radio div input[name="firstShopType"]').on('click',function () {
-			var nameval = $(this).val();
-			if(nameval == '1'){
-				$('.smed-option').show();
-			}else if(nameval == '2'){
-				$('.smed-option,.squalification,.epart').hide();
-				$('input[name="secondShopType"]').attr('checked',false);
-			}
-		});
-		//医疗二级选择
-		$('input[name="secondShopType"]').on('click',function () {
-			var nameVal = $(this).val();
-			if(nameVal == '1'){
-				$('.squalification').hide()
-			}else if(nameVal == '2'){
-				$('.squalification').hide()
-			}else if(nameVal == '3'){
-				$('.squalification').show()
-			}else if(nameVal == '4'){
-				$('.squalification').hide()
-			}
-		});
-		//点击继续上传
-		var record ='';
-		$('.go-up').on('click',function () {
-			if(record == 1){
-				if($('#medicalPracticeLicenseImg2').val() != ''){
-					$('.there-up').css({'display':'inline-block'});
-					record = 2
-				}else {
-					alertx('请上传资质')
-					_util.hideTip($('.err-tip'));
-				}
-			}else if(record == 2){
-				alertx('只需要上传三张资质');
-//					$('.go-up').hide();
-			} else {
-				if($('#medicalPracticeLicenseImg1').val() != ''){
-					$('.two-up').css({'display':'inline-block'});
-					record = 1;
-				}else if($('#medicalPracticeLicenseImg2').val() != ''){
-					$('.there-up').css({'display':'inline-block'});
-					record = 2
-				}else {
-					alertx('请上传资质')
-					_util.hideTip($('.err-tip'));
-					record = ''
-				}
-			}
-		});
-		//供应商品项选择
-		var opts = {
-			$tag:$('.up-shop-tag'),
-			$tagArea:$('#shopArea'),
-			$mainPro:$('#sMainPro'),
-			$other:$('#shopOther'),
-			$input:$('#shopInput'),
-			$add:$('#shopAdd'),
-			$type:'shop'
-		};
-		_util.getTags(opts);
-		$('#confirm').on('click',function () {
-			//公司类型
-			if(!$('input[name="firstShopType"]').is(':checked')){
-				$('input[name="firstShopType"]').parents('.smedical-radio').next().show().html('请选择公司类型');
-				_util.hideTip($('.err-tip'));
-				return false
-			}else if($('input[name="firstShopType"]:checked').val() == 1){
-				if(!$('input[name="secondShopType"]').is(':checked')){
-					$('input[name="secondShopType"]').parents('.smed-option').find('.err-tip').show().html('请选择公司类型');
-					_util.hideTip($('.err-tip'));
-					return false
-				}
-			}
-			if($('input[name="secondShopType"]:checked').val() == 3){
-				// 会所资质
-				if($('#medicalPracticeLicenseImg1').val() == ''){
-					alertx('请上传资质')
-				}
-
-				if($('.two-up').css('display')!='none'){
-					if($('#medicalPracticeLicenseImg2').val() == ''){
-						alertx('请上传资质')
-						return false
-					}
-				}
-				if($('.there-up').css('display')!='none'){
-					if($('#medicalPracticeLicenseImg3').val() == ''){
-						alertx('请上传资质')
-						return false
-					}
-				}
-			}
-			if($('#sMainPro').val() == ''){
-				alertx('请选择主营内容')
-				return false
-			}
-			var params = {
-				mainpro:$('#sMainPro').val(),
-				shopID:$(this).attr('data-id'),
-				flagC:$(this).attr('data-flag')
-			};
-			if($('input[name="firstShopType"]:checked').val() == 1){
-				params.firstShopType = 1;//公司分类
-				params.secondShopType =$('input[name="secondShopType"]:checked').val();//二级分类
-				if($('input[name="secondShopType"]:checked').val() == 3){
-					if($('#medicalPracticeLicenseImg1').val() != ''){
-						params.medicalPracticeLicenseImg1 = $('#medicalPracticeLicenseImg1').val();//资质
-						// if($('#medicalPracticeLicenseImg2').val() != ''){
-						//     params.medicalPracticeLicenseImg2 = $('#qualification2').val();//资质
-						//     if($('#medicalPracticeLicenseImg3').val() != ''){
-						//         params.medicalPracticeLicenseImg3 = $('#qualification3').val();//资质
-						//     }
-						// }
-					}
-					if($('#medicalPracticeLicenseImg2').val() != '') {
-						params.medicalPracticeLicenseImg2 = $('#medicalPracticeLicenseImg2').val();//资质
-					}
-					if($('#medicalPracticeLicenseImg3').val() != '') {
-						params.medicalPracticeLicenseImg3 = $('#medicalPracticeLicenseImg3').val();//资质
-					}
-
-				}
-			}else {
-				params.firstShopType = 2;//公司分类
-			}
-			$.ajax({
-				type: "post",
-				url: "${ctx}/user/newCmShop/editShopType",
-				data: params,
-				success : function (res) {
-					if(res.errcode == '1') {
-						alertx(res.errmsg);
-					}
-					if(res.errcode == '0') {
-						console.log(res.data);
-						window.location.href = res.data;
-					}
-				},
-				error : function (res) {
-				}
-			});
-		})
-	});
-	var _util = {
-		// 隐藏输入错误提示(参数为提示元素)
-		hideTip : function($ele){
-			setTimeout(function () {
-				$ele.hide();
-			}, 5000);
-		},
-		setTags:function (opts) {
-			var tagArr = [];
-			opts.$tagArea.find('.new-tag.active').each(function(i,v){
-				var _typeName = $(v).attr('data-typeName');
-				tagArr.push(_typeName);
-				opts.$mainPro.val(tagArr.join('/'));
-			})
-		},
-		getTags:function (opts) {
-			opts.$tagArea.on('click','.new-tag',function(){
-				var $this = $(this);
-				$this.toggleClass('active');
-				_util.setTags(opts);
-			})
-			opts.$other.on('click',function(){
-				opts.$input.css('display','inline-block');
-				opts.$add.css('display','inline-block');
-			})
-			opts.$add.on('click',function(){
-				var _tag = $.trim(opts.$input.val());
-				if(_tag){
-					var flag = false;
-					opts.$tagArea.find('.new-tag').each(function(i,v){
-						var _name = $(v).attr('data-typeName');
-						if(_tag == _name){
-							flag=true;
-							return false;
-						}else{
-							if(i==opts.$tagArea.find('.new-tag').length){
-								flag=false;
-							}
-						}
-
-					})
-					if(flag){
-						opts.$tagArea.find('.new-tag').each(function(i,v){
-							var _name = $(v).attr('data-typeName');
-							if(_tag == _name){
-								$(v).addClass('active');
-//                                layer.tips('该类型已存在',opts.$add);
-								alertx('该类型已存在')
-								flag=true;
-								return false;
-							}
-
-						})
-					}else{
-						opts.$tagArea.append('<span class="new-tag up-'+opts.$type+'-tag active" data-typeName="'+_tag+'">'+_tag+'</span> ');
-						_util.setTags(opts);
-						opts.$input.val('');
-						return;
-					}
-				}
-			})
-		},
-	}
-</script>
-<script>
-	$(document).ready(function() {
-		$('.shopType').on('click',function () {
-			$('#confirm').attr('data-id',$(this).attr('data-shopID'))
-			$('#confirm').attr('data-flag',$(this).attr('data-flag'))
-			$('#myModal2').modal();
-			var that = $(this);
-			// var flag = that.attr("data-flag");
-			// $('#confirm').attr('data-flag',flag)
-			// var shopID = that.attr("data-shopID");
-			// var that = $(this);
-			var flag = that.attr("data-flag");
-			if ("0" == flag) {
-				$("#myModalLabel").html("设置分类");
-			}
-			if ("1" == flag) {
-				$("#myModalLabel").html("修改分类");
-				var json = JSON.parse($(this).attr('data-value'));
-				var firstShopType = json["firstShopType"];
-				var secondShopType = json["secondShopType"];
-				var medicalPracticeLicenseImg1 = json["medicalPracticeLicenseImg1"];
-				var medicalPracticeLicenseImg2 = json["medicalPracticeLicenseImg2"];
-				var medicalPracticeLicenseImg3 = json["medicalPracticeLicenseImg3"];
-				var mainpro = json["mainpro"];
-				if (firstShopType) {
-					$('input[name="firstShopType"]').parent('div').eq(firstShopType-1).find('input').attr("checked","checked")
-					$('input[name="firstShopType"]').parent('div').eq(firstShopType-1).find('input').click();
-					if(secondShopType){
-						$('input[name="secondShopType"]').parent('div').eq(secondShopType-1).find('input').attr("checked","checked")
-						$('input[name="secondShopType"]').parent('div').eq(secondShopType-1).find('input').click();
-					}
-					if(medicalPracticeLicenseImg1){
-						$('#medicalPracticeLicenseImg1').val(medicalPracticeLicenseImg1);
-						$('#medicalPracticeLicenseImg1Preview').find('li').html('<img style="max-width:100px;max-height:100px;_height:100px;border:0;padding:3px;" src="'+medicalPracticeLicenseImg1+'" />')
-					}
-					if(medicalPracticeLicenseImg2){
-						$('.two-up').css({'display':'inline-block'});
-						$('#medicalPracticeLicenseImg2').val(medicalPracticeLicenseImg2);
-						$('#medicalPracticeLicenseImg2Preview').find('li').html('<img style="max-width:100px;max-height:100px;_height:100px;border:0;padding:3px;" src="'+medicalPracticeLicenseImg2+'" />')
-					}
-					if(medicalPracticeLicenseImg3){
-						$('.there-up').css({'display':'inline-block'});
-						$('#medicalPracticeLicenseImg3').val(medicalPracticeLicenseImg3);
-						$('#medicalPracticeLicenseImg3Preview').find('li').html('<img style="max-width:100px;max-height:100px;_height:100px;border:0;padding:3px;" src="'+medicalPracticeLicenseImg3+'" />')
-					}
-
-					if(mainpro){
-						var span_ = $('#shopArea').find('span');
-						var mainpro_ = mainpro.split('/');
-						var html='';
-						var defaultVal = [];
-						var resArr = [];
-						var html='';
-						$('#shopArea').html('');
-						for(var i=0; i<span_.length;i++) {
-							defaultVal.push(span_[i].textContent);
-						}
-						var concatArr = defaultVal.concat(mainpro_);
-						for(var i=0; i<concatArr.length; i++) {
-							if(resArr.indexOf(concatArr[i]) == -1) {
-								resArr.push(concatArr[i]);
-								html += '<span class="new-tag up-club-tag '+concatArr[i]+'" data-typeName="'+concatArr[i]+'">'+concatArr[i]+'</span>';
-							}
-						}
-						$('#shopArea').append(html);
-						for(var i=0; i<mainpro_.length; i++) {
-							$('.'+mainpro_[i]).addClass('active');
-						}
-					}
-				}
-				var spanSp = $('#shopArea').find('span');
-				console.log(spanSp)
-				spanSp.each(function (i,l) {
-					if($(this).hasClass('active')){
-						$('#sMainPro').val($(this).text())
-					}
-				});
-
-			}
-		})
-	});
-
-	// 修改密码
-	function updatePwd(id) {
-		var regPwd = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,16}$/;
-		var html = "<div style='padding:20px;'><font color='red'>*</font> 新密码 :" +
-				"<input type='password' id='newPwd' name='newPwd' rows='1' cols='12'/>" +
-				"</br><font color='red'>*</font>确认密码:" +
-				"<input type='password' id='surePwd' name='surePwd' rows='1' cols='12'/></div>";
-		var submit = function (v, h, f) {
-			// 密码
-			if (!regPwd.test(f.newPwd)) {
-				$.jBox.tip("密码需8-16位字母数字组合", 'error', {focusId: "newPwd"});
-				return false;
-			}
-			if (f.newPwd !== f.surePwd) {
-				$.jBox.tip("确认密码与登录密码不一致", 'error', {focusId: "surePwd"});
-				return false;
-			}
-			$.post("${ctx}/user/newCmShop/updatePwd", {'password': f.newPwd, 'id': id}, function (data) {
-				if (true == data.success) {
-					$.jBox.tip(data.msg, 'info');
-					$("#searchForm").submit();
-				} else {
-					$.jBox.tip(data.msg, 'error');
-				}
-			}, "JSON");//这里返回的类型有:json,html,xml,text
-		};
-		$.jBox(html, {title: "确定修改密码?", submit: submit});
-	}
-	//修改手机号码
-	function updateMobile(id) {
-		var regMobile = /^1[3,4,5,6,7,8,9]\d{9}$/;
-		var html = "<div style='padding:20px;'><font color='red'>*</font> 手机号码 :" +
-				"<input type='text' id='newMobile' name='newMobile' rows='1' cols='12'/>" +
-				"</div>";
-		var submit = function (v, h, f) {
-			// 密码
-			if (!regMobile.test(f.newMobile)) {
-				$.jBox.tip("请输入正确的手机号码", 'error', {focusId: "newMobile"});
-				return false;
-			}
-			$.post("${ctx}/user/newCmShop/updateMobile", {'mobile': f.newMobile, 'id': id}, function (data) {
-				if (true == data.success) {
-					$.jBox.tip(data.msg, 'info');
-					$("#searchForm").submit();
-				} else {
-					$.jBox.tip(data.msg, 'error');
-				}
-			}, "JSON");//这里返回的类型有:json,html,xml,text
-		};
-		$.jBox(html, {title: "确定修改手机号码?", submit: submit});
-	}
-
-	function offline(userId) {
-		$.jBox.confirm("确定下线该供应商吗?","提示",function(v,h,f){
 			if(v === 1){
-				window.location.href="${ctx}/user/newCmShop/offline?userID="+userId;
+				window.location.href="${ctx}/user/newCmShop/Removethelastfee?shopID="+shopId+"&linkMan="+linkMan;
 			}
 		} ,{ buttons: {  '确定': 1,'取消':2}});
 	}
+	function offoceb(id,linkMan) {
+		$.jBox.confirm("确定取消免除该供应商上架费吗??","提示",function(v,h,f){
 
-	function online(userId) {
-		$.jBox.confirm("确定上线该供应商吗?","提示",function(v,h,f){
 			if(v === 1){
-				window.location.href="${ctx}/user/newCmShop/online?userID="+userId;
+				window.location.href="${ctx}/user/newCmShop/Removethelast?receiptID="+id+"&linkMan="+linkMan;
 			}
 		} ,{ buttons: {  '确定': 1,'取消':2}});
 	}
-
-	/**
-	 * 供应商审核
-	 * */
-	function auditShop(shopId,userId,townID,address,name,linkMan,contractMobile) {
-		if(null == townID || "" == townID || "" == address || null == address){
-			alertx("地址尚未填写,请先编辑地址再进行审核");
-			return;
-		}
-		if(null == name || "" == name){
-			alertx("公司名称尚未填写,请先编辑公司名称再进行审核");
-			return;
-		}
-		if(null == linkMan || "" == linkMan){
-			alertx("联系人尚未尚未填写,请先编辑联系人再进行审核");
-			return;
-		}
-		if(null == contractMobile || "" == contractMobile){
-			alertx("手机号尚未填写,请先编辑手机号再进行审核");
-			return;
-		}
-		var html = "<div id='auditBox'>"
-				+ "   <div class='bd-row'>"
-				+ "       <span><font color='red'>*</font>审核:</span>"
-				+ "       <select name='auditStatus' id='auditStatus'>"
-				+ "           <option value='1'>审核通过</option>"
-				+ "           <option value='2'>审核未通过</option>"
-				+ "       <select/>"
-				+ "   </div>"
-				+ "   <div id='auditNopass' style='display: none;'>"
-				+ "       <div class='bd-row'>"
-				+ "           <span><font color='red'>*</font>原因:</span>"
-				+ "           <div class='auditCheckBox'>"
-				+ "               <label><input name='auditCheckBox' type='checkbox' value='入驻资质不达标'><span>入驻资质不达标</span></label>"
-				+ "               <label><input name='auditCheckBox' type='checkbox' value='品牌评估不通过'><span>品牌评估不通过</span></label>"
-				+ "               <label><input name='auditCheckBox' type='checkbox' value='相关证照不清晰'><span>相关证照不清晰</span></label>"
-				+ "               <label><input name='auditCheckBox' type='checkbox' value='企业经营异常'><span>企业经营异常</span></label>"
-				+ "               <label><input name='auditCheckBox' type='checkbox' value='其他'><span>其他</span></label>"
-				+ "           </div>"
-				+ "       </div>"
-				+ "       <div class='bd-row'>"
-				+ "           <span></span>"
-				+ "           <div class='auditNote'>"
-				+ "               <textarea name='auditNote' placeholder='可以补充其它原因,最多50个字'></textarea>"
-				+ "               <p class='err-tip' style='display:none;margin-left:-55px;color:red;'>请选择审核未通过的原因</p>"
-				+ "           </div>"
-				+ "       </div>"
-				+ "   </div>"
-				+ "</div>";
-		var submit = function (v, h, f) {
-			if (f.auditStatus == '') {
-				$.jBox.tip("请选择状态", 'error', {focusId: "auditStatus"});
-				return false;
-			} else if (f.auditStatus == 2 && f.auditNote == '' && !f.auditCheckBox) {
-				$.jBox.tip("请选择审核未通过的原因", 'error', {focusId: "auditNote"});
-				return false;
-			} else if (f.auditStatus == 2 && f.auditNote.length > 50) {
-				$.jBox.tip("内容过长", 'error', {focusId: "auditNote"});
-				return false;
-			}
-			var auditText = f.auditCheckBox ? (f.auditCheckBox.toString() + ',' + f.auditNote) : f.auditNote;
-
-			$.post("${ctx}/user/newCmShop/auditShopInfo", {
-				'auditStatus': f.auditStatus,
-				'shopId': shopId,
-				'userId': userId,
-				'auditNote': auditText
-			}, function (data) {
-				console.log( data.success)
-				console.log( true == data.success)
-				if (true == data.success) {
-					$.jBox.tip(data.msg, 'info');
-					// $("#searchForm").submit();
-					window.location.href = "${ctx}/user/newCmShop/";
-				} else {
-					$.jBox.tip(data.msg, 'error');
-				}
-			}, "JSON");//这里返回的类型有:json,html,xml,text
-		};
-		$.jBox(html, {title: "审核", submit: submit});
-	}
-
-	// 审核
-	$(document).on("change", "#auditStatus", function () {
-		if ($("#auditStatus").val() == 2) {
-			$("#auditNopass").show();
-		} else {
-			$("#auditNopass").hide();
-		}
-	});
-
 </script>
 </body>
 </html>

+ 8 - 8
src/main/webapp/WEB-INF/views/modules/user/newCmShopForm.jsp

@@ -760,14 +760,14 @@
                     </c:if>
                 </td>
 
-                <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-                    <span><b><font color="red">*</font>是否已缴纳维护费:</b></span>
-                    <form:select path="maintenanceFee" class="input-medium required" onclick="changeMaintenceFee()">
-                        <form:option value="" label="请选择"/>
-                        <form:option value="1" label="已缴纳"/>
-                        <form:option value="0" label="未缴纳"/>
-                    </form:select>
-                </td>
+<%--                <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--%>
+<%--                    <span><b><font color="red">*</font>是否已缴纳维护费:</b></span>--%>
+<%--                    <form:select path="maintenanceFee" class="input-medium required" onclick="changeMaintenceFee()">--%>
+<%--                        <form:option value="" label="请选择"/>--%>
+<%--                        <form:option value="1" label="已缴纳"/>--%>
+<%--                        <form:option value="0" label="未缴纳"/>--%>
+<%--                    </form:select>--%>
+<%--                </td>--%>
 <%--                <td>&nbsp;&nbsp;--%>
 <%--                    <span class="maintenanceDate1">--%>
 <%--							<span><b>缴纳时间:</b></span>--%>

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/user/newCmShopList.jsp

@@ -310,7 +310,7 @@
 					<a href="javascript:void(0);" onclick="updatePwd(${newCmShop.userID})">重置密码</a>
 				</c:if>
 				<a href="${ctx}/user/newCmShop/viewOperationUser?shopID=${newCmShop.shopID}&userID=${newCmShop.userID}&name=${newCmShop.name}">查看运营人员</a>
-				<a href="">缴纳费用记录</a>
+				<a href="${ctx}/user/newCmShop/maintenanceList?shopID=${newCmShop.shopID}&shopName=${newCmShop.name}">上架费记录</a>
 			</td></shiro:hasPermission>
 		</tr>
 	</c:forEach>