Commit 61de956e authored by 黄辉勇's avatar 黄辉勇

''

parent b8cd9f92
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="5c5955e8-a367-4538-8b22-1de6f1006fed" name="Default Changelist" comment=""> <list default="true" id="5c5955e8-a367-4538-8b22-1de6f1006fed" name="Default Changelist" comment="" />
<change beforePath="$PROJECT_DIR$/jeethink/jeethink-admin/src/main/resources/application-druid.yml" beforeDir="false" afterPath="$PROJECT_DIR$/jeethink/jeethink-admin/src/main/resources/application-druid.yml" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
...@@ -53,6 +51,7 @@ ...@@ -53,6 +51,7 @@
<workItem from="1616574462972" duration="29000" /> <workItem from="1616574462972" duration="29000" />
<workItem from="1616632945811" duration="940000" /> <workItem from="1616632945811" duration="940000" />
<workItem from="1622697665026" duration="399000" /> <workItem from="1622697665026" duration="399000" />
<workItem from="1622766545211" duration="14000" />
</task> </task>
<servers /> <servers />
</component> </component>
...@@ -64,9 +63,9 @@ ...@@ -64,9 +63,9 @@
<screen x="0" y="0" width="1280" height="680" /> <screen x="0" y="0" width="1280" height="680" />
</state> </state>
<state x="96" y="0" key="#com.intellij.execution.impl.EditConfigurationsDialog/0.0.1280.680@0.0.1280.680" timestamp="1615181359695" /> <state x="96" y="0" key="#com.intellij.execution.impl.EditConfigurationsDialog/0.0.1280.680@0.0.1280.680" timestamp="1615181359695" />
<state x="421" y="99" key="FileChooserDialogImpl" timestamp="1622697674680"> <state x="421" y="99" key="FileChooserDialogImpl" timestamp="1622766552117">
<screen x="0" y="0" width="1280" height="680" /> <screen x="0" y="0" width="1280" height="680" />
</state> </state>
<state x="421" y="99" key="FileChooserDialogImpl/0.0.1280.680@0.0.1280.680" timestamp="1622697674680" /> <state x="421" y="99" key="FileChooserDialogImpl/0.0.1280.680@0.0.1280.680" timestamp="1622766552117" />
</component> </component>
</project> </project>
\ No newline at end of file
This diff is collapsed.
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > <html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head> <head>
<th:block th:include="include :: header('修改产品')" /> <th:block th:include="include :: header('修改产品')" />
</head> </head>
<body class="white-bg"> <body class="white-bg">
......
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > <html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head> <head>
<th:block th:include="include :: header('修改产品')" /> <th:block th:include="include :: header('修改产品')" />
</head> </head>
<body class="white-bg"> <body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-product-edit" th:object="${wmsProduct}"> <form class="form-horizontal m" id="form-product-edit" th:object="${wmsProduct}">
<input name="productId" th:field="*{productId}" type="hidden"> <input name="productId" th:field="*{productId}" type="hidden">
...@@ -90,11 +93,58 @@ ...@@ -90,11 +93,58 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-xs-3 control-label">备注:</label> <label class="col-xs-3 control-label">备注:</label>
<div class="col-xs-8"> <div class="col-xs-8">
<textarea name="remark" maxlength="500" class="form-control" rows="3">[[*{remark}]]</textarea> <textarea name="remark" maxlength="500" class="form-control" rows="3">[[*{remark}]]</textarea>
</div> </div>
</div> </div>
<div>
<p onclick="tableChange()"><a href="javascript:;">添加</a></p>
<!-- <button onclick="tableChange()">Copy Text</button>-->
<table class="table table-bordered" id="tables">
<thead>
<tr>
<th>名称</th>
<th></th>
<th>操作</th>
</tr>
</thead>
<tbody id="tbody">
<tr>
<td align="center">
<input type="text" name="NO[]" size="2" />
</td>
<td align="center">
<input type="text" name="serial_number[]" />
</td>
<td>
<input type="button" id="Button2" onClick="deltr(this)" value="删行">
</td>
</tr>
</tbody>
</table>
<script type="text/javascript">
//添加表格
function tableChange() {
var tableHtml ="";
tableHtml += '<tr>'
+'<td align="center"><input type="text" name="NO[]" size="2" /> </td>'
+'<td align="center"><input type="text" name="serial_number[]"/></td>'
+'<td><input type="button" onClick="deltr(this)" value="删行"></td>'
+'</tr>';
$("#tbody").append(tableHtml) ; //在表格后面添加一行
}
function deltr(opp) {
var length = $("#tbody tr").length;
if (length <= 1) {
alert("至少保留一行");
} else {
$(opp).parent().parent().remove();//移除当前行
}
}
</script>
</div>
</form> </form>
</div> </div>
<div class="row"> <div class="row">
...@@ -104,7 +154,9 @@ ...@@ -104,7 +154,9 @@
</div> </div>
</div> </div>
<th:block th:include="include :: footer" /> <th:block th:include="include :: footer" />
<script th:inline="javascript"> <script th:inline="javascript">
var argsList = []
var prefix = ctx + "crm/product"; var prefix = ctx + "crm/product";
$("#form-product-edit").validate({ $("#form-product-edit").validate({
focusCleanup: true focusCleanup: true
...@@ -136,7 +188,7 @@ ...@@ -136,7 +188,7 @@
var url = prefix + '/image/'+productId; var url = prefix + '/image/'+productId;
$.modal.open("修改产品图片", url); $.modal.open("修改产品图片", url);
} }
/*产品管理-编辑-选择产品分类树*/ /*产品管理-编辑-选择产品分类树*/
function selectCatogory() { function selectCatogory() {
var treeId = $("#treeId").val(); var treeId = $("#treeId").val();
...@@ -161,5 +213,6 @@ ...@@ -161,5 +213,6 @@
} }
} }
</script> </script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -6,6 +6,8 @@ import com.jeethink.common.annotation.Excel; ...@@ -6,6 +6,8 @@ import com.jeethink.common.annotation.Excel;
import com.jeethink.common.annotation.Excel.Type; import com.jeethink.common.annotation.Excel.Type;
import com.jeethink.common.core.domain.BaseEntity; import com.jeethink.common.core.domain.BaseEntity;
import java.util.List;
/** /**
* 产品对象 wms_product * 产品对象 wms_product
* *
...@@ -69,6 +71,9 @@ public class WmsProduct extends BaseEntity ...@@ -69,6 +71,9 @@ public class WmsProduct extends BaseEntity
/** 产品图片 */ /** 产品图片 */
private String productImage; private String productImage;
/***产品属性**/
private List<WmsProductAttribute> wmsProductAttributes;
public void setProductId(Long productId) public void setProductId(Long productId)
{ {
this.productId = productId; this.productId = productId;
...@@ -205,6 +210,14 @@ public class WmsProduct extends BaseEntity ...@@ -205,6 +210,14 @@ public class WmsProduct extends BaseEntity
} }
public List<WmsProductAttribute> getWmsProductAttributes() {
return wmsProductAttributes;
}
public void setWmsProductAttributes(List<WmsProductAttribute> wmsProductAttributes) {
this.wmsProductAttributes = wmsProductAttributes;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
......
package com.jeethink.crm.domain;
import com.jeethink.common.annotation.Excel;
import com.jeethink.common.annotation.Excel.Type;
import com.jeethink.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 产品对象 wms_product_attribute
*
* @author jeethink
* @date 2020-03-12
*/
public class WmsProductAttribute extends BaseEntity
{
private static final long serialVersionUID = 1L;
/**属性ID**/
private Long attributeId;
/** 产品ID */
private Long productId;
/***属性名**/
private String name;
/**属性值**/
private String attrVal;
/** 删除标识 */
private String delFlag;
public Long getAttributeId() {
return attributeId;
}
public void setAttributeId(Long attributeId) {
this.attributeId = attributeId;
}
public Long getProductId() {
return productId;
}
public void setProductId(Long productId) {
this.productId = productId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getAttrVal() {
return attrVal;
}
public void setAttrVal(String attrVal) {
this.attrVal = attrVal;
}
public String getDelFlag() {
return delFlag;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
}
package com.jeethink.crm.mapper;
import com.jeethink.crm.domain.WmsProduct;
import com.jeethink.crm.domain.WmsProductAttribute;
import java.util.List;
/***
* 产品属性
*/
public interface WmsProductAttributeMapper {
/***
* 新增产品属性
* @param productAttribute
* @return
*/
public int insertWmsProductAttribute(WmsProductAttribute productAttribute);
/***
* 删除产品属性
* @param attributeId
* @return
*/
public int deleteWmsProductAttributeById(Long attributeId);
/***
* 批量删除属性
* @param attributeIds
* @return
*/
public int deleteWmsProductAttributeByIds(String[] attributeIds);
/***
* 删除产品属性
* @param prodId
* @return
*/
public int deleteWmsProductAttributeByProdId(Long prodId);
}
<?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.jeethink.crm.mapper.WmsProductAttributeMapper">
<resultMap type="WmsProductAttribute" id="WmsProductAttributeResult">
<id property="attributeId" column="attribute_id" />
<result property="productId" column="product_id" />
<result property="name" column="name" />
<result property="attrVal" column="attr_val" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<insert id="insertWmsProductAttribute" parameterType="WmsProductAttribute" useGeneratedKeys="true" keyProperty="attributeId">
insert into wms_product_attribute
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="productId != null ">product_id,</if>
<if test="name != null ">name,</if>
<if test="attrVal != null and productName != ''">attr_val,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="createTime != null ">create_time,</if>
<if test="updateBy != null and updateBy != ''">update_by,</if>
<if test="updateTime != null ">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="productId != null ">#{productId},</if>
<if test="name != null ">#{name},</if>
<if test="attrVal != null and attrVal != ''">#{attrVal},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="createTime != null ">#{createTime},</if>
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
<if test="updateTime != null ">#{updateTime},</if>
</trim>
</insert>
<delete id="deleteWmsProductAttributeById" parameterType="Long">
delete from wms_product_attribute where attribute_id = #{attributeId}
</delete>
<delete id="deleteWmsProductAttributeByIds" parameterType="String">
delete from wms_product_attribute where attribute_id in
<foreach item="attributeId" collection="array" open="(" separator="," close=")">
#{attributeId}
</foreach>
</delete>
<delete id="deleteWmsProductAttributeByProdId" parameterType="Long">
delete from wms_product_attribute where product_id = #{prodId}
</delete>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment