Browse Source

实现拆单查看、修改功能

lwx_dev
erdanergou 3 years ago
parent
commit
5fa29a87c4
  1. 20
      src/main/java/com/dreamchaser/depository_manage/controller/PageController.java
  2. 64
      src/main/java/com/dreamchaser/depository_manage/controller/SplitController.java
  3. 31
      src/main/java/com/dreamchaser/depository_manage/mapper/SplitUnitMapper.java
  4. 91
      src/main/java/com/dreamchaser/depository_manage/mapper/SplitUnitMapper.xml
  5. 52
      src/main/java/com/dreamchaser/depository_manage/service/SplitUnitService.java
  6. 131
      src/main/java/com/dreamchaser/depository_manage/service/impl/SplitUnitServiceImpl.java
  7. 13
      src/main/resources/templates/pages/material/material-out.html
  8. 242
      src/main/resources/templates/pages/split/split-out.html
  9. 452
      src/main/resources/templates/pages/split/split_edit.html
  10. 91
      target/classes/com/dreamchaser/depository_manage/mapper/SplitUnitMapper.xml
  11. 13
      target/classes/templates/pages/material/material-out.html

20
src/main/java/com/dreamchaser/depository_manage/controller/PageController.java

@ -71,6 +71,9 @@ public class PageController {
@Autowired @Autowired
private GroupService groupService; private GroupService groupService;
@Autowired
private SplitUnitService splitUnitService;
@GetMapping("/") @GetMapping("/")
public ModelAndView Init(HttpServletRequest request) { public ModelAndView Init(HttpServletRequest request) {
@ -374,7 +377,7 @@ public class PageController {
return mv; return mv;
} }
@GetMapping("depository-out") @GetMapping("/depository-out")
public ModelAndView depository_out(HttpServletRequest request) { public ModelAndView depository_out(HttpServletRequest request) {
UserByPort userToken = (UserByPort) request.getAttribute("userToken"); UserByPort userToken = (UserByPort) request.getAttribute("userToken");
ModelAndView mv = new ModelAndView(); ModelAndView mv = new ModelAndView();
@ -396,8 +399,21 @@ public class PageController {
return mv; return mv;
} }
@GetMapping("/split_edit")
public ModelAndView split_edit(Integer id){
if(id == null){
throw new MyException("缺少必要参数");
}
ModelAndView mv = new ModelAndView();
// 获取所进行查询的拆单详细信息
SplitInfoP splitInfoPById = splitUnitService.findSplitInfoPById(id);
mv.addObject("record",splitInfoPById);
mv.setViewName("pages/split/split_edit");
return mv;
}
@GetMapping("split-out") @GetMapping("/split_out")
public ModelAndView split_out(HttpServletRequest request) { public ModelAndView split_out(HttpServletRequest request) {
UserByPort userToken = (UserByPort) request.getAttribute("userToken"); UserByPort userToken = (UserByPort) request.getAttribute("userToken");
ModelAndView mv = new ModelAndView(); ModelAndView mv = new ModelAndView();

64
src/main/java/com/dreamchaser/depository_manage/controller/SplitController.java

@ -1,14 +1,19 @@
package com.dreamchaser.depository_manage.controller; package com.dreamchaser.depository_manage.controller;
import com.dreamchaser.depository_manage.entity.SplitInfo;
import com.dreamchaser.depository_manage.exception.MyException; import com.dreamchaser.depository_manage.exception.MyException;
import com.dreamchaser.depository_manage.pojo.RestResponse; import com.dreamchaser.depository_manage.pojo.RestResponse;
import com.dreamchaser.depository_manage.pojo.StatusInfo;
import com.dreamchaser.depository_manage.service.SplitUnitService; import com.dreamchaser.depository_manage.service.SplitUnitService;
import com.dreamchaser.depository_manage.utils.CrudUtil; import com.dreamchaser.depository_manage.utils.CrudUtil;
import com.dreamchaser.depository_manage.utils.ObjectFormatUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.List;
import java.util.Map; import java.util.Map;
@RestController @RestController
@ -43,6 +48,63 @@ public class SplitController {
*/ */
@GetMapping("/split_out") @GetMapping("/split_out")
public RestResponse splitOut(@RequestParam Map<String,Object> map,HttpServletRequest request){ public RestResponse splitOut(@RequestParam Map<String,Object> map,HttpServletRequest request){
return null; return new RestResponse(splitUnitService.findSplitInfoPByCondition(map),splitUnitService.findSplitInfoPCountByCondition(map),200);
}
/**
* 根据条件删除对应的拆单记录
* @param map 待删除数据
* @return
*/
@PostMapping("/split_del")
public RestResponse splitDel(@RequestBody Map<String,Object> map){
if(map.containsKey("id")){
Integer id = ObjectFormatUtil.toInteger(map.get("id"));
Integer integer = splitUnitService.delSplitInfoById(id);
if(Integer.compare(integer,-1) == 0){
// 如果没有删除
return new RestResponse("",666,new StatusInfo("删除失败","该拆单正在使用中,不允许进行删除操作"));
}else{
return CrudUtil.deleteHandle(1,integer);
}
}else if(map.containsKey("ids")){
List<Integer> ids = (List<Integer>) map.get("ids");
List<SplitInfo> errInfo = new ArrayList<>();
int result = 0;
for (Integer id : ids) {
Integer integer = splitUnitService.delSplitInfoById(id);
if (Integer.compare(integer, -1) == 0) {
// 如果没有删除
errInfo.add(splitUnitService.findSplitInfoById(id));
} else {
result += integer;
}
}
if(result == ids.size()){
return CrudUtil.deleteHandle(result,ids.size());
}else{
return new RestResponse(errInfo,666,new StatusInfo("删除失败","有正在使用中的拆单,不允许进行删除"));
}
}else{
throw new MyException("缺少必要参数");
}
}
/**
* 根据条件修改拆单信息
* @param map 待修改数据
* @return
*/
@PostMapping("/split_edit")
public RestResponse splitEdit(@RequestBody Map<String,Object> map){
if(map.containsKey("id")){
Integer integer = splitUnitService.updateSplitInfo(map);
return CrudUtil.putHandle(1,integer);
}else{
throw new MyException("缺少必要参数");
}
} }
} }

31
src/main/java/com/dreamchaser/depository_manage/mapper/SplitUnitMapper.java

@ -104,4 +104,35 @@ public interface SplitUnitMapper {
*/ */
List<SplitInfoP> findSplitInfoPByCondition(Map<String,Object> map); List<SplitInfoP> findSplitInfoPByCondition(Map<String,Object> map);
/**
* 根据条件查询对应拆单数量
* @param map 查询条件
* @return
*/
Integer findSplitInfoPCountByCondition(Map<String,Object> map);
/**
* 根据主键id获取拆单信息
* @param id 待查询id
* @return
*/
SplitInfo findSplitInfoById(Integer id);
/**
* 根据拆单记录id获取对应的库存处理记录
* @param sid 拆单记录id
* @return
*/
List<SplitInventory> findSplitInventoryBySid(Integer sid);
/**
* 根据主键id获取拆单详细信息
* @param id 待查询主键
* @return
*/
SplitInfoP findSplitInfoPById(Integer id);
} }

91
src/main/java/com/dreamchaser/depository_manage/mapper/SplitUnitMapper.xml

@ -51,7 +51,7 @@
</sql> </sql>
<sql id="splitInventoryAllColumns"> <sql id="splitInventoryAllColumns">
si.id,si.iid,si.sid.si.outQuantity,si.inQuantity,si.saveQuantity si.id,si.iid,si.sid,si.outQuantity,si.inQuantity,si.saveQuantity
</sql> </sql>
<sql id="splitInfoPAllColumns"> <sql id="splitInfoPAllColumns">
@ -74,6 +74,13 @@
</if> </if>
</select> </select>
<select id="findSplitInfoById" parameterType="int" resultMap="splitInfoMap">
select
<include refid="splitInfoAllColumns"/>
from `split` s
where s.id = #{id}
</select>
<select id="findSplitInventoryByIidAndSid" parameterType="map" resultMap="splitInventoryMap"> <select id="findSplitInventoryByIidAndSid" parameterType="map" resultMap="splitInventoryMap">
select select
@ -88,6 +95,13 @@
</if> </if>
</select> </select>
<select id="findSplitInventoryBySid" parameterType="int" resultMap="splitInventoryMap">
select
<include refid="splitInventoryAllColumns"/>
from `split_inventory` si
where si.sid = #{sid}
</select>
<update id="updateSplitInfo"> <update id="updateSplitInfo">
update `split` update `split`
@ -187,6 +201,14 @@
</foreach> </foreach>
</delete> </delete>
<select id="findSplitInfoPById" parameterType="int" resultMap="splitInfoPMap">
select
<include refid="splitInfoPAllColumns"/>
from findsplitInfo
where id = #{id}
</select>
<select id="findSplitInfoPByCondition" parameterType="map" resultMap="splitInfoPMap"> <select id="findSplitInfoPByCondition" parameterType="map" resultMap="splitInfoPMap">
select select
<include refid="splitInfoPAllColumns"/> <include refid="splitInfoPAllColumns"/>
@ -201,9 +223,74 @@
<if test="newUnit != null and newUnit != ''"> <if test="newUnit != null and newUnit != ''">
and newUnit like concat('%',#{newUnit},'%') and newUnit like concat('%',#{newUnit},'%')
</if> </if>
<if test="parent != null and parent != ''">
and sparent = #{parent}
</if>
<if test="mid != null and mid != ''">
and mid = #{mid}
</if>
<if test="typeName != null and typeName != ''">
and typeName like concat('%',#{typeName},'%')
</if>
<if test="version != null and version != ''">
and version = #{version}
</if>
<if test="texture != null and texture != ''">
and texture = #{texture}
</if>
<if test="mstate != null and mstate != ''">
and mstate = #{mstate}
</if>
<if test="sstate != null and sstate != ''">
and sstate = #{sstate}
</if>
<if test="mcode != null and mcode != ''">
and mcode = #{mcode}
</if>
<if test="begin != null and size != null">
LIMIT #{begin},#{size}
</if>
</select> </select>
<select id="findSplitInfoPCountByCondition" parameterType="map" resultType="int">
select
count(*)
from findsplitInfo
where 1 = 1
<if test="mname != null and mname != ''">
and mname like concat('%',#{mname},'%')
</if>
<if test="oldUnit != null and oldUnit != ''">
and oldUnit like concat('%',#{oldUnit},'%')
</if>
<if test="newUnit != null and newUnit != ''">
and newUnit like concat('%',#{newUnit},'%')
</if>
<if test="parent != null and parent != ''">
and sparent = #{parent}
</if>
<if test="mid != null and mid != ''">
and mid = #{mid}
</if>
<if test="typeName != null and typeName != ''">
and typeName like concat('%',#{typeName},'%')
</if>
<if test="version != null and version != ''">
and version = #{version}
</if>
<if test="texture != null and texture != ''">
and texture = #{texture}
</if>
<if test="mstate != null and mstate != ''">
and mstate = #{mstate}
</if>
<if test="sstate != null and sstate != ''">
and sstate = #{sstate}
</if>
<if test="mcode != null and mcode != ''">
and mcode = #{mcode}
</if>
</select>

52
src/main/java/com/dreamchaser/depository_manage/service/SplitUnitService.java

@ -2,6 +2,7 @@ package com.dreamchaser.depository_manage.service;
import com.dreamchaser.depository_manage.entity.SplitInfo; import com.dreamchaser.depository_manage.entity.SplitInfo;
import com.dreamchaser.depository_manage.entity.SplitInventory; import com.dreamchaser.depository_manage.entity.SplitInventory;
import com.dreamchaser.depository_manage.pojo.SplitInfoP;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -24,4 +25,55 @@ public interface SplitUnitService {
* @return * @return
*/ */
Integer addSplitInventory(Map<String,Object> map); Integer addSplitInventory(Map<String,Object> map);
/**
* 根据条件查询对应拆单详细信息
* @param map 查询条件
* @return
*/
List<SplitInfoP> findSplitInfoPByCondition(Map<String,Object> map);
/**
* 根据条件查询对应拆单数量
* @param map 查询条件
* @return
*/
Integer findSplitInfoPCountByCondition(Map<String,Object> map);
/**
* 根据主键删除拆单信息软删除
* @param id 待删除id
* @return
*/
Integer delSplitInfoById(Integer id);
/**
* 根据主键删除拆单信息硬删除
* @param id 待删除id
* @return
*/
Integer realDelSplitInById(Integer id);
/**
* 根据条件修改拆单信息
* @param map 待修改数据
* @return
*/
Integer updateSplitInfo(Map<String,Object> map);
/**
* 根据主键id获取拆单信息
* @param id 待查询主键
* @return
*/
SplitInfo findSplitInfoById(Integer id);
/**
* 根据主键id获取拆单详细信息
* @param id 待查询主键
* @return
*/
SplitInfoP findSplitInfoPById(Integer id);
} }

131
src/main/java/com/dreamchaser/depository_manage/service/impl/SplitUnitServiceImpl.java

@ -3,10 +3,12 @@ package com.dreamchaser.depository_manage.service.impl;
import com.dreamchaser.depository_manage.entity.Inventory; import com.dreamchaser.depository_manage.entity.Inventory;
import com.dreamchaser.depository_manage.entity.SplitInfo; import com.dreamchaser.depository_manage.entity.SplitInfo;
import com.dreamchaser.depository_manage.entity.SplitInventory; import com.dreamchaser.depository_manage.entity.SplitInventory;
import com.dreamchaser.depository_manage.exception.MyException;
import com.dreamchaser.depository_manage.mapper.DepositoryMapper; import com.dreamchaser.depository_manage.mapper.DepositoryMapper;
import com.dreamchaser.depository_manage.mapper.MaterialMapper; import com.dreamchaser.depository_manage.mapper.MaterialMapper;
import com.dreamchaser.depository_manage.mapper.PlaceMapper; import com.dreamchaser.depository_manage.mapper.PlaceMapper;
import com.dreamchaser.depository_manage.mapper.SplitUnitMapper; import com.dreamchaser.depository_manage.mapper.SplitUnitMapper;
import com.dreamchaser.depository_manage.pojo.SplitInfoP;
import com.dreamchaser.depository_manage.service.DepositoryRecordService; import com.dreamchaser.depository_manage.service.DepositoryRecordService;
import com.dreamchaser.depository_manage.service.MaterialService; import com.dreamchaser.depository_manage.service.MaterialService;
import com.dreamchaser.depository_manage.service.SplitUnitService; import com.dreamchaser.depository_manage.service.SplitUnitService;
@ -16,6 +18,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.HashMap; import java.util.HashMap;
import java.util.List;
import java.util.Map; import java.util.Map;
@ -134,4 +137,132 @@ public class SplitUnitServiceImpl implements SplitUnitService {
} }
return result; return result;
} }
/**
* 根据条件查询对应拆单详细信息
* @param map 查询条件
* @return
*/
@Override
public List<SplitInfoP> findSplitInfoPByCondition(Map<String, Object> map) {
Integer size = 10, page = 1;
if (map.containsKey("size")) {
size = ObjectFormatUtil.toInteger(map.get("size"));
map.put("size", size);
}
if (map.containsKey("page")) {
page = ObjectFormatUtil.toInteger(map.get("page"));
map.put("begin", (page - 1) * size);
}
Object state = 1;
if(map.containsKey("sstate")){
state = map.get("sstate");
}
map.put("sstate",state);
return splitUnitMapper.findSplitInfoPByCondition(map);
}
/**
* 根据条件查询对应拆单数量
* @param map 查询条件
* @return
*/
@Override
public Integer findSplitInfoPCountByCondition(Map<String, Object> map) {
return splitUnitMapper.findSplitInfoPCountByCondition(map);
}
/**
* 根据主键删除拆单信息软删除
* @param id 待删除id
* @return
*/
@Override
public Integer delSplitInfoById(Integer id) {
// 根据主键获取拆单信息
SplitInfo splitInfo = splitUnitMapper.findSplitInfoById(id);
// 根据拆单信息获取对应的拆单库存处理记录
List<SplitInventory> splitInventoryList = splitUnitMapper.findSplitInventoryBySid(id);
// 用于标志是否可以删除
boolean flag = true;
for (SplitInventory splitInventory :
splitInventoryList) {
Integer saveQuantity = splitInventory.getSaveQuantity();
if(Integer.compare(saveQuantity,0) != 0){
// 如果当前记录的剩余库存不为0
flag = false;
break;
}
}
if(flag){
// 如果可以删除
splitInfo.setState(3);
return splitUnitMapper.updateSplitInfo(splitInfo);
}else{
// 如果不可以
return -1;
}
}
/**
* 根据主键删除拆单信息硬删除
* @param id 待删除id
* @return
*/
@Override
public Integer realDelSplitInById(Integer id) {
// 根据主键获取拆单信息
SplitInfo splitInfo = splitUnitMapper.findSplitInfoById(id);
// 根据拆单信息获取对应的拆单库存处理记录
List<SplitInventory> splitInventoryList = splitUnitMapper.findSplitInventoryBySid(id);
// 用于标志是否可以删除
boolean flag = true;
for (SplitInventory splitInventory :
splitInventoryList) {
Integer saveQuantity = splitInventory.getSaveQuantity();
if(Integer.compare(saveQuantity,0) != 0){
// 如果当前记录的剩余库存不为0
flag = false;
break;
}
}
if(flag){
// 如果可以删除
return splitUnitMapper.delSplitInfoById(splitInfo.getId());
}else{
// 如果不可以
return -1;
}
}
/**
* 根据条件修改拆单信息
* @param map 待修改数据
* @return
*/
@Override
public Integer updateSplitInfo(Map<String, Object> map) {
map.put("state", map.getOrDefault("state", 2));
return splitUnitMapper.updateSplitInfo(map);
}
/**
* 根据主键id获取拆单信息
* @param id 待查询主键
* @return
*/
@Override
public SplitInfo findSplitInfoById(Integer id) {
return splitUnitMapper.findSplitInfoById(id);
}
/**
* 根据主键id获取拆单详细信息
* @param id 待查询主键
* @return
*/
@Override
public SplitInfoP findSplitInfoPById(Integer id) {
return splitUnitMapper.findSplitInfoPById(id);
}
} }

13
src/main/resources/templates/pages/material/material-out.html

@ -379,7 +379,7 @@
if (obj.event === 'detail') { if (obj.event === 'detail') {
var index = layer.open({ var index = layer.open({
title: '仓库信息详情', title: '物料信息详情',
type: 2, type: 2,
shade: 0.2, shade: 0.2,
maxmin: true, maxmin: true,
@ -467,17 +467,6 @@
where: {"parentId": parentId} where: {"parentId": parentId}
}); });
}); });
} else if (obj.event == 'manager') {
layer.open({
type: 2,
title: '仓管员信息',
shadeClose: true,
shade: false,
maxmin: true, //开启最大化最小化按钮
area: ['893px', '600px'],
content: '/ManagerViewByMid?id=' + data.id
});
} }
}); });

