feat:标签更换

master
wanghao 3 weeks ago
parent 876e5574d4
commit 9f2316cac7

@ -0,0 +1,128 @@
package com.ruoyi.manager.controller;
import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.manager.domain.RecordBaseketChangeRfid;
import com.ruoyi.manager.service.IRecordBaseketChangeRfidService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* RFIDController
*
* @author ruoyi
* @date 2026-05-29
*/
@Controller
@RequestMapping("/manager/change_rfid")
public class RecordBaseketChangeRfidController extends BaseController
{
private String prefix = "manager/change_rfid";
@Autowired
private IRecordBaseketChangeRfidService recordBaseketChangeRfidService;
@RequiresPermissions("manager:change_rfid:view")
@GetMapping()
public String change_rfid()
{
return prefix + "/change_rfid";
}
/**
* RFID
*/
@RequiresPermissions("manager:change_rfid:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(RecordBaseketChangeRfid recordBaseketChangeRfid)
{
startPage();
List<RecordBaseketChangeRfid> list = recordBaseketChangeRfidService.selectRecordBaseketChangeRfidList(recordBaseketChangeRfid);
return getDataTable(list);
}
/**
* RFID
*/
@RequiresPermissions("manager:change_rfid:export")
@Log(title = "资产RFID更换记录", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(RecordBaseketChangeRfid recordBaseketChangeRfid)
{
List<RecordBaseketChangeRfid> list = recordBaseketChangeRfidService.selectRecordBaseketChangeRfidList(recordBaseketChangeRfid);
ExcelUtil<RecordBaseketChangeRfid> util = new ExcelUtil<RecordBaseketChangeRfid>(RecordBaseketChangeRfid.class);
return util.exportExcel(list, "资产RFID更换记录数据");
}
/**
* RFID
*/
@RequiresPermissions("manager:change_rfid:add")
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
* RFID
*/
@RequiresPermissions("manager:change_rfid:add")
@Log(title = "资产RFID更换记录", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(RecordBaseketChangeRfid recordBaseketChangeRfid)
{
return toAjax(recordBaseketChangeRfidService.insertRecordBaseketChangeRfid(recordBaseketChangeRfid));
}
/**
* RFID
*/
@RequiresPermissions("manager:change_rfid:edit")
@GetMapping("/edit/{objid}")
public String edit(@PathVariable("objid") Long objid, ModelMap mmap)
{
RecordBaseketChangeRfid recordBaseketChangeRfid = recordBaseketChangeRfidService.selectRecordBaseketChangeRfidByObjid(objid);
mmap.put("recordBaseketChangeRfid", recordBaseketChangeRfid);
return prefix + "/edit";
}
/**
* RFID
*/
@RequiresPermissions("manager:change_rfid:edit")
@Log(title = "资产RFID更换记录", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(RecordBaseketChangeRfid recordBaseketChangeRfid)
{
return toAjax(recordBaseketChangeRfidService.updateRecordBaseketChangeRfid(recordBaseketChangeRfid));
}
/**
* RFID
*/
@RequiresPermissions("manager:change_rfid:remove")
@Log(title = "资产RFID更换记录", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(recordBaseketChangeRfidService.deleteRecordBaseketChangeRfidByObjids(ids));
}
}

@ -0,0 +1,109 @@
package com.ruoyi.manager.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* RFID record_baseket_change_rfid
*
* @author ruoyi
* @date 2026-05-29
*/
public class RecordBaseketChangeRfid extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 自增主键 */
private Long objid;
/** 资产ID */
@Excel(name = "资产ID")
private Long basketId;
/** 货筐RFID(旧) */
@Excel(name = "货筐RFID(旧)")
private String basketEpc;
/** 货筐RFID(新) */
@Excel(name = "货筐RFID(新)")
private String basketEpc2;
/** 更换情况 */
@Excel(name = "更换情况")
private String changeType;
// @Excel(name = "gpsW")
private String gpsLocation;
public String getGpsLocation() {
return gpsLocation;
}
public void setGpsLocation(String gpsLocation) {
this.gpsLocation = gpsLocation;
}
public void setObjid(Long objid)
{
this.objid = objid;
}
public Long getObjid()
{
return objid;
}
public void setBasketId(Long basketId)
{
this.basketId = basketId;
}
public Long getBasketId()
{
return basketId;
}
public void setBasketEpc(String basketEpc)
{
this.basketEpc = basketEpc;
}
public String getBasketEpc()
{
return basketEpc;
}
public void setBasketEpc2(String basketEpc2)
{
this.basketEpc2 = basketEpc2;
}
public String getBasketEpc2()
{
return basketEpc2;
}
public void setChangeType(String changeType)
{
this.changeType = changeType;
}
public String getChangeType()
{
return changeType;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("objid", getObjid())
.append("basketId", getBasketId())
.append("basketEpc", getBasketEpc())
.append("basketEpc2", getBasketEpc2())
.append("changeType", getChangeType())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.toString();
}
}

@ -0,0 +1,61 @@
package com.ruoyi.manager.mapper;
import java.util.List;
import com.ruoyi.manager.domain.RecordBaseketChangeRfid;
/**
* RFIDMapper
*
* @author ruoyi
* @date 2026-05-29
*/
public interface RecordBaseketChangeRfidMapper
{
/**
* RFID
*
* @param objid RFID
* @return RFID
*/
public RecordBaseketChangeRfid selectRecordBaseketChangeRfidByObjid(Long objid);
/**
* RFID
*
* @param recordBaseketChangeRfid RFID
* @return RFID
*/
public List<RecordBaseketChangeRfid> selectRecordBaseketChangeRfidList(RecordBaseketChangeRfid recordBaseketChangeRfid);
/**
* RFID
*
* @param recordBaseketChangeRfid RFID
* @return
*/
public int insertRecordBaseketChangeRfid(RecordBaseketChangeRfid recordBaseketChangeRfid);
/**
* RFID
*
* @param recordBaseketChangeRfid RFID
* @return
*/
public int updateRecordBaseketChangeRfid(RecordBaseketChangeRfid recordBaseketChangeRfid);
/**
* RFID
*
* @param objid RFID
* @return
*/
public int deleteRecordBaseketChangeRfidByObjid(Long objid);
/**
* RFID
*
* @param objids
* @return
*/
public int deleteRecordBaseketChangeRfidByObjids(String[] objids);
}

@ -0,0 +1,61 @@
package com.ruoyi.manager.service;
import java.util.List;
import com.ruoyi.manager.domain.RecordBaseketChangeRfid;
/**
* RFIDService
*
* @author ruoyi
* @date 2026-05-29
*/
public interface IRecordBaseketChangeRfidService
{
/**
* RFID
*
* @param objid RFID
* @return RFID
*/
public RecordBaseketChangeRfid selectRecordBaseketChangeRfidByObjid(Long objid);
/**
* RFID
*
* @param recordBaseketChangeRfid RFID
* @return RFID
*/
public List<RecordBaseketChangeRfid> selectRecordBaseketChangeRfidList(RecordBaseketChangeRfid recordBaseketChangeRfid);
/**
* RFID
*
* @param recordBaseketChangeRfid RFID
* @return
*/
public int insertRecordBaseketChangeRfid(RecordBaseketChangeRfid recordBaseketChangeRfid);
/**
* RFID
*
* @param recordBaseketChangeRfid RFID
* @return
*/
public int updateRecordBaseketChangeRfid(RecordBaseketChangeRfid recordBaseketChangeRfid);
/**
* RFID
*
* @param objids RFID
* @return
*/
public int deleteRecordBaseketChangeRfidByObjids(String objids);
/**
* RFID
*
* @param objid RFID
* @return
*/
public int deleteRecordBaseketChangeRfidByObjid(Long objid);
}

@ -0,0 +1,96 @@
package com.ruoyi.manager.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.manager.mapper.RecordBaseketChangeRfidMapper;
import com.ruoyi.manager.domain.RecordBaseketChangeRfid;
import com.ruoyi.manager.service.IRecordBaseketChangeRfidService;
import com.ruoyi.common.core.text.Convert;
/**
* RFIDService
*
* @author ruoyi
* @date 2026-05-29
*/
@Service
public class RecordBaseketChangeRfidServiceImpl implements IRecordBaseketChangeRfidService
{
@Autowired
private RecordBaseketChangeRfidMapper recordBaseketChangeRfidMapper;
/**
* RFID
*
* @param objid RFID
* @return RFID
*/
@Override
public RecordBaseketChangeRfid selectRecordBaseketChangeRfidByObjid(Long objid)
{
return recordBaseketChangeRfidMapper.selectRecordBaseketChangeRfidByObjid(objid);
}
/**
* RFID
*
* @param recordBaseketChangeRfid RFID
* @return RFID
*/
@Override
public List<RecordBaseketChangeRfid> selectRecordBaseketChangeRfidList(RecordBaseketChangeRfid recordBaseketChangeRfid)
{
return recordBaseketChangeRfidMapper.selectRecordBaseketChangeRfidList(recordBaseketChangeRfid);
}
/**
* RFID
*
* @param recordBaseketChangeRfid RFID
* @return
*/
@Override
public int insertRecordBaseketChangeRfid(RecordBaseketChangeRfid recordBaseketChangeRfid)
{
recordBaseketChangeRfid.setCreateTime(DateUtils.getNowDate());
return recordBaseketChangeRfidMapper.insertRecordBaseketChangeRfid(recordBaseketChangeRfid);
}
/**
* RFID
*
* @param recordBaseketChangeRfid RFID
* @return
*/
@Override
public int updateRecordBaseketChangeRfid(RecordBaseketChangeRfid recordBaseketChangeRfid)
{
return recordBaseketChangeRfidMapper.updateRecordBaseketChangeRfid(recordBaseketChangeRfid);
}
/**
* RFID
*
* @param objids RFID
* @return
*/
@Override
public int deleteRecordBaseketChangeRfidByObjids(String objids)
{
return recordBaseketChangeRfidMapper.deleteRecordBaseketChangeRfidByObjids(Convert.toStrArray(objids));
}
/**
* RFID
*
* @param objid RFID
* @return
*/
@Override
public int deleteRecordBaseketChangeRfidByObjid(Long objid)
{
return recordBaseketChangeRfidMapper.deleteRecordBaseketChangeRfidByObjid(objid);
}
}

@ -0,0 +1,84 @@
<?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.manager.mapper.RecordBaseketChangeRfidMapper">
<resultMap type="RecordBaseketChangeRfid" id="RecordBaseketChangeRfidResult">
<result property="objid" column="objid" />
<result property="basketId" column="basket_id" />
<result property="basketEpc" column="basket_epc" />
<result property="basketEpc2" column="basket_epc2" />
<result property="changeType" column="change_type" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="gpsLocation" column="gps_location" />
</resultMap>
<sql id="selectRecordBaseketChangeRfidVo">
select objid, basket_id, basket_epc, basket_epc2, change_type, create_by, create_time,gps_location from record_baseket_change_rfid
</sql>
<select id="selectRecordBaseketChangeRfidList" parameterType="RecordBaseketChangeRfid" resultMap="RecordBaseketChangeRfidResult">
<include refid="selectRecordBaseketChangeRfidVo"/>
<where>
<if test="basketId != null "> and basket_id = #{basketId}</if>
<if test="changeType != null and changeType != ''"> and change_type = #{changeType}</if>
<if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
</where>
</select>
<select id="selectRecordBaseketChangeRfidByObjid" parameterType="Long" resultMap="RecordBaseketChangeRfidResult">
<include refid="selectRecordBaseketChangeRfidVo"/>
where objid = #{objid}
</select>
<insert id="insertRecordBaseketChangeRfid" parameterType="RecordBaseketChangeRfid" useGeneratedKeys="true" keyProperty="objid">
insert into record_baseket_change_rfid
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="basketId != null">basket_id,</if>
<if test="basketEpc != null">basket_epc,</if>
<if test="basketEpc2 != null">basket_epc2,</if>
<if test="changeType != null">change_type,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="gpsLocation != null">gps_location,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="basketId != null">#{basketId},</if>
<if test="basketEpc != null">#{basketEpc},</if>
<if test="basketEpc2 != null">#{basketEpc2},</if>
<if test="changeType != null">#{changeType},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="gpsLocation != null">#{gpsLocation},</if>
</trim>
</insert>
<update id="updateRecordBaseketChangeRfid" parameterType="RecordBaseketChangeRfid">
update record_baseket_change_rfid
<trim prefix="SET" suffixOverrides=",">
<if test="basketId != null">basket_id = #{basketId},</if>
<if test="basketEpc != null">basket_epc = #{basketEpc},</if>
<if test="basketEpc2 != null">basket_epc2 = #{basketEpc2},</if>
<if test="changeType != null">change_type = #{changeType},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="gpsLocation != null">gps_location = #{gpsLocation},</if>
</trim>
where objid = #{objid}
</update>
<delete id="deleteRecordBaseketChangeRfidByObjid" parameterType="Long">
delete from record_baseket_change_rfid where objid = #{objid}
</delete>
<delete id="deleteRecordBaseketChangeRfidByObjids" parameterType="String">
delete from record_baseket_change_rfid where objid in
<foreach item="objid" collection="array" open="(" separator="," close=")">
#{objid}
</foreach>
</delete>
</mapper>

@ -0,0 +1,22 @@
-- 菜单 SQL
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('资产RFID更换记录', '2026', '1', '/manager/change_rfid', 'C', '0', 'manager:change_rfid:view', '#', 'admin', sysdate(), '', null, '资产RFID更换记录菜单');
-- 按钮父菜单ID
SELECT @parentId := LAST_INSERT_ID();
-- 按钮 SQL
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('资产RFID更换记录查询', @parentId, '1', '#', 'F', '0', 'manager:change_rfid:list', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('资产RFID更换记录新增', @parentId, '2', '#', 'F', '0', 'manager:change_rfid:add', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('资产RFID更换记录修改', @parentId, '3', '#', 'F', '0', 'manager:change_rfid:edit', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('资产RFID更换记录删除', @parentId, '4', '#', 'F', '0', 'manager:change_rfid:remove', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('资产RFID更换记录导出', @parentId, '5', '#', 'F', '0', 'manager:change_rfid:export', '#', 'admin', sysdate(), '', null, '');

@ -0,0 +1,59 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增资产RFID更换记录')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-change_rfid-add">
<div class="col-xs-12">
<div class="form-group">
<label class="col-sm-3 control-label">资产ID</label>
<div class="col-sm-8">
<input name="basketId" class="form-control" type="text">
</div>
</div>
</div>
<div class="col-xs-12">
<div class="form-group">
<label class="col-sm-3 control-label">货筐RFID(旧)</label>
<div class="col-sm-8">
<input name="basketEpc" class="form-control" type="text">
</div>
</div>
</div>
<div class="col-xs-12">
<div class="form-group">
<label class="col-sm-3 control-label">货筐RFID(新)</label>
<div class="col-sm-8">
<input name="basketEpc2" class="form-control" type="text">
</div>
</div>
</div>
<div class="col-xs-12">
<div class="form-group">
<label class="col-sm-3 control-label">更换情况:</label>
<div class="col-sm-8">
<select name="changeType" class="form-control" th:with="type=${@dict.getType('change_rfid_type')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "manager/change_rfid"
$("#form-change_rfid-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-change_rfid-add').serialize());
}
}
</script>
</body>
</html>

@ -0,0 +1,127 @@
<!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('资产RFID更换记录列表')" />
</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>资产ID</label>
<input type="text" name="basketId"/>
</li>
<li>
<label>更换情况:</label>
<select name="changeType" th:with="type=${@dict.getType('change_rfid_type')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>更换人:</label>
<input type="text" name="createBy"/>
</li>
<li class="select-time">
<label>更换时间:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreateTime]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreateTime]"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</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="manager:change_rfid:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="manager:change_rfid:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="manager:change_rfid:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="manager:change_rfid: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('manager:change_rfid:edit')}]];
var removeFlag = [[${@permission.hasPermi('manager:change_rfid:remove')}]];
var changeTypeDatas = [[${@dict.getType('change_rfid_type')}]];
var prefix = ctx + "manager/change_rfid";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "资产RFID更换记录",
columns: [{
checkbox: true
},
{
field: 'objid',
title: '自增主键',
visible: false
},
{
field: 'basketId',
title: '资产ID'
},
{
field: 'basketEpc',
title: '货筐RFID(旧)'
},
{
field: 'basketEpc2',
title: '货筐RFID(新)'
},
{
field: 'changeType',
title: '更换情况',
formatter: function(value, row, index) {
return $.table.selectDictLabel(changeTypeDatas, value);
}
},
{
field: 'createBy',
title: '更换人'
},
{
field: 'createTime',
title: '更换时间'
},
{
title: '操作',
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.objid + '\')"><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.objid + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>

@ -0,0 +1,60 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改资产RFID更换记录')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-change_rfid-edit" th:object="${recordBaseketChangeRfid}">
<input name="objid" th:field="*{objid}" type="hidden">
<div class="col-xs-12">
<div class="form-group">
<label class="col-sm-3 control-label">资产ID</label>
<div class="col-sm-8">
<input name="basketId" th:field="*{basketId}" class="form-control" type="text">
</div>
</div>
</div>
<div class="col-xs-12">
<div class="form-group">
<label class="col-sm-3 control-label">货筐RFID(旧)</label>
<div class="col-sm-8">
<input name="basketEpc" th:field="*{basketEpc}" class="form-control" type="text">
</div>
</div>
</div>
<div class="col-xs-12">
<div class="form-group">
<label class="col-sm-3 control-label">货筐RFID(新)</label>
<div class="col-sm-8">
<input name="basketEpc2" th:field="*{basketEpc2}" class="form-control" type="text">
</div>
</div>
</div>
<div class="col-xs-12">
<div class="form-group">
<label class="col-sm-3 control-label">更换情况:</label>
<div class="col-sm-8">
<select name="changeType" class="form-control" th:with="type=${@dict.getType('change_rfid_type')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{changeType}"></option>
</select>
</div>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "manager/change_rfid";
$("#form-change_rfid-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-change_rfid-edit').serialize());
}
}
</script>
</body>
</html>

@ -16,7 +16,8 @@
</li>
<li class="select-time">
<label>创建时间:</label>
<input class="time-input" id="startTime" name="params[beginCreateTime]" placeholder="开始时间"
<input class="time-input" id="startTime" name="params[beginCreateTime]"
placeholder="开始时间"
type="text"/>
<span>-</span>
<input class="time-input" id="endTime" name="params[endCreateTime]" placeholder="结束时间"
@ -24,7 +25,8 @@
</li>
<li class="select-time">
<label>接收时间:</label>
<input class="time-input" id="startTime" name="params[beginUpdateTime]" placeholder="开始时间"
<input class="time-input" id="startTime" name="params[beginUpdateTime]"
placeholder="开始时间"
type="text"/>
<span>-</span>
<input class="time-input" id="endTime" name="params[endUpdateTime]" placeholder="结束时间"
@ -93,10 +95,10 @@
sortName: "createTime",
sortOrder: "desc",
modalName: "交接任务列",
detailView: true,
onExpandRow: function (index, row, $detail) {
initTaskTable(index, row, $detail);
},
detailView: true,
onExpandRow: function (index, row, $detail) {
initTaskTable(index, row, $detail);
},
columns: [{
checkbox: true
},
@ -166,34 +168,65 @@
};
$.table.init(options);
});
initTaskTable = function (index, row, $detail) {
// 为每个展开行生成唯一的标识符
var uniqueId = 'tab-' + row.objid + '-';
var taskType = row.taskType;
var basketTypeDatas = [[${@dict.getType('basket_type')}]];
var [childTable, childTable1] = $detail.html('<div class="col-sm-12">\n' +
' <div class="tabs-container">\n' +
' <ul class="nav nav-tabs">\n' +
' <li class="active"><a data-toggle="tab" href="#' + uniqueId + '1" aria-expanded="true">待交接资产照片</a>\n' +
' </li>\n' +
' <li class=""><a data-toggle="tab" href="#' + uniqueId + '2" aria-expanded="false">' + (taskType == 1 ? '集装器/散装斗代码' : '待交接资产信息') + '</a>\n' +
' </li>\n' +
' </ul>\n' +
' <div class="tab-content">\n' +
' <div id="' + uniqueId + '1" class="tab-pane active">\n' +
'<table class="table1" style="table-layout:fixed"></table>' +
' </div>\n' +
' <div id="' + uniqueId + '2" class="tab-pane">\n' +
'<table style="table-layout:fixed"></table>' +
' </div>\n' +
' </div>\n' +
' </div>\n' +
' </div>').find('table');
// 第一个选项卡始终显示照片
$(childTable).bootstrapTable({
url: ctx + "manager/delivery_task_img/list",
initTaskTable = function (index, row, $detail) {
// 为每个展开行生成唯一的标识符(使用 deliveryTaskId 确保全局唯一)
var uniqueId = 'task-detail-tab-' + (row.deliveryTaskId || row.objid || index) + '-';
var taskType = row.taskType;
var basketTypeDatas = [[${@dict.getType('basket_type')}]];
var [childTable, childTable1] = $detail.html('<div class="col-sm-12">\n' +
' <div class="tabs-container">\n' +
' <ul class="nav nav-tabs">\n' +
' <li class="active"><a data-toggle="tab" href="#' + uniqueId + '1" aria-expanded="true">待交接资产照片</a>\n' +
' </li>\n' +
' <li class=""><a data-toggle="tab" href="#' + uniqueId + '2" aria-expanded="false">' + (taskType == 1 ? '集装器/散装斗代码' : '待交接资产信息') + '</a>\n' +
' </li>\n' +
' </ul>\n' +
' <div class="tab-content">\n' +
' <div id="' + uniqueId + '1" class="tab-pane active">\n' +
'<table class="table1" style="table-layout:fixed"></table>' +
' </div>\n' +
' <div id="' + uniqueId + '2" class="tab-pane">\n' +
'<table style="table-layout:fixed"></table>' +
' </div>\n' +
' </div>\n' +
' </div>\n' +
' </div>').find('table');
// 第一个选项卡始终显示照片
$(childTable).bootstrapTable({
url: ctx + "manager/delivery_task_img/list",
method: 'post',
sidePagination: "server",
contentType: "application/x-www-form-urlencoded",
queryParams: {
taskCode: row.taskCode,
},
columns: [
{
title: '序号',
formatter: function (value, row, index) {
return index + 1
}
},
{
field: 'imgPath',
title: '照片',
formatter: function (value, row, index) {
return $.table.imageView(value, 818, 460, null);
}
},
{
field: 'createTime',
title: '提交时间'
}
]
});
// 第二个选项卡根据taskType显示不同内容
if (taskType == 1) {
$(childTable1).bootstrapTable({
url: ctx + "manager/task_waybill/list",
method: 'post',
sidePagination: "server",
contentType: "application/x-www-form-urlencoded",
@ -208,86 +241,55 @@
}
},
{
field: 'imgPath',
title: '照片',
field: 'waybillNumber',
title: '集装器/散装斗代码'
},
// {
// field: 'basketEpc',
// title: '扫描RFID'
// },
]
});
} else {
$(childTable1).bootstrapTable({
url: ctx + "manager/delivery_task_baseket/list",
method: 'post',
sidePagination: "server",
contentType: "application/x-www-form-urlencoded",
queryParams: {
taskCode: row.taskCode,
},
columns: [
{
title: '序号',
formatter: function (value, row, index) {
return $.table.imageView(value, 818, 460, null);
return index + 1
}
},
{
field: 'baseBasketInfo.basketType',
title: '资产类型',
formatter: function (value, row, index) {
return $.table.selectDictLabel(basketTypeDatas, value);
}
},
{
field: 'baseBasketInfo.steelGrade',
title: '钢号'
},
{
field: 'baseBasketInfo.selfCode',
title: '自编号'
},
{
field: 'createTime',
title: '提交时间'
title: '绑定时间'
}
]
});
// 第二个选项卡根据taskType显示不同内容
if (taskType == 1) {
$(childTable1).bootstrapTable({
url: ctx + "manager/task_waybill/list",
method: 'post',
sidePagination: "server",
contentType: "application/x-www-form-urlencoded",
queryParams: {
taskCode: row.taskCode,
},
columns: [
{
title: '序号',
formatter: function (value, row, index) {
return index + 1
}
},
{
field: 'waybillNumber',
title: '集装器/散装斗代码'
},
// {
// field: 'basketEpc',
// title: '扫描RFID'
// },
]
});
} else {
$(childTable1).bootstrapTable({
url: ctx + "manager/delivery_task_baseket/list",
method: 'post',
sidePagination: "server",
contentType: "application/x-www-form-urlencoded",
queryParams: {
taskCode: row.taskCode,
},
columns: [
{
title: '序号',
formatter: function (value, row, index) {
return index + 1
}
},
{
field: 'baseBasketInfo.basketType',
title: '资产类型',
formatter: function (value, row, index) {
return $.table.selectDictLabel(basketTypeDatas, value);
}
},
{
field: 'baseBasketInfo.steelGrade',
title: '钢号'
},
{
field: 'baseBasketInfo.selfCode',
title: '自编号'
},
{
field: 'createTime',
title: '绑定时间'
}
]
});
}
};
}
};
</script>
</body>
</html>
Loading…
Cancel
Save