Browse Source

[fix] 基础资料模块

修改仓库信息前端列表页面:
修改公司信息列表页面表头的按钮,去掉之前的修改按钮,和删除按钮、其他按钮采用统一样式;新增操作栏,操作栏引用$.table.dropdownToggle方法;仓库备注和仓库地址引用$.table.tooltip方法,隐藏部分内容
仓库后端实体类和get、set方法去掉多余的:defalt_itemclass字段
mapper.xml对应的方法去掉defalt_itemclass字段
修复仓库新增报错问题:修改仓库新增的mapper.xml方法,修改仓库管理人字段不一致问题
dev
liuxiaoxu 1 month ago
parent
commit
36da757e6b
  1. 25
      ruoyi-admin/src/main/java/com/ruoyi/stock/domain/StockInfo.java
  2. 21
      ruoyi-admin/src/main/resources/mapper/stock/StockInfoMapper.xml
  3. 71
      ruoyi-admin/src/main/resources/templates/stock/stockInfo/stockInfo.html

25
ruoyi-admin/src/main/java/com/ruoyi/stock/domain/StockInfo.java

@ -37,15 +37,11 @@ public class StockInfo extends BaseEntity
@Excel(name = "仓库管理人")
private String stockManager;
@Excel(name = "仓库管理人电话")
private String stockManagerPhone;
/** 仓库备注 */
@Excel(name = "仓库备注")
private String stockMemo;
/** */
private String defaltItemclass;
/** 录入时间 */
@Excel(name = "录入时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
@ -105,16 +101,6 @@ public class StockInfo extends BaseEntity
this.stockMemo = stockMemo;
}
public void setDefaltItemclass(String defaltItemclass)
{
this.defaltItemclass = defaltItemclass;
}
public String getDefaltItemclass()
{
return defaltItemclass;
}
public Date getFirstAddTime() {
return firstAddTime;
}
@ -131,13 +117,6 @@ public class StockInfo extends BaseEntity
this.updateInfoTime = updateInfoTime;
}
public String getStockManagerPhone() {
return stockManagerPhone;
}
public void setStockManagerPhone(String stockManagerPhone) {
this.stockManagerPhone = stockManagerPhone;
}
@Override
public String toString() {
@ -146,10 +125,8 @@ public class StockInfo extends BaseEntity
.append("stockNO", getStockNO())
.append("stockName", getStockName())
.append("stockAddr", getStockAddr())
.append("stockmanager", getStockManager())
.append("stockManagerPhone", getStockManagerPhone())
.append("stockManager", getStockManager())
.append("stockmemo", getStockMemo())
.append("defaltItemclass", getDefaltItemclass())
.append("firstAddTime", getFirstAddTime())
.append("updateInfoTime", getUpdateInfoTime())
.toString();

21
ruoyi-admin/src/main/resources/mapper/stock/StockInfoMapper.xml

@ -11,15 +11,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="stockAddr" column="stockAddr" />
<result property="stockManager" column="stockmanager" />
<result property="stockMemo" column="stockmemo" />
<result property="stockManagerPhone" column="stock_manager_phone" />
<result property="defaltItemclass" column="defalt_itemclass" />
<result property="firstAddTime" column="first_add_time" />
<result property="updateInfoTime" column="update_info_time" />
</resultMap>
<sql id="selectStockInfoVo">
select stock_id,StockNo, Stockname, stockAddr, stockmanager,stock_manager_phone, stockmemo,
defalt_itemclass, first_add_time, update_info_time from stock_info
select stock_id,
StockNo,
Stockname,
stockAddr,
stockmanager,
stockmemo,
first_add_time,
update_info_time
from stock_info
</sql>
<select id="selectStockInfoList" parameterType="StockInfo" resultMap="StockInfoResult">
@ -55,19 +60,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="stockName != null and stockName != ''">Stockname,</if>
<if test="stockAddr != null and stockAddr != ''">stockAddr,</if>
<if test="stockManager != null">stockmanager,</if>
<if test="stockManagerPhone != null">stock_manager_phone,</if>
<if test="stockMemo != null">stockmemo,</if>
<if test="defaltItemclass != null">defalt_itemclass,</if>
<if test="firstAddTime != null">first_add_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="stockNO != null and stockNO != ''">#{stockNO},</if>
<if test="stockName != null and stockName != ''">#{stockName},</if>
<if test="stockAddr != null and stockAddr != ''">#{stockAddr},</if>
<if test="stockManager != null">#{stockmanager},</if>
<if test="stockManagerPhone != null">#{stockManagerPhone},</if>
<if test="stockManager != null">#{stockManager},</if>
<if test="stockMemo != null">#{stockMemo},</if>
<if test="defaltItemclass != null">#{defaltItemclass},</if>
<if test="firstAddTime != null">#{firstAddTime},</if>
</trim>
</insert>
@ -79,9 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="stockName != null and stockName != ''">Stockname = #{stockName},</if>
<if test="stockAddr != null and stockAddr != ''">StockAddr = #{stockAddr},</if>
<if test="stockManager != null">stockmanager = #{stockManager},</if>
<if test="stockManagerPhone != null">stock_manager_phone = #{stockManagerPhone},</if>
<if test="stockMemo != null">stockmemo = #{stockMemo},</if>
<if test="defaltItemclass != null">defalt_itemclass = #{defaltItemclass},</if>
<if test="updateInfoTime != null">update_info_time = #{updateInfoTime},</if>
</trim>
where stock_id = #{stockId}

71
ruoyi-admin/src/main/resources/templates/stock/stockInfo/stockInfo.html

@ -39,13 +39,13 @@
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="stock:stockInfo:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="stock:stockInfo:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="stock:stockInfo:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="exportExcel()" shiro:hasPermission="stock:stockInfo:export">
<!-- <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="stock:stockInfo:edit">-->
<!-- <i class="fa fa-edit"></i> 修改-->
<!-- </a>-->
<!-- <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="stock:stockInfo:remove">-->
<!-- <i class="fa fa-remove"></i> 删除-->
<!-- </a>-->
<a class="btn btn-success" onclick="exportExcel()" shiro:hasPermission="stock:stockInfo:export">
<i class="fa fa-download"></i> 导出
</a>
</div>
@ -72,38 +72,47 @@
columns: [
{checkbox: true},
{title: '仓库id',field: 'stockId',visible: false},
{title: '仓库编号',field: 'stockNO',},
{title: '仓库名',field: 'stockName',},
{title: '仓库地址',field: 'stockAddr',},
{title: '仓库管理人',field: 'stockManager',},
{title: '仓库管理人电话',field: 'stockManagerPhone',},
{title: '仓库备注',field: 'stockMemo',},
{title: '录入时间',field: 'firstAddTime',
{title: '仓库编号',field: 'stockNO', align: 'center',},
{title: '仓库名',field: 'stockName',align: 'center',},
{title: '仓库地址',field: 'stockAddr',align: 'center',
formatter: function (value, row, index) {
// console.log(row)
if (value == null) {return " ";}
else {return value;}
return $.table.tooltip(value,5,"open");
}
},
{title: '上次修改时间',field: 'updateInfoTime',
{title: '仓库管理人',field: 'stockManager',align: 'center',},
// {title: '仓库管理人电话',field: 'stockManagerPhone',align: 'center',},
{title: '仓库备注',field: 'stockMemo',align: 'center',
formatter: function (value, row, index){
if (value == null) {return " ";}
else {
var vArr = value.split(',')
return vArr[0];
}
return $.table.tooltip(value,5,"open")
}
}
// {
// title: '操作',
// align: 'center',
},
{title: '录入时间',field: 'firstAddTime',align: 'center',
// formatter: function (value, row, index) {
// // console.log(row)
// if (value == null) {return " ";}
// else {return value;}
// }
},
{title: '上次修改时间',field: 'updateInfoTime',align: 'center',
// formatter: function (value, row, index) {
// var actions = [];
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.stockNO + '\')"><i class="fa fa-edit"></i>编辑</a> ');
// actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.stockNO + '\')"><i class="fa fa-remove"></i>删除</a>');
// return actions.join('');
// if (value == null) {return " ";}
// else {
// var vArr = value.split(',')
// return vArr[0];
// }
// }
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.stockId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.stockId + '\')"><i class="fa fa-remove"></i>删除</a>');
var actionLinks = actions.join('');
return $.table.dropdownToggle(actionLinks);
}
}
]
};
$.table.init(options);

Loading…
Cancel
Save