提交 5b6c2dbf 编写于 作者: doc_wei's avatar doc_wei

小程序标签属性值完成(代码生成器)

上级 231c2155
......@@ -20,4 +20,6 @@ public interface RmPropertyDao {
public int editRmPropertyMationById(Map<String, Object> map) throws Exception;
public List<Map<String, Object>> queryRmPropertyListToShow(Map<String, Object> map) throws Exception;
}
package com.skyeye.smprogram.dao;
import java.util.List;
import java.util.Map;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
public interface RmPropertyValueDao {
public List<Map<String, Object>> queryRmPropertyValueList(Map<String, Object> map, PageBounds pageBounds) throws Exception;
public int insertRmPropertyValueMation(Map<String, Object> map) throws Exception;
public Map<String, Object> queryRmPropertyValueMationByName(Map<String, Object> map) throws Exception;
public int deleteRmPropertyValueMationById(Map<String, Object> map) throws Exception;
public Map<String, Object> queryRmPropertyValueMationToEditById(Map<String, Object> map) throws Exception;
public Map<String, Object> queryRmPropertyValueMationByNameAndId(Map<String, Object> map) throws Exception;
public int editRmPropertyValueMationById(Map<String, Object> map) throws Exception;
}
......@@ -15,4 +15,6 @@ public interface RmPropertyService {
public void editRmPropertyMationById(InputObject inputObject, OutputObject outputObject) throws Exception;
public void queryRmPropertyListToShow(InputObject inputObject, OutputObject outputObject) throws Exception;
}
package com.skyeye.smprogram.service;
import com.skyeye.common.object.InputObject;
import com.skyeye.common.object.OutputObject;
public interface RmPropertyValueService {
public void queryRmPropertyValueList(InputObject inputObject, OutputObject outputObject) throws Exception;
public void insertRmPropertyValueMation(InputObject inputObject, OutputObject outputObject) throws Exception;
public void deleteRmPropertyValueMationById(InputObject inputObject, OutputObject outputObject) throws Exception;
public void queryRmPropertyValueMationToEditById(InputObject inputObject, OutputObject outputObject) throws Exception;
public void editRmPropertyValueMationById(InputObject inputObject, OutputObject outputObject) throws Exception;
}
......@@ -118,5 +118,25 @@ public class RmPropertyServiceImpl implements RmPropertyService{
outputObject.setreturnMessage("该样式属性名称已存在,不可进行二次保存");
}
}
/**
*
* @Title: queryRmPropertyListToShow
* @Description: 获取小程序样式属性供展示
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@Override
public void queryRmPropertyListToShow(InputObject inputObject, OutputObject outputObject) throws Exception {
Map<String, Object> map = inputObject.getParams();
List<Map<String, Object>> beans = rmPropertyDao.queryRmPropertyListToShow(map);
if(beans != null && !beans.isEmpty()){
outputObject.setBeans(beans);
outputObject.settotal(beans.size());
}
}
}
package com.skyeye.smprogram.service.impl;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import com.github.miemiedev.mybatis.paginator.domain.PageList;
import com.skyeye.smprogram.dao.RmPropertyValueDao;
import com.skyeye.smprogram.service.RmPropertyValueService;
import com.skyeye.common.object.InputObject;
import com.skyeye.common.object.OutputObject;
import com.skyeye.common.util.ToolUtil;
@Service
public class RmPropertyValueServiceImpl implements RmPropertyValueService{
@Autowired
private RmPropertyValueDao rmPropertyValueDao;
/**
*
* @Title: queryRmPropertyValueList
* @Description: 获取小程序样式属性值列表
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@Override
public void queryRmPropertyValueList(InputObject inputObject, OutputObject outputObject) throws Exception {
Map<String, Object> map = inputObject.getParams();
List<Map<String, Object>> beans = rmPropertyValueDao.queryRmPropertyValueList(map,
new PageBounds(Integer.parseInt(map.get("page").toString()), Integer.parseInt(map.get("limit").toString())));
PageList<Map<String, Object>> beansPageList = (PageList<Map<String, Object>>)beans;
int total = beansPageList.getPaginator().getTotalCount();
outputObject.setBeans(beans);
outputObject.settotal(total);
}
/**
*
* @Title: insertRmPropertyValueMation
* @Description: 添加小程序样式属性值信息
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@Override
public void insertRmPropertyValueMation(InputObject inputObject, OutputObject outputObject) throws Exception {
Map<String, Object> map = inputObject.getParams();
Map<String, Object> bean = rmPropertyValueDao.queryRmPropertyValueMationByName(map);
if(bean == null){
Map<String, Object> user = inputObject.getLogParams();
map.put("id", ToolUtil.getSurFaceId());
map.put("createId", user.get("id"));
map.put("createTime", ToolUtil.getTimeAndToString());
rmPropertyValueDao.insertRmPropertyValueMation(map);
}else{
outputObject.setreturnMessage("该标签属性值名称已存在,不可进行二次保存");
}
}
/**
*
* @Title: deleteRmPropertyValueMationById
* @Description: 删除小程序样式属性值信息
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@Override
public void deleteRmPropertyValueMationById(InputObject inputObject, OutputObject outputObject) throws Exception {
Map<String, Object> map = inputObject.getParams();
rmPropertyValueDao.deleteRmPropertyValueMationById(map);
}
/**
*
* @Title: queryRmPropertyValueMationToEditById
* @Description: 编辑小程序样式属性值信息时进行回显
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@Override
public void queryRmPropertyValueMationToEditById(InputObject inputObject, OutputObject outputObject) throws Exception {
Map<String, Object> map = inputObject.getParams();
Map<String, Object> bean = rmPropertyValueDao.queryRmPropertyValueMationToEditById(map);
outputObject.setBean(bean);
outputObject.settotal(1);
}
/**
*
* @Title: editRmPropertyValueMationById
* @Description: 编辑小程序样式属性值信息
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@Override
public void editRmPropertyValueMationById(InputObject inputObject, OutputObject outputObject) throws Exception {
Map<String, Object> map = inputObject.getParams();
Map<String, Object> bean = rmPropertyValueDao.queryRmPropertyValueMationByNameAndId(map);
if(bean == null){
rmPropertyValueDao.editRmPropertyValueMationById(map);
}else{
outputObject.setreturnMessage("该标签属性值名称已存在,不可进行二次保存");
}
}
}
......@@ -94,4 +94,20 @@ public class RmPropertyController {
rmPropertyService.editRmPropertyMationById(inputObject, outputObject);
}
/**
*
* @Title: queryRmPropertyListToShow
* @Description: 获取小程序样式属性供展示
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@RequestMapping("/post/RmPropertyController/queryRmPropertyListToShow")
@ResponseBody
public void queryRmPropertyListToShow(InputObject inputObject, OutputObject outputObject) throws Exception{
rmPropertyService.queryRmPropertyListToShow(inputObject, outputObject);
}
}
package com.skyeye.smprogram.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.skyeye.smprogram.service.RmPropertyValueService;
import com.skyeye.common.object.InputObject;
import com.skyeye.common.object.OutputObject;
@Controller
public class RmPropertyValueController {
@Autowired
private RmPropertyValueService rmPropertyValueService;
/**
*
* @Title: queryRmPropertyValueList
* @Description: 获取小程序样式属性值列表
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@RequestMapping("/post/RmPropertyValueController/queryRmPropertyValueList")
@ResponseBody
public void queryRmPropertyValueList(InputObject inputObject, OutputObject outputObject) throws Exception{
rmPropertyValueService.queryRmPropertyValueList(inputObject, outputObject);
}
/**
*
* @Title: insertRmPropertyValueMation
* @Description: 添加小程序样式属性值信息
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@RequestMapping("/post/RmPropertyValueController/insertRmPropertyValueMation")
@ResponseBody
public void insertRmPropertyValueMation(InputObject inputObject, OutputObject outputObject) throws Exception{
rmPropertyValueService.insertRmPropertyValueMation(inputObject, outputObject);
}
/**
*
* @Title: deleteRmPropertyValueMationById
* @Description: 删除小程序样式属性值信息
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@RequestMapping("/post/RmPropertyValueController/deleteRmPropertyValueMationById")
@ResponseBody
public void deleteRmPropertyValueMationById(InputObject inputObject, OutputObject outputObject) throws Exception{
rmPropertyValueService.deleteRmPropertyValueMationById(inputObject, outputObject);
}
/**
*
* @Title: queryRmPropertyValueMationToEditById
* @Description: 编辑小程序样式属性值信息时进行回显
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@RequestMapping("/post/RmPropertyValueController/queryRmPropertyValueMationToEditById")
@ResponseBody
public void queryRmPropertyValueMationToEditById(InputObject inputObject, OutputObject outputObject) throws Exception{
rmPropertyValueService.queryRmPropertyValueMationToEditById(inputObject, outputObject);
}
/**
*
* @Title: editRmPropertyValueMationById
* @Description: 编辑小程序样式属性值信息
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@RequestMapping("/post/RmPropertyValueController/editRmPropertyValueMationById")
@ResponseBody
public void editRmPropertyValueMationById(InputObject inputObject, OutputObject outputObject) throws Exception{
rmPropertyValueService.editRmPropertyValueMationById(inputObject, outputObject);
}
}
......@@ -111,4 +111,12 @@
WHERE id = #{id}
</update>
<select id="queryRmPropertyListToShow" parameterType="java.util.Map" resultType="java.util.Map">
SELECT
a.id,
CONCAT(a.title, '-->', a.property_tag) name
FROM
rm_property a
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.skyeye.smprogram.dao.RmPropertyValueDao">
<select id="queryRmPropertyValueList" parameterType="java.util.Map" resultType="java.util.Map">
SELECT
a.id,
a.title,
a.property_value propertyValue,
b.title propertyTitle,
CONVERT(a.create_time, char) createTime
FROM
rm_property_value a
LEFT JOIN rm_property b ON a.property_id = b.id
WHERE 1 = 1
<if test="title != '' and title != null">
AND a.title LIKE '%${title}%'
</if>
<if test="propertyValue != '' and propertyValue != null">
AND a.property_value LIKE '%${propertyValue}%'
</if>
<if test="propertyId != '' and propertyId != null">
AND a.property_id = #{propertyId}
</if>
ORDER BY a.create_time DESC
</select>
<select id="queryRmPropertyValueMationByName" parameterType="java.util.Map" resultType="java.util.Map">
SELECT
a.id,
a.title
FROM
rm_property_value a
WHERE a.title = #{title}
</select>
<insert id="insertRmPropertyValueMation" parameterType="java.util.Map">
INSERT into rm_property_value
(id, title, property_value, property_id, create_id, create_time)
VALUES
(#{id}, #{title}, #{propertyValue}, #{propertyId}, #{createId}, #{createTime})
</insert>
<delete id="deleteRmPropertyValueMationById" parameterType="java.util.Map">
DELETE
FROM
rm_property_value
WHERE
id = #{id}
</delete>
<select id="queryRmPropertyValueMationToEditById" parameterType="java.util.Map" resultType="java.util.Map">
SELECT
a.id,
a.title,
a.property_value propertyValue,
a.property_id propertyId
FROM
rm_property_value a
WHERE a.id = #{id}
</select>
<select id="queryRmPropertyValueMationByNameAndId" parameterType="java.util.Map" resultType="java.util.Map">
SELECT
a.id,
a.title
FROM
rm_property_value a
WHERE a.id != #{id}
AND a.title = #{title}
</select>
<update id="editRmPropertyValueMationById" parameterType="java.util.Map">
UPDATE rm_property_value
<set>
title = #{title},
<if test="propertyValue != '' and propertyValue != null">
property_value = #{propertyValue},
</if>
<if test="propertyId != '' and propertyId != null">
property_id = #{propertyId},
</if>
</set>
WHERE id = #{id}
</update>
</mapper>
\ No newline at end of file
......@@ -360,6 +360,32 @@
<property id="jsRelyOn" name="jsRelyOn" ref="" var="js依赖的js包"/>
<property id="propertyUnit" name="propertyUnit" ref="" var="样式属性单位"/>
</url>
<url id="rmproperty006" path="/post/RmPropertyController/queryRmPropertyListToShow" val="获取小程序样式属性供展示" allUse="1">
</url>
<url id="rmpropertyvalue001" path="/post/RmPropertyValueController/queryRmPropertyValueList" val="获取小程序样式属性值列表" allUse="1">
<property id="limit" name="limit" ref="required,num" var="分页参数,每页多少条数据" />
<property id="page" name="page" ref="required,num" var="分页参数,第几页"/>
<property id="title" name="title" ref="" var="样式属性值标题"/>
<property id="propertyValue" name="propertyValue" ref="" var="样式属性标签值"/>
<property id="propertyId" name="propertyId" ref="" var="所属属性标签"/>
</url>
<url id="rmpropertyvalue002" path="/post/RmPropertyValueController/insertRmPropertyValueMation" val="添加小程序样式属性值信息" allUse="1">
<property id="title" name="title" ref="" var="样式属性值标题"/>
<property id="propertyValue" name="propertyValue" ref="required" var="样式属性标签值"/>
<property id="propertyId" name="propertyId" ref="required" var="所属属性标签"/>
</url>
<url id="rmpropertyvalue003" path="/post/RmPropertyValueController/deleteRmPropertyValueMationById" val="删除小程序样式属性值信息" allUse="1">
<property id="rowId" name="id" ref="required" var="小程序样式属性值id"/>
</url>
<url id="rmpropertyvalue004" path="/post/RmPropertyValueController/queryRmPropertyValueMationToEditById" val="编辑小程序样式属性值信息时进行回显" allUse="1">
<property id="rowId" name="id" ref="required" var="小程序样式属性值id"/>
</url>
<url id="rmpropertyvalue005" path="/post/RmPropertyValueController/editRmPropertyValueMationById" val="编辑小程序样式属性值信息" allUse="1">
<property id="rowId" name="id" ref="required" var="小程序样式属性值id"/>
<property id="title" name="title" ref="" var="样式属性值标题"/>
<property id="propertyValue" name="propertyValue" ref="required" var="样式属性标签值"/>
<property id="propertyId" name="propertyId" ref="required" var="所属属性标签"/>
</url>
<!-- 小程序系列结束 -->
......
layui.config({
base: basePath,
version: skyeyeVersion
}).define(['jquery', 'winui'], function (exports) {
winui.renderColor();
layui.use(['form'], function (form) {
var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
var $ = layui.$,
form = layui.form;
form.render();
//属性标签
showGrid({
id: "propertyId",
url: reqBasePath + "rmproperty006",
params: {},
pagination: false,
template: getFileContent('tpl/template/select-option.tpl'),
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter:function(json){
form.render('select');
}
});
form.on('submit(formAddBean)', function (data) {
//表单验证
if (winui.verifyForm(data.elem)) {
var params = {
title:$("#title").val(),
propertyValue:$("#propertyValue").val(),
propertyId:$("#propertyId").val(),
};
AjaxPostUtil.request({url:reqBasePath + "rmpropertyvalue002", params:params, type:'json', callback:function(json){
if(json.returnCode == 0){
parent.layer.close(index);
parent.refreshCode = '0';
}else{
top.winui.window.msg(json.returnMessage, {icon: 2,time: 2000});
}
}});
}
return false;
});
//取消
$("body").on("click", "#cancle", function(){
parent.layer.close(index);
});
});
});
\ No newline at end of file
layui.config({
base: basePath,
version: skyeyeVersion
}).define(['jquery', 'winui'], function (exports) {
winui.renderColor();
layui.use(['form'], function (form) {
var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
var $ = layui.$,
form = layui.form;
showGrid({
id: "showForm",
url: reqBasePath + "rmpropertyvalue004",
params: {rowId: parent.rowId},
pagination: false,
template: getFileContent('tpl/rmpropertyvalue/rmpropertyvalueeditTemplate.tpl'),
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter:function(json){
form.render();
//属性标签
showGrid({
id: "propertyId",
url: reqBasePath + "rmproperty006",
params: {},
pagination: false,
template: getFileContent('tpl/template/select-option.tpl'),
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter:function(data){
$("#propertyId").val(json.bean.propertyId);
form.render('select');
}
});
form.on('submit(formEditBean)', function (data) {
//表单验证
if (winui.verifyForm(data.elem)) {
var params = {
title:$("#title").val(),
propertyValue:$("#propertyValue").val(),
propertyId:$("#propertyId").val(),
rowId:parent.rowId,
};
AjaxPostUtil.request({url:reqBasePath + "rmpropertyvalue005", params:params, type:'json', callback:function(json){
if(json.returnCode == 0){
parent.layer.close(index);
parent.refreshCode = '0';
}else{
top.winui.window.msg(json.returnMessage, {icon: 2,time: 2000});
}
}});
}
return false;
});
}
});
//取消
$("body").on("click", "#cancle", function(){
parent.layer.close(index);
});
});
});
\ No newline at end of file
var rowId = "";
layui.config({
base: basePath,
version: skyeyeVersion
}).define(['table', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor();
var $ = layui.$,
form = layui.form,
table = layui.table;
//表格渲染
table.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: reqBasePath + 'rmpropertyvalue001',
where:{title: $("#title").val(), propertyValue: $("#propertyValue").val(), propertyId: $("#propertyId").val()},
even:true, //隔行变色
page: true,
limits: [8, 16, 24, 32, 40, 48, 56],
limit: 8,
cols: [[
{ title: '序号', type: 'numbers'},
{ field: 'title', title: '属性值别名', width: 180 },
{ field: 'propertyValue', title: '属性值', width: 180 },
{ field: 'propertyTitle', title: '所属标签', width: 180 },
{ field: 'createTime', title: '创建时间', width: 180 },
{ title: '操作', fixed: 'right', align: 'center', width: 240, toolbar: '#tableBar'}
]]
});
table.on('tool(messageTable)', function (obj) { //注:tool是工具条事件名,test是table原始容器的属性 lay-filter="对应的值"
var data = obj.data; //获得当前行数据
var layEvent = obj.event; //获得 lay-event 对应的值
if (layEvent === 'del') { //删除
del(data, obj);
}else if (layEvent === 'edit') { //编辑
edit(data);
}
});
//属性标签
showGrid({
id: "propertyId",
url: reqBasePath + "rmproperty006",
params: {},
pagination: false,
template: getFileContent('tpl/template/select-option.tpl'),
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter:function(json){
form.render('select');
}
});
//搜索表单
form.render();
form.on('submit(formSearch)', function (data) {
//表单验证
if (winui.verifyForm(data.elem)) {
loadTable();
}
return false;
});
//删除
function del(data, obj){
var msg = obj ? '确认删除标签属性值【' + obj.data.title + '】吗?' : '确认删除选中数据吗?';
layer.confirm(msg, { icon: 3, title: '删除标签属性值' }, function (index) {
layer.close(index);
//向服务端发送删除指令
AjaxPostUtil.request({url:reqBasePath + "rmpropertyvalue003", params:{rowId: data.id}, type:'json', callback:function(json){
if(json.returnCode == 0){
top.winui.window.msg("删除成功", {icon: 1,time: 2000});
loadTable();
}else{
top.winui.window.msg(json.returnMessage, {icon: 2,time: 2000});
}
}});
});
}
//编辑分类
function edit(data){
rowId = data.id;
_openNewWindows({
url: "../../tpl/rmpropertyvalue/rmpropertyvalueedit.html",
title: "编辑标签属性值",
pageId: "rmpropertyvalueedit",
callBack: function(refreshCode){
if (refreshCode == '0') {
top.winui.window.msg("操作成功", {icon: 1,time: 2000});
loadTable();
} else if (refreshCode == '-9999') {
top.winui.window.msg("操作失败", {icon: 2,time: 2000});
}
}});
}
//刷新数据
$("body").on("click", "#reloadTable", function(){
loadTable();
});
//新增
$("body").on("click", "#addBean", function(){
_openNewWindows({
url: "../../tpl/rmpropertyvalue/rmpropertyvalueadd.html",
title: "新增标签属性值",
pageId: "rmpropertyvalueadd",
callBack: function(refreshCode){
if (refreshCode == '0') {
top.winui.window.msg("操作成功", {icon: 1,time: 2000});
loadTable();
} else if (refreshCode == '-9999') {
top.winui.window.msg("操作失败", {icon: 2,time: 2000});
}
}});
});
function loadTable(){
table.reload("messageTable", {where:{title: $("#title").val(), propertyValue: $("#propertyValue").val(), propertyId: $("#propertyId").val()}});
}
exports('rmpropertyvaluelist', {});
});
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/font-awesome-4.7.0/css/font-awesome.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div style="width:600px;margin:0 auto;padding-top:20px;">
<form class="layui-form" action="" id="showForm" autocomplete="off">
<div class="layui-form-item">
<label class="layui-form-label">属性值别名</label>
<div class="layui-input-block">
<input type="text" id="title" name="title" placeholder="请输入属性值别名" class="layui-input"/>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">属性值<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="propertyValue" name="propertyValue" win-verify="required" placeholder="请输入属性值" class="layui-input"/>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">所属标签<i class="red">*</i></label>
<div class="layui-input-block">
<select id="propertyId" name="propertyId" class="layui-input" win-verify="required" lay-filter="selectParent">
<option value="">全部</option>
</select>
</div>
</div>
<div class="layui-form-item">
<div class="layui-input-block">
<button class="winui-btn" id="cancle">取消</button>
<button class="winui-btn" lay-submit lay-filter="formAddBean">保存</button>
</div>
</div>
</form>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/rmpropertyvalue/'}).use('rmpropertyvalueadd');
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/font-awesome-4.7.0/css/font-awesome.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div style="width:600px;margin:0 auto;padding-top:20px;">
<form class="layui-form" action="" id="showForm" autocomplete="off">
</form>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/rmpropertyvalue/'}).use('rmpropertyvalueedit');
</script>
</body>
</html>
\ No newline at end of file
{{#bean}}
<div class="layui-form-item">
<label class="layui-form-label">属性值别名</label>
<div class="layui-input-block">
<input type="text" id="title" name="title" placeholder="请输入属性值别名" class="layui-input" value="{{title}}"/>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">属性值<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="propertyValue" name="propertyValue" win-verify="required" placeholder="请输入属性值" class="layui-input" value="{{propertyValue}}"/>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">所属标签<i class="red">*</i></label>
<div class="layui-input-block">
<select id="propertyId" name="propertyId" class="layui-input" win-verify="required" lay-filter="selectParent">
<option value="">全部</option>
</select>
</div>
</div>
<div class="layui-form-item">
<div class="layui-input-block">
<button class="winui-btn" id="cancle">取消</button>
<button class="winui-btn" lay-submit lay-filter="formEditBean">保存</button>
</div>
</div>
{{/bean}}
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/font-awesome-4.7.0/css/font-awesome.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div class="txtcenter" style="width:100%;margin:0 auto;padding-top:20px;">
<form class="layui-form layui-form-pane" action="" autocomplete="off">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">属性标签</label>
<div class="layui-input-inline">
<select id="propertyId" name="propertyId" class="layui-input" lay-filter="selectParent">
<option value="">全部</option>
</select>
</div>
<label class="layui-form-label">属性值别名</label>
<div class="layui-input-inline">
<input type="text" id="title" name="title" placeholder="请输入属性值别名" class="layui-input" />
</div>
<label class="layui-form-label">属性值</label>
<div class="layui-input-inline">
<input type="text" id="propertyValue" name="propertyValue" placeholder="请输入属性值标签" class="layui-input" />
</div>
</div>
</div>
<div class="layui-form-item">
<div class="layui-input-block" style="margin:0;">
<button class="layui-btn" lay-submit lay-filter="formSearch">搜索</button>
</div>
</div>
</form>
</div>
<div class="winui-toolbar">
<div class="winui-tool">
<button id="reloadTable" class="winui-toolbtn"><i class="fa fa-refresh" aria-hidden="true"></i>刷新数据</button>
<button id="addBean" class="winui-toolbtn"><i class="fa fa-plus" aria-hidden="true"></i>新增标签属性值</button>
</div>
</div>
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
<script type="text/html" id="tableBar">
<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/rmpropertyvalue/'}).use('rmpropertyvaluelist');
</script>
</body>
</html>
\ No newline at end of file
......@@ -12,3 +12,17 @@ showGrid({
}
});
//属性标签
showGrid({
id: "propertyId",
url: reqBasePath + "rmproperty006",
params: {},
pagination: false,
template: getFileContent('tpl/template/select-option.tpl'),
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter:function(json){
form.render('select');
}
});
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册