feat(asset): 添加资产位置管理功能
- 创建资产位置实体类 AmsAssetLocation,包含位置编码、名称、所属仓库等字段 - 实现资产位置控制器 AmsAssetLocationController,提供增删改查和导出功能 - 开发资产位置数据访问层 AmsAssetLocationMapper 及其XML映射文件 - 实现资产位置服务层 IAmsAssetLocationService 及其业务逻辑处理 - 添加资产位置新增、编辑、查看和列表页面的前端模板 - 实现位置编码唯一性校验和引用关系检查功能 - 集成仓库选择下拉框和启用状态字典数据展示main
parent
1057e0ca3a
commit
66f350db6f
@ -0,0 +1,77 @@
|
||||
package com.ruoyi.asset.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.asset.domain.AmsAssetLocation;
|
||||
|
||||
/**
|
||||
* 资产位置Mapper接口
|
||||
*
|
||||
* @author Yangk
|
||||
* @date 2026-06-04
|
||||
*/
|
||||
public interface AmsAssetLocationMapper
|
||||
{
|
||||
/**
|
||||
* 查询资产位置
|
||||
*
|
||||
* @param locationId 资产位置主键
|
||||
* @return 资产位置
|
||||
*/
|
||||
public AmsAssetLocation selectAmsAssetLocationByLocationId(Long locationId);
|
||||
|
||||
/**
|
||||
* 查询资产位置列表
|
||||
*
|
||||
* @param amsAssetLocation 资产位置
|
||||
* @return 资产位置集合
|
||||
*/
|
||||
public List<AmsAssetLocation> selectAmsAssetLocationList(AmsAssetLocation amsAssetLocation);
|
||||
|
||||
/**
|
||||
* 根据位置编码查询资产位置
|
||||
*
|
||||
* @param locationCode 位置编码
|
||||
* @return 资产位置
|
||||
*/
|
||||
public AmsAssetLocation checkLocationCodeUnique(String locationCode);
|
||||
|
||||
/**
|
||||
* 统计资产位置被资产和业务记录引用的数量
|
||||
*
|
||||
* @param locationId 位置ID
|
||||
* @return 引用数量
|
||||
*/
|
||||
public int countLocationReferences(Long locationId);
|
||||
|
||||
/**
|
||||
* 新增资产位置
|
||||
*
|
||||
* @param amsAssetLocation 资产位置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAmsAssetLocation(AmsAssetLocation amsAssetLocation);
|
||||
|
||||
/**
|
||||
* 修改资产位置
|
||||
*
|
||||
* @param amsAssetLocation 资产位置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAmsAssetLocation(AmsAssetLocation amsAssetLocation);
|
||||
|
||||
/**
|
||||
* 删除资产位置
|
||||
*
|
||||
* @param locationId 资产位置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAmsAssetLocationByLocationId(Long locationId);
|
||||
|
||||
/**
|
||||
* 批量删除资产位置
|
||||
*
|
||||
* @param locationIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAmsAssetLocationByLocationIds(String[] locationIds);
|
||||
}
|
||||
@ -0,0 +1,69 @@
|
||||
package com.ruoyi.asset.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.asset.domain.AmsAssetLocation;
|
||||
|
||||
/**
|
||||
* 资产位置Service接口
|
||||
*
|
||||
* @author Yangk
|
||||
* @date 2026-06-04
|
||||
*/
|
||||
public interface IAmsAssetLocationService
|
||||
{
|
||||
/**
|
||||
* 查询资产位置
|
||||
*
|
||||
* @param locationId 资产位置主键
|
||||
* @return 资产位置
|
||||
*/
|
||||
public AmsAssetLocation selectAmsAssetLocationByLocationId(Long locationId);
|
||||
|
||||
/**
|
||||
* 查询资产位置列表
|
||||
*
|
||||
* @param amsAssetLocation 资产位置
|
||||
* @return 资产位置集合
|
||||
*/
|
||||
public List<AmsAssetLocation> selectAmsAssetLocationList(AmsAssetLocation amsAssetLocation);
|
||||
|
||||
/**
|
||||
* 校验位置编码是否唯一
|
||||
*
|
||||
* @param amsAssetLocation 资产位置
|
||||
* @return 结果
|
||||
*/
|
||||
public boolean checkLocationCodeUnique(AmsAssetLocation amsAssetLocation);
|
||||
|
||||
/**
|
||||
* 新增资产位置
|
||||
*
|
||||
* @param amsAssetLocation 资产位置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAmsAssetLocation(AmsAssetLocation amsAssetLocation);
|
||||
|
||||
/**
|
||||
* 修改资产位置
|
||||
*
|
||||
* @param amsAssetLocation 资产位置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAmsAssetLocation(AmsAssetLocation amsAssetLocation);
|
||||
|
||||
/**
|
||||
* 批量删除资产位置
|
||||
*
|
||||
* @param locationIds 需要删除的资产位置主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAmsAssetLocationByLocationIds(String locationIds);
|
||||
|
||||
/**
|
||||
* 删除资产位置信息
|
||||
*
|
||||
* @param locationId 资产位置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAmsAssetLocationByLocationId(Long locationId);
|
||||
}
|
||||
@ -0,0 +1,122 @@
|
||||
<?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.ruoyi.asset.mapper.AmsAssetLocationMapper">
|
||||
|
||||
<resultMap type="AmsAssetLocation" id="AmsAssetLocationResult">
|
||||
<result property="locationId" column="location_id" />
|
||||
<result property="locationCode" column="location_code" />
|
||||
<result property="locationName" column="location_name" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="warehouseName" column="warehouse_name" />
|
||||
<result property="detailAddress" column="detail_address" />
|
||||
<result property="enabled" column="enabled" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectAmsAssetLocationVo">
|
||||
select l.location_id, l.location_code, l.location_name, l.warehouse_id, w.warehouse_name, l.detail_address, l.enabled, l.create_by, l.create_time, l.update_by, l.update_time, l.remark, l.del_flag
|
||||
from ams_asset_location l
|
||||
left join ams_warehouse w on l.warehouse_id = w.warehouse_id and w.del_flag = '0'
|
||||
</sql>
|
||||
|
||||
<select id="selectAmsAssetLocationList" parameterType="AmsAssetLocation" resultMap="AmsAssetLocationResult">
|
||||
<include refid="selectAmsAssetLocationVo"/>
|
||||
<where>
|
||||
l.del_flag = '0'
|
||||
<if test="locationCode != null and locationCode != ''"> and l.location_code = #{locationCode}</if>
|
||||
<if test="locationName != null and locationName != ''"> and l.location_name like concat('%', #{locationName}, '%')</if>
|
||||
<if test="warehouseId != null "> and l.warehouse_id = #{warehouseId}</if>
|
||||
<if test="enabled != null and enabled != ''"> and l.enabled = #{enabled}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectAmsAssetLocationByLocationId" parameterType="Long" resultMap="AmsAssetLocationResult">
|
||||
<include refid="selectAmsAssetLocationVo"/>
|
||||
where l.location_id = #{locationId} and l.del_flag = '0'
|
||||
</select>
|
||||
|
||||
<select id="checkLocationCodeUnique" parameterType="String" resultMap="AmsAssetLocationResult">
|
||||
<include refid="selectAmsAssetLocationVo"/>
|
||||
where l.location_code = #{locationCode} and l.del_flag = '0' limit 1
|
||||
</select>
|
||||
|
||||
<select id="countLocationReferences" parameterType="Long" resultType="int">
|
||||
select
|
||||
(select count(1) from ams_asset where location_id = #{locationId} and del_flag = '0')
|
||||
+ (select count(1) from ams_asset_lifecycle_log where del_flag = '0' and (before_location_id = #{locationId} or after_location_id = #{locationId}))
|
||||
+ (select count(1) from ams_borrow_order_item where del_flag = '0' and (before_location_id = #{locationId} or return_location_id = #{locationId}))
|
||||
+ (select count(1) from ams_inbound_order_item where location_id = #{locationId} and del_flag = '0')
|
||||
+ (select count(1) from ams_inventory_task where location_id = #{locationId} and del_flag = '0')
|
||||
+ (select count(1) from ams_inventory_task_item where del_flag = '0' and (book_location_id = #{locationId} or inventory_location_id = #{locationId}))
|
||||
+ (select count(1) from ams_receive_order_item where before_location_id = #{locationId} and del_flag = '0')
|
||||
+ (select count(1) from ams_return_order_item where after_location_id = #{locationId} and del_flag = '0')
|
||||
+ (select count(1) from ams_transfer_order_item where del_flag = '0' and (old_location_id = #{locationId} or new_location_id = #{locationId}))
|
||||
</select>
|
||||
|
||||
<insert id="insertAmsAssetLocation" parameterType="AmsAssetLocation" useGeneratedKeys="true" keyProperty="locationId">
|
||||
insert into ams_asset_location
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="locationCode != null and locationCode != ''">location_code,</if>
|
||||
<if test="locationName != null and locationName != ''">location_name,</if>
|
||||
<if test="warehouseId != null">warehouse_id,</if>
|
||||
<if test="detailAddress != null">detail_address,</if>
|
||||
<if test="enabled != null and enabled != ''">enabled,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="locationCode != null and locationCode != ''">#{locationCode},</if>
|
||||
<if test="locationName != null and locationName != ''">#{locationName},</if>
|
||||
<if test="warehouseId != null">#{warehouseId},</if>
|
||||
<if test="detailAddress != null">#{detailAddress},</if>
|
||||
<if test="enabled != null and enabled != ''">#{enabled},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateAmsAssetLocation" parameterType="AmsAssetLocation">
|
||||
update ams_asset_location
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="locationCode != null and locationCode != ''">location_code = #{locationCode},</if>
|
||||
<if test="locationName != null and locationName != ''">location_name = #{locationName},</if>
|
||||
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
||||
<if test="detailAddress != null">detail_address = #{detailAddress},</if>
|
||||
<if test="enabled != null and enabled != ''">enabled = #{enabled},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
|
||||
</trim>
|
||||
where location_id = #{locationId}
|
||||
</update>
|
||||
|
||||
<update id="deleteAmsAssetLocationByLocationId" parameterType="Long">
|
||||
update ams_asset_location set del_flag = '1' where location_id = #{locationId}
|
||||
</update>
|
||||
|
||||
<update id="deleteAmsAssetLocationByLocationIds" parameterType="String">
|
||||
update ams_asset_location set del_flag = '1' where location_id in
|
||||
<foreach item="locationId" collection="array" open="(" separator="," close=")">
|
||||
#{locationId}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,79 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增资产位置')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-location-add">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">位置编码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="locationCode" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">位置名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="locationName" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">所属仓库:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="warehouseId" class="form-control" required>
|
||||
<option value="">请选择</option>
|
||||
<option th:each="warehouse : ${warehouseList}" th:text="${warehouse.warehouseName}" th:value="${warehouse.warehouseId}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">详细地址:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="detailAddress" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">启用状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('ams_enabled_status')}">
|
||||
<input type="radio" th:id="${'enabled_' + dict.dictCode}" name="enabled" th:value="${dict.dictValue}" th:checked="${dict.default}" required>
|
||||
<label th:for="${'enabled_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">备注:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea name="remark" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "asset/location"
|
||||
$("#form-location-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-location-add').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,80 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改资产位置')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-location-edit" th:object="${amsAssetLocation}">
|
||||
<input name="locationId" th:field="*{locationId}" type="hidden">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">位置编码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="locationCode" th:field="*{locationCode}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">位置名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="locationName" th:field="*{locationName}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">所属仓库:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="warehouseId" th:field="*{warehouseId}" class="form-control" required>
|
||||
<option value="">请选择</option>
|
||||
<option th:each="warehouse : ${warehouseList}" th:text="${warehouse.warehouseName}" th:value="${warehouse.warehouseId}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">详细地址:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="detailAddress" th:field="*{detailAddress}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">启用状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('ams_enabled_status')}">
|
||||
<input type="radio" th:id="${'enabled_' + dict.dictCode}" name="enabled" th:value="${dict.dictValue}" th:field="*{enabled}" required>
|
||||
<label th:for="${'enabled_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">备注:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea name="remark" class="form-control">[[*{remark}]]</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "asset/location";
|
||||
$("#form-location-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-location-edit').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,130 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('资产位置列表')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
<label>位置编码:</label>
|
||||
<input type="text" name="locationCode"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>位置名称:</label>
|
||||
<input type="text" name="locationName"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>所属仓库:</label>
|
||||
<select name="warehouseId">
|
||||
<option value="">所有</option>
|
||||
<option th:each="warehouse : ${warehouseList}" th:text="${warehouse.warehouseName}" th:value="${warehouse.warehouseId}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<label>启用状态:</label>
|
||||
<select name="enabled" th:with="type=${@dict.getType('ams_enabled_status')}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="asset:location:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="asset:location:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="asset:location:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="asset:location:export">
|
||||
<i class="fa fa-download"></i> 导出
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('asset:location:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('asset:location:remove')}]];
|
||||
var enabledDatas = [[${@dict.getType('ams_enabled_status')}]];
|
||||
var prefix = ctx + "asset/location";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
viewUrl: prefix + "/view/{id}",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "资产位置",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'locationId',
|
||||
title: '位置ID',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'locationCode',
|
||||
title: '位置编码'
|
||||
},
|
||||
{
|
||||
field: 'locationName',
|
||||
title: '位置名称'
|
||||
},
|
||||
{
|
||||
field: 'warehouseName',
|
||||
title: '所属仓库'
|
||||
},
|
||||
{
|
||||
field: 'detailAddress',
|
||||
title: '详细地址'
|
||||
},
|
||||
{
|
||||
field: 'enabled',
|
||||
title: '启用状态',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(enabledDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'remark',
|
||||
title: '备注'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-info btn-xs" href="javascript:void(0)" onclick="$.operate.view(\'' + row.locationId + '\')"><i class="fa fa-eye"></i>查看</a> ');
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.locationId + '\')"><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.locationId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,68 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('资产位置详细')" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="main-content">
|
||||
<form class="form-horizontal" th:object="${amsAssetLocation}">
|
||||
<h4 class="form-header h4">基本信息</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">位置编码:</label>
|
||||
<div class="col-sm-8">
|
||||
<p class="form-control-plaintext" th:text="*{locationCode}"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">位置名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<p class="form-control-plaintext" th:text="*{locationName}"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">所属仓库:</label>
|
||||
<div class="col-sm-8">
|
||||
<p class="form-control-plaintext" th:text="*{warehouseName}"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">详细地址:</label>
|
||||
<div class="col-sm-8">
|
||||
<p class="form-control-plaintext" th:text="*{detailAddress}"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">启用状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<p class="form-control-plaintext" th:text="*{@dict.getLabel('ams_enabled_status', enabled)}"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">备注:</label>
|
||||
<div class="col-sm-8">
|
||||
<p class="form-control-plaintext" th:text="*{remark}"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Reference in New Issue