242
src/main/resources/templates/pages/split/split-out.html

@ -19,11 +19,20 @@
<div class="layui-form-item"> <div class="layui-form-item">
<div class="layui-inline"> <div class="layui-inline">
<label class="layui-form-label">品牌</label> <label class="layui-form-label">物料名称:</label>
<div class="layui-input-inline"> <div class="layui-input-inline">
<input type="text" class="layui-input" id="brand" name="brand" autocomplete="off"/> <input type="text" class="layui-input" id="mname" name="mname" autocomplete="off"/>
</div> </div>
</div> </div>
<div class="layui-inline">
<label class="layui-form-label">物料编码:</label>
<div class="layui-input-inline">
<input type="text" class="layui-input" id="mcode" name="mcode" autocomplete="off"/>
</div>
</div>
<div class="layui-inline"> <div class="layui-inline">
<label class="layui-form-label">状态</label> <label class="layui-form-label">状态</label>
<div class="layui-input-inline"> <div class="layui-input-inline">
@ -47,19 +56,14 @@
<!-- 状态展示--> <!-- 状态展示-->
<script type="text/html" id="switchTpl"> <script type="text/html" id="switchTpl">
<input type="checkbox" name="state" value="{{d.id}}" lay-skin="switch" lay-text="启用|禁用" <input type="checkbox" name="sstate" value="{{d.id}}" lay-skin="switch" lay-text="启用|禁用"
lay-filter="changeState" {{ d.state== 1 ? 'checked' : '' }} > lay-filter="changeState" {{ d.sstate== 1 ? 'checked' : '' }} >
</script> </script>
<script type="text/html" id="toolbarDemo"> <script type="text/html" id="toolbarDemo">
<div class="layui-btn-container"> <div class="layui-btn-container">
<button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn" lay-event="add"> 添加</button> <button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn" lay-event="add"> 添加</button>
<button class="layui-btn layui-btn-sm layui-btn-danger data-delete-btn" lay-event="delete"> 删除</button> <button class="layui-btn layui-btn-sm layui-btn-danger data-delete-btn" lay-event="delete"> 删除</button>
<button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn" lay-event="applicationIn"> 入库申请
</button>
<button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn" id="u_fileUpload"
lay-event="import">导入数据
</button>
</div> </div>
</script> </script>
@ -75,11 +79,10 @@
</div> </div>
<script src="/static/lib/layui-v2.6.3/layui.js" charset="utf-8"></script> <script src="/static/lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
<script> <script>
layui.use(['form', 'table', 'upload'], function () { layui.use(['form', 'table'], function () {
var $ = layui.jquery, var $ = layui.jquery,
form = layui.form, form = layui.form,
table = layui.table, table = layui.table;
upload = layui.upload;
table.render({ table.render({
@ -112,8 +115,19 @@
cols: [ cols: [
[ [
{type: "checkbox", width: 50}, {type: "checkbox", width: 50},
{field: 'mcode', width: 150, title: '存货编码', sort: true},
{field: 'state', title: '状态', minWidth: 80, templet: '#switchTpl'}, {field: 'mname', width: 120, title: '物料名称', sort: false},
{field: 'typeName', width: 150, title: '物料种类'},
{field: 'version', width: 200, title: '规格型号', sort: false},
{field: 'oldUnit', width: 200, title: '旧单位', sort: false},
{field: 'newUnit', width: 200, title: '新单位', sort: false},
{field: 'quantity', width: 200, title: '对应数量', sort: false},
{field: 'texture', width: 100, title: '材质'},
{field: 'brand', width: 150, title: '品牌'},
{field: 'shelfLife', width: 150, title: '保质期'},
{field: 'productionPlace', width: 150, title: '产地'},
{field: 'remark', width: 150, title: '备注'},
{field: 'sstate', title: '状态', minWidth: 80, templet: '#switchTpl'},
{title: '操作', minWidth: 200, toolbar: '#currentTableBar', align: "center"} {title: '操作', minWidth: 200, toolbar: '#currentTableBar', align: "center"}
] ]
], ],
@ -132,26 +146,19 @@
form.on('submit(data-search-btn)', function (data) { form.on('submit(data-search-btn)', function (data) {
var req = {}; var req = {};
data = data.field; data = data.field;
req.type = 1;
if (data.mname !== '') { if (data.mname !== '') {
req.mname = data.mname; req.mname = data.mname;
} }
if (data.brand !== '') { if (data.state !== '') {
req.brand = data.brand; req.sstate = data.state;
}
if (data.materialTypeId != '') {
req.materialTypeId = data.materialTypeId;
} }
if (data.state != '') { if (data.mcode !== '') {
req.state = data.state; req.mcode = data.mcode
}
if (data.code != '') {
req.code = data.code
} }
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reload('currentTableId', {
url: '/material/material', url: '/split/split_out',
page: { page: {
curr: 1 curr: 1
}, },
@ -166,13 +173,13 @@
table.on('toolbar(currentTableFilter)', function (obj) { table.on('toolbar(currentTableFilter)', function (obj) {
if (obj.event === 'add') { // 监听添加操作 if (obj.event === 'add') { // 监听添加操作
var index = layer.open({ var index = layer.open({
title: '申请提交', title: '拆单',
type: 2, type: 2,
shade: 0.2, shade: 0.2,
maxmin: true, maxmin: true,
shadeClose: true, shadeClose: true,
area: ['100%', '100%'], area: ['100%', '100%'],
content: '/material_add', content: '/split_add',
}); });
$(window).on("resize", function () { $(window).on("resize", function () {
layer.full(index); layer.full(index);
@ -188,7 +195,7 @@
if (req.ids.length > 0) { if (req.ids.length > 0) {
layer.confirm('真的删除么', {icon: 2, title: '提示'}, function (index) { layer.confirm('真的删除么', {icon: 2, title: '提示'}, function (index) {
$.ajax({ $.ajax({
url: '/material/material_del', url: '/split/split_del',
dataType: 'json', dataType: 'json',
type: 'POST', type: 'POST',
contentType: "application/json;charset=utf-8", contentType: "application/json;charset=utf-8",
@ -196,19 +203,51 @@
beforeSend: function () { beforeSend: function () {
this.layerIndex = layer.load(0, {shade: [0.5, '#393D49']}); this.layerIndex = layer.load(0, {shade: [0.5, '#393D49']});
}, },
success: function (data) { success: function (res) {
layer.close(this.layerIndex); layer.close(this.layerIndex);
if (data.status >= 300) { if (res.status >= 300) {
layer.msg(data.statusInfo.message);//失败的表情 let data = res.data;
if(data === ""){
} else { layer.msg(data.statusInfo.detail,{
icon:5,
time:1000
},function () {
table.reload('currentTableId', {
url: '/split/split_out',
page: {
curr: 1
}
}, 'data');
return false;
})
}else{
let outMessage ='';
for (let i = 0; i < data.length; i++) {
let d = data[i];
outMessage += d.mname+","
}
outMessage +='的拆单正在使用中,不允许进行删除操作';
layer.msg(outMessage,{
icon:0,
time:1000
},function () {
table.reload('currentTableId', {
url: '/split/split_out',
page: {
curr: 1
}
}, 'data');
})
}
}
else {
layer.msg("删除成功", { layer.msg("删除成功", {
icon: 6,//成功的表情 icon: 6,//成功的表情
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}); });
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reload('currentTableId', {
url: '/material/material', url: '/split/split_out',
page: { page: {
curr: 1 curr: 1
} }
@ -222,100 +261,10 @@
layer.msg("未选中记录,请确认!"); layer.msg("未选中记录,请确认!");
return false; return false;
} }
} else if (obj.event === 'applicationIn') {
// 入库申请
var checkStatus = table.checkStatus('currentTableId')
, data = checkStatus.data;
var req = {};
req.mids = [];
// 获取所有选中的id
for (i = 0, len = data.length; i < len; i++) {
req.mids[i] = data[i].id;
}
$.ajax({
url: "/material/temporaryValueForMaterial",
type: 'post',
dataType: 'json',
contentType: "application/json;charset=utf-8",
data: JSON.stringify(req),
beforeSend: function () {
this.layerIndex = layer.load(0, {shade: [0.5, '#393D49']});
},
success: function (d) {
layer.close(this.layerIndex);
if (d.status == 200) {
layer.open({
type: 2,
title: '入库',
skin: 'layui-layer-rim',
maxmin: true,
shadeClose: true, //点击遮罩关闭层
area: ['100%', '100%'],
move: '.layui-layer-title',
fixed: false,
content: '/applicationInByMaterial',
end: function () {
var index = parent.layer.getFrameIndex(window.name);
parent.layer.close(index);
}
})
}
} }
})
}
}); });
//用于导入数据
var upLoader = upload.render({
elem: "#u_fileUpload", // 绑定元素
url: '/excel/importExcelByMaterial', // 上传接口
accept: 'file', // 允许上传的格式,
before: function (obj) { //obj参数包含的信息,跟 choose回调完全一致,可参见上文。
layer.load(); //上传loading
},
exts: 'xls|xlsx|csv',
done: function (res) {
layer.closeAll('loading'); //关闭loading
//如果上传成功
var re = "";
for (let i = 0; i < res.data.errMsg.length; i++) {
var show = "<p style='color: #ff211e'>" + res.data.errMsg[i] + ":错误" + "</p>";
re += show
}
if (res.code === 200) {
for (let i = 0; i < res.data.dataList.length; i++) {
var mname = res.data.dataList[i]["mname"];
var code = res.data.dataList[i]["code"] == null || res.data.dataList[i]["code"] == undefined ? "" : res.data.dataList[i]["code"];
var version = res.data.dataList[i]["version"] == null || res.data.dataList[i]["version"] == undefined ? "" : res.data.dataList[i]["version"];
var texture = res.data.dataList[i]["texture"] == null || res.data.dataList[i]["texture"] == undefined ? "" : res.data.dataList[i]["texture"];
var unit = res.data.dataList[i]["unit"] == null || res.data.dataList[i]["unit"] == undefined ? "" : res.data.dataList[i]["unit"];
var typeId = res.data.dataList[i]["typeId"] == null || res.data.dataList[i]["typeId"] == undefined ? "" : res.data.dataList[i]["typeId"];
var show = "<p style='color: #00FF00'>" + mname + " " + version + " " + code + " " + texture + " " + unit + " " + typeId + " :成功" + "</p>";
re += show
}
layer.open({
type: 1,
skin: 'layui-layer-rim', //加上边框
area: ['500px', '500px'], //宽高
content: re
})
} else {
layer.msg(res.msg)
}
},
error: function () {
layer.closeAll('loading'); //关闭loading
var demoText = $('#demoText');
demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-xs demo-reload">重试</a>');
demoText.find('.demo-reload').on('click', function () {
upLoader.upload()
})
}
});
//监听表格复选框选择 //监听表格复选框选择
table.on('checkbox(currentTableFilter)', function (obj) { table.on('checkbox(currentTableFilter)', function (obj) {
@ -327,23 +276,23 @@
if (obj.event === 'detail') { if (obj.event === 'detail') {
var index = layer.open({ var index = layer.open({
title: '仓库信息详情', title: '拆单详情',
type: 2, type: 2,
shade: 0.2, shade: 0.2,
maxmin: true, maxmin: true,
shadeClose: true, shadeClose: true,
area: ['100%', '100%'], area: ['100%', '100%'],
content: '/material_view?id=' + data.id, content: '/split_edit?id=' + data.id,
end: function () { end: function () {
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reload('currentTableId', {
url: '/material/material', url: '/split/split_out',
page: { page: {
curr: 1 curr: 1
} }
}, 'data'); }, 'data');
} }
}); })
$(window).on("resize", function () { $(window).on("resize", function () {
layer.full(index); layer.full(index);
}); });
@ -353,7 +302,7 @@
req.id = data.id; req.id = data.id;
layer.confirm('真的删除么', {icon: 2, title: '提示'}, function (index) { layer.confirm('真的删除么', {icon: 2, title: '提示'}, function (index) {
$.ajax({ $.ajax({
url: '/material/material_del', url: '/split/split_del',
dataType: 'json', dataType: 'json',
type: 'POST', type: 'POST',
contentType: "application/json;charset=utf-8", contentType: "application/json;charset=utf-8",
@ -364,13 +313,16 @@
success: function (data) { success: function (data) {
layer.close(this.layerIndex); layer.close(this.layerIndex);
if (data.status >= 300) { if (data.status >= 300) {
layer.msg(data.statusInfo.message);//失败的表情 layer.msg(data.statusInfo.detail,{
icon:0,
time:1000
});//失败的表情
} else { } else {
obj.del(); obj.del();
layer.msg("删除成功", { layer.msg("删除成功", {
icon: 6,//成功的表情 icon: 6,//成功的表情
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 1000 //1秒关闭(如果不配置,默认是3秒)
}); });
} }
} }
@ -383,7 +335,7 @@
btn: ['继续', '取消'] //按钮 btn: ['继续', '取消'] //按钮
}, function () { }, function () {
$.ajax({ $.ajax({
url: '/material/realDeleteMaterial', url: '/split/realDeleteSplit',
dataType: 'json', dataType: 'json',
type: 'POST', type: 'POST',
contentType: "application/json;charset=utf-8", contentType: "application/json;charset=utf-8",
@ -394,7 +346,12 @@
success: function (data) { success: function (data) {
layer.close(this.layerIndex); layer.close(this.layerIndex);
if (data.status >= 300) { if (data.status >= 300) {
layer.msg(data.statusInfo.message);//失败的表情 layer.msg(data.statusInfo.message,{
icon:0,
time:1000
},function () {
return false
});//失败的表情
} else { } else {
obj.del(); obj.del();
@ -408,24 +365,13 @@
}, function () { }, function () {
// 执行重加载 // 执行重加载
table.reload('currentTableId', { table.reload('currentTableId', {
url: '/repository/warehouseRecord', url: '/split/split_out',
page: { page: {
curr: 1 curr: 1
}, },
where: {"parentId": parentId} where: {"parentId": parentId}
}); });
}); });
} else if (obj.event == 'manager') {
layer.open({
type: 2,
title: '仓管员信息',
shadeClose: true,
shade: false,
maxmin: true, //开启最大化最小化按钮
area: ['893px', '600px'],
content: '/ManagerViewByMid?id=' + data.id
});
} }
}); });
@ -437,7 +383,7 @@
} }
req["id"] = this.value; req["id"] = this.value;
$.ajax({ $.ajax({
url: "/material/material_edit", url: "/split/split_edit",
type: 'post', type: 'post',
dataType: 'json', dataType: 'json',
contentType: "application/json;charset=utf-8", contentType: "application/json;charset=utf-8",
@ -455,7 +401,7 @@
icon: 6,//成功的表情 icon: 6,//成功的表情
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
window.location = '/material_out' window.location = '/split_out'
}) })
} }
} }

452
src/main/resources/templates/pages/split/split_edit.html

@ -0,0 +1,452 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<title>拆单</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="/static/lib/layui-v2.6.3/css/layui.css" media="all">
<link rel="stylesheet" href="/static/css/public.css" media="all">
<link rel="stylesheet" href="/static/js/lay-module/step-lay/step.css" media="all">
</head>
<body>
<style>
.inputdiv {
display: flex;
background-color: #fff;
height: 38px;
line-height: 38px;
border: 1px solid rgb(238, 238, 238);
}
.layui-form-label {
padding: 9px 0px;
text-align: left;
}
.layui-input-block {
margin-left: 80px;
}
.layui-fluid {
padding-left: 0px;
padding-right: 0px;
}
.inputdiv .layui-unselect {
border-style: none;
width: 100%;
}
</style>
<div class="layuimini-container">
<div class="layuimini-main">
<fieldset class="table-search-fieldset" style="padding: 10px 2px 5px;">
<legend>物料拆单</legend>
<div class="layui-fluid">
<div class="layui-card">
<div class="layui-card-body" style="padding-left:0px;padding-right:0px">
<div>
<form class="layui-form layui-form-pane"
style="margin: 0 auto;max-width: 700px;padding-top: 5px; padding-bottom: 50px"
lay-filter="formStep">
<input name="id" style="display: none" id="id" th:value="${record.getId()}">
<div class="layui-form-item">
<label class="layui-form-label">物料名称:</label>
<div class="layui-input-block">
<div class="inputdiv">
<input type="text" placeholder="请选择物料" class="layui-input"
style="border-style: none" th:value="${record.getMname()}"
id="mname" onblur="selectMaterialByName(this)"
lay-verify="required"/>
<i class="layui-icon layui-icon-search" style="display: inline;"
id="selectMaterial" onclick="selectMaterial(this)"></i>
</div>
<input type="text" name="mid" class="layui-input" id="mid" th:value="${record.getMid()}"
style="display: none" lay-verify="required"/>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">物料编码:</label>
<div class="layui-input-block" style="margin: 0px;">
<div class="inputdiv">
<input id="code" name="code" type="text" placeholder="请填写入物料编码"
onblur="selectCode(this)" th:value="${record.getMcode()}"
class="layui-input" lay-verify="required"
style="border-style: none">
<img src="/static/images/search.ico" height="16" width="16"
id="qrCodeImg"
style="margin-top: 10px" onclick="scanCode(this)">
</div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">条形编码:</label>
<div class="layui-input-block" style="margin: 0px;">
<div class="inputdiv">
<input id="barCode" name="barCode" type="text" readonly
class="layui-input"
style="border-style: none">
<img src="/static/images/search.ico" height="16" width="16"
id="barCodeImg"
style="margin-top: 10px" onclick="scanBarCode(this)">
</div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">规格型号:</label>
<div class="layui-input-block">
<input type="text" name="version" class="layui-input" th:value="${record.getVersion()}" id="version" readonly/>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">物料类型:</label>
<div class="layui-input-block">
<input type="text" name="typeName" class="layui-input" id="typeName" readonly th:value="${record.getTypeName()}"
lay-verify="required"/>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">计量单位:</label>
<div class="layui-input-block">
<input type="text" name="oldUnit" class="layui-input" id="unit" readonly th:value="${record.getOldUnit()}"
lay-verify="required"/>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">拆单单位:</label>
<div class="layui-input-block">
<input type="text" name="newUnit" class="layui-input" id="newUnit" th:value="${record.getNewUnit()}"
lay-verify="required"/>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">对应数目:</label>
<div class="layui-input-block">
<input type="text" name="quantity" class="layui-input" id="quantity" th:value="${record.getQuantity()}"
lay-verify="number"/>
</div>
</div>
<div class="layui-form-item">
<div class="layui-input-block">
<button class="layui-btn" type="button" lay-submit lay-filter="formStep">
&emsp;提交&emsp;
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</fieldset>
</div>
</div>
<script src="/static/lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
<script src="/static/js/lay-config.js?v=1.0.4" charset="utf-8"></script>
<script>
// 通过名称查询物料
function selectMaterialByName() {
}
// 打开物料选择树
function selectMaterial() {
}
// 用于编码查询
function selectCode(obj) {
}
// 用于扫描条形码
function scanBarCode(obj) {
}
// 用于扫码入库
function scanCode(obj) {
}
layui.use(['form', 'layer'], function () {
var $ = layui.jquery,
form = layui.form,
layer = layui.layer;
let id = $("#id").val();
form.on('submit(formStep)', function (data) {
data = data.field;
data.state = 1;
$.ajax({
url:"/split/split_edit",
data:JSON.stringify(data),
dataType:"json",
type:"post",
contentType: "application/json;charset=utf-8",
success:function (res) {
layer.close(this.layerIndex);
if (data.status >= 300) {
layer.msg(data.statusInfo.detail,{
icon:6,
time:1000
},function () {
window.location="/split_edit?id="+id
});//失败的表情
} else {
layer.msg("修改成功!", {
icon: 6,//成功的表情
time: 1000
}, //1秒关闭(如果不配置,默认是3秒)
function(){
//do something
window.location="/split_edit?id="+id
});
}
}
})
});
// 通过名称查询物料
selectMaterialByName = function (obj) {
let materialName = $("#mname");
var data = materialName.val();
var req = {};
req.mname = data;
let materialId = $("#mid");
let codeValue = $("#code");
let version = $("#version");
let typeName = $("#typeName");
let unit = $("#unit");
$.ajax({
url: "/material/findMaterialByCondition",
type: "post",
dataType: 'json',
data: JSON.stringify(req),
contentType: "application/json;charset=utf-8",
success: function (d) {
if (d.count > 1) {
layer.msg("请点击右侧搜索确定物品");
materialId.val("");
codeValue.val("");
version.val("");
typeName.val("");
unit.val("");
return false;
} else if (d.count === 0) {
layer.msg("没有该物品,请确认输入是否正确");
materialId.val("");
codeValue.val("");
materialName.val("");
version.val("");
typeName.val("");
unit.val("");
return false;
} else {
var material = d.data[0];
materialName.val(material.mname);
materialId.val(material.mid);
codeValue.val(material.code);
version.val(material.version);
typeName.val(material.typeName);
unit.val(material.unit);
}
}
});
};
// 打开物料选择树
selectMaterial = function (obj) {
let mname = $("#mname").val();
mname = mname.split(",")[0];
layer.open({
type: 2,
title: '弹窗内容',
skin: 'layui-layer-rim',
maxmin: true,
shadeClose: true, //点击遮罩关闭层
area: ['70%', '70%'],
content: '/selectMaterial?mname=' + mname,
move: '.layui-layer-title',
fixed: false,
success: function (layero, index) {
let children = layero.children();
let content = $(children[1]);
let iframeChildren = $(content.children());
content.css('height', '100%');
iframeChildren.css('height', '100%');
},
end: function () {
var mid = $("#mid").val();
if (mid !== '') {
$.ajax({
url: "/material/findMatrialById?mid=" + mid,
type: "get",
dataType: 'json',
contentType: "application/json;charset=utf-8",
success: function (d) {
var material = d.data.materialById;
var code = material.code;
if (code === undefined) {
code = "";
}
$("#code").val(code);
$("#version").val(material.version);
$("#unit").val(material.unit);
$("#typeName").val(material.typeName);
var materialAndBarCodeList = material["materialAndBarCodeList"];
if (materialAndBarCodeList.length > 0) {
// 如果有对应的条形码
$("#barCode").remove();
var barCodeSelect = `
<select id="barCode" name= "barCode"></select>`;
$("#barCodeImg").before(barCodeSelect);
form.render();
$.each(materialAndBarCodeList, function (index, item) {
$("#barCode").append(new Option(item.bmcode, item.id));//往下拉菜单里添加元素
});
form.render();
}
}
});
}
}
});
};
scanCodeInStorage = function (obj) {
var objIdNumber = obj.id.split("qrCodeImg")[1];
parent.wx.scanQRCode({
desc: 'scanQRCode desc',
needResult: 1, // 默认为0,扫描结果由企业微信处理,1则直接返回扫描结果,
scanType: ["qrCode"], // 可以指定扫二维码还是条形码(一维码),默认二者都有
success: function (res) {
// 回调
var result = res.resultStr;//当needResult为1时返回处理结果
var req = {};
req.qrCode = result;
$("#qrCode" + objIdNumber).val(result);
$.ajax({
url: "/material/qywxApplicationInScanQrCode",
type: "post",
dataType: 'json',
data: JSON.stringify(req),
contentType: "application/json;charset=utf-8",
success: function (d) {
}
})
}
})
};
scanBarCode = function (obj) {
parent.wx.scanQRCode({
desc: 'scanQRCode desc',
needResult: 1, // 默认为0,扫描结果由企业微信处理,1则直接返回扫描结果,
scanType: ["barCode"], // 可以指定扫二维码还是条形码(一维码),默认二者都有
success: function (res) {
// 回调
var result = res.resultStr;//当needResult为1时返回处理结果
var req = {};
req.qrCode = result;
$.ajax({
url: "/material/qywxApplicationInScanBarCode",
type: "post",
dataType: 'json',
data: JSON.stringify(req),
contentType: "application/json;charset=utf-8",
success: function (d) {
}
})
},
error: function (res) {
if (res.errMsg.indexOf('function_not_exist') > 0) {
alert('版本过低请升级')
}
alert(res)
}
});
};
// 用于实现通过编码查询物料
selectCode = function (obj) {
// 输入code
var code = obj.value;
var req = {};
req.code = code;
req.type = "in";
$.ajax({
url: "/material/findMatrialByCode",
type: "get",
dataType: 'json',
data: req,
contentType: "application/json;charset=utf-8",
success: function (d) {
var d = d.data;
if (d == null) {
layer.msg("没有该编码,请确认是否输入正确");
$("#mname").val("");
$("#mid").val("");
$("#code").val("");
$("#barCode").val("");
$("#version").val("");
$("#unit").val("");
$("#typeName").val("");
form.render();
} else {
$("#mname").val(d.mname);
$("#mid").val( d.mid);
$("#version").val(d.version);
$("#unit").val(d.unit);
$("#typeName").val(d.typeName);
// 获取物料与条形码的对应关系
var materialAndBarCodeList = d["materialAndBarCodeList"];
if (materialAndBarCodeList.length > 0) {
// 如果有对应的条形码
$("#barCode").remove();
$(".layui-unselect").remove();
var barCodeSelect = `
<select id="barCode" name="barCode">
</select>`;
$("#barCodeImg").before(barCodeSelect);
form.render();
$.each(materialAndBarCodeList, function (index, item) {
$("#barCode").append(new Option(item.bmcode, item.bmcode));//往下拉菜单里添加元素
});
form.render();
} else {
$("#barCode").remove();
$(".layui-unselect").remove();
}
}
}
});
};
})
</script>
</body>
</html>

91
target/classes/com/dreamchaser/depository_manage/mapper/SplitUnitMapper.xml

@ -51,7 +51,7 @@
</sql> </sql>
<sql id="splitInventoryAllColumns"> <sql id="splitInventoryAllColumns">
si.id,si.iid,si.sid.si.outQuantity,si.inQuantity,si.saveQuantity si.id,si.iid,si.sid,si.outQuantity,si.inQuantity,si.saveQuantity
</sql> </sql>
<sql id="splitInfoPAllColumns"> <sql id="splitInfoPAllColumns">
@ -74,6 +74,13 @@
</if> </if>
</select> </select>
<select id="findSplitInfoById" parameterType="int" resultMap="splitInfoMap">
select
<include refid="splitInfoAllColumns"/>
from `split` s
where s.id = #{id}
</select>
<select id="findSplitInventoryByIidAndSid" parameterType="map" resultMap="splitInventoryMap"> <select id="findSplitInventoryByIidAndSid" parameterType="map" resultMap="splitInventoryMap">
select select
@ -88,6 +95,13 @@
</if> </if>
</select> </select>
<select id="findSplitInventoryBySid" parameterType="int" resultMap="splitInventoryMap">
select
<include refid="splitInventoryAllColumns"/>
from `split_inventory` si
where si.sid = #{sid}
</select>
<update id="updateSplitInfo"> <update id="updateSplitInfo">
update `split` update `split`
@ -187,6 +201,14 @@
</foreach> </foreach>
</delete> </delete>
<select id="findSplitInfoPById" parameterType="int" resultMap="splitInfoPMap">
select
<include refid="splitInfoPAllColumns"/>
from findsplitInfo
where id = #{id}
</select>
<select id="findSplitInfoPByCondition" parameterType="map" resultMap="splitInfoPMap"> <select id="findSplitInfoPByCondition" parameterType="map" resultMap="splitInfoPMap">
select select
<include refid="splitInfoPAllColumns"/> <include refid="splitInfoPAllColumns"/>
@ -201,9 +223,74 @@
<if test="newUnit != null and newUnit != ''"> <if test="newUnit != null and newUnit != ''">
and newUnit like concat('%',#{newUnit},'%') and newUnit like concat('%',#{newUnit},'%')
</if> </if>
<if test="parent != null and parent != ''">
and sparent = #{parent}
</if>
<if test="mid != null and mid != ''">
and mid = #{mid}
</if>
<if test="typeName != null and typeName != ''">
and typeName like concat('%',#{typeName},'%')
</if>
<if test="version != null and version != ''">
and version = #{version}
</if>
<if test="texture != null and texture != ''">
and texture = #{texture}
</if>
<if test="mstate != null and mstate != ''">
and mstate = #{mstate}
</if>
<if test="sstate != null and sstate != ''">
and sstate = #{sstate}
</if>
<if test="mcode != null and mcode != ''">
and mcode = #{mcode}
</if>
<if test="begin != null and size != null">
LIMIT #{begin},#{size}
</if>
</select> </select>
<select id="findSplitInfoPCountByCondition" parameterType="map" resultType="int">
select
count(*)
from findsplitInfo
where 1 = 1
<if test="mname != null and mname != ''">
and mname like concat('%',#{mname},'%')
</if>
<if test="oldUnit != null and oldUnit != ''">
and oldUnit like concat('%',#{oldUnit},'%')
</if>
<if test="newUnit != null and newUnit != ''">
and newUnit like concat('%',#{newUnit},'%')
</if>
<if test="parent != null and parent != ''">
and sparent = #{parent}
</if>
<if test="mid != null and mid != ''">
and mid = #{mid}
</if>
<if test="typeName != null and typeName != ''">
and typeName like concat('%',#{typeName},'%')
</if>
<if test="version != null and version != ''">
and version = #{version}
</if>
<if test="texture != null and texture != ''">
and texture = #{texture}
</if>
<if test="mstate != null and mstate != ''">
and mstate = #{mstate}
</if>
<if test="sstate != null and sstate != ''">
and sstate = #{sstate}
</if>
<if test="mcode != null and mcode != ''">
and mcode = #{mcode}
</if>
</select>

13
target/classes/templates/pages/material/material-out.html

@ -379,7 +379,7 @@
if (obj.event === 'detail') { if (obj.event === 'detail') {
var index = layer.open({ var index = layer.open({
title: '仓库信息详情', title: '物料信息详情',
type: 2, type: 2,
shade: 0.2, shade: 0.2,
maxmin: true, maxmin: true,
@ -467,17 +467,6 @@
where: {"parentId": parentId} where: {"parentId": parentId}
}); });
}); });
} else if (obj.event == 'manager') {
layer.open({
type: 2,
title: '仓管员信息',
shadeClose: true,
shade: false,
maxmin: true, //开启最大化最小化按钮
area: ['893px', '600px'],
content: '/ManagerViewByMid?id=' + data.id
});
} }
}); });

Loading…
Cancel
Save