zq-erp/src/main/java/com/matrix/system/hive/action/SysVipLabelController.java
@@ -2,6 +2,7 @@ import com.matrix.core.pojo.AjaxResult; import com.matrix.core.pojo.PaginationVO; import com.matrix.core.tools.StringUtils; import com.matrix.core.tools.WebUtil; import com.matrix.system.common.bean.SysUsers; import com.matrix.system.constance.Dictionary; @@ -15,6 +16,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.Random; @@ -85,22 +87,26 @@ int i = sysVipLabelDao.update(sysVipLabel); if (i > 0) { AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("添加成功"); AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("编辑成功"); ajaxResult.putInMap("label", sysVipLabel); return ajaxResult; } return AjaxResult.buildFailInstance("添加失败"); return AjaxResult.buildFailInstance("编辑失败"); } @RequestMapping(value = "/del") @ResponseBody public AjaxResult del(Long id) { int i = sysVipLabelDao.deleteById(id); public AjaxResult del(String keys) { List<Long> ids = StringUtils.strToCollToLong(keys, ","); int i = sysVipLabelDao.deleteByIds(ids); if (i > 0) { return AjaxResult.buildSuccessInstance("删除成功"); } } else { return AjaxResult.buildFailInstance("删除失败"); } } @RequestMapping(value = "/edit") public String edit(Long id) { zq-erp/src/main/java/com/matrix/system/hive/dao/SysVipLabelDao.java
@@ -21,6 +21,8 @@ int deleteById(@Param("id") Long id); int deleteByIds(@Param("list") List<Long> list); List<SysVipLabel> selectByVipId(@Param("vipId") Long vipId); List<SysVipLabel> selectByModel(@Param("record") SysVipLabel sysVipLabel); zq-erp/src/main/resources/mybatis/mapper/hive/SysVipLabelDao.xml
@@ -121,6 +121,14 @@ where id=#{id} </delete> <delete id="deleteByIds" parameterType="java.util.List"> delete from sys_vip_label where id in <foreach collection="list" index="index" item="item" open="(" separator="," close=")"> #{item} </foreach> </delete> <select id="selectByVipId" resultType="com.matrix.system.hive.bean.SysVipLabel"> select b.* zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip.html
@@ -159,7 +159,6 @@ size="small" :key="tag.label" v-for="tag in tags.tags" closable :disable-transitions="false" @close="handleClose(tag)"> {{tag.label}} @@ -173,7 +172,7 @@ @keyup.enter.native="handleInputConfirm" @blur="handleInputConfirm" ></el-input> <el-button v-else class="button-new-tag" size="mini" @click="showInput">+</el-button> <!-- <el-button v-else class="button-new-tag" size="mini" @click="showInput">+</el-button>--> </el-row> <el-row style="padding: 10px 0;"> <h4>消费门店</h4> zq-erp/src/main/resources/templates/views/admin/hive/operate/label-form.html
@@ -21,7 +21,7 @@ <div class="form-group"> <label class="col-sm-2 control-label">标签<span class="text-danger">*</span></label> <div class="col-sm-4"> <input autocomplete="off" dataType="*" class="form-control" name="label" ></input> <input autocomplete="off" dataType="*" class="form-control" th:value="${obj?.label}" name="label" ></input> <div class="Validform_checktip"></div> </div> </div> @@ -44,9 +44,9 @@ var obj=/*[[${obj}]]*/ /*]]>*/ var invokeUrl=basePath+"/admin/operate/add"; if(obj.id!=null){ invokeUrl = basePath+"/admin/operate/modify"; var invokeUrl=basePath+"/admin/label/add"; if(obj!=null&& obj.id!=null){ invokeUrl = basePath+"/admin/label/modify"; } var myForm=MForm.initForm({ invokeUrl:invokeUrl, zq-erp/src/main/resources/templates/views/admin/hive/operate/label-list.html
@@ -110,9 +110,14 @@ + '<ul class="dropdown-menu" role="menu">' + '<li><a href="javascript:void(0)" style="display:' + value + '" onClick="lookInfo(\'' + '" onClick="openEdit(\'' + value + '\')" title="编辑">查看</a></li>' + '\')" title="编辑">编辑</a></li>' + '<li><a href="javascript:void(0)" style="display:' + value + '" onClick="myGrid.delItem(\'' + value + '\')" title="删除">删除</a></li>' + '</ul>' + '</div>'; html += ''; return html; } @@ -126,6 +131,16 @@ content : [ basePath+'/admin/label/edit'] }); } function openEdit(id) { layer.open({ type : 2, title : "添加标签", area : [ MUI.SIZE_L, '400px' ], maxmin : true, content : [ basePath+'/admin/label/edit?id=' + id] }); } </script> </body> </html>