| | |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | hostEq(wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | else { |
| | | wrapper.orderBy("update_time", false); |
| | | } |
| | | return R.ok(orderService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | // if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | // else { |
| | | // wrapper.orderBy("update_time", false); |
| | | // } |
| | | wrapper.orderBy("create_time",false); |
| | | Page<Order> orderPage = orderService.selectPage(new Page<>(curr, limit), wrapper); |
| | | return R.ok(orderPage); |
| | | } |
| | | |
| | | private void convert(Map<String, Object> map, EntityWrapper wrapper){ |
| | |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(pickoutService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | Page<Pickout> pickoutPage = pickoutService.selectPage(new Page<>(curr, limit), wrapper); |
| | | |
| | | return R.ok(pickoutPage); |
| | | } |
| | | |
| | | private void convert(Map<String, Object> map, EntityWrapper wrapper){ |
| | |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.common.DateUtils; |
| | | import zy.cloud.wms.manager.entity.Pickout; |
| | | import zy.cloud.wms.manager.entity.PickoutDetl; |
| | | import zy.cloud.wms.manager.service.PickoutDetlService; |
| | | import com.core.annotations.ManagerAuth; |
| | |
| | | import zy.cloud.wms.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import zy.cloud.wms.manager.service.PickoutService; |
| | | |
| | | import java.util.*; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private PickoutDetlService pickoutDetlService; |
| | | @Autowired |
| | | private PickoutService pickoutService; |
| | | |
| | | @RequestMapping(value = "/pickoutDetl/{id}/auth") |
| | | @ManagerAuth |
| | |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(pickoutDetlService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | Page<PickoutDetl> pickoutDetlPage = pickoutDetlService.selectPage(new Page<>(curr, limit), wrapper); |
| | | |
| | | return R.ok(pickoutDetlPage); |
| | | } |
| | | |
| | | private void convert(Map<String, Object> map, EntityWrapper wrapper){ |
| | |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.common.DateUtils; |
| | | import com.core.exception.CoolException; |
| | | import zy.cloud.wms.common.model.PickOutDto; |
| | | import zy.cloud.wms.manager.entity.Wave; |
| | | import zy.cloud.wms.manager.entity.WaveDetl; |
| | |
| | | @RequestMapping(value = "/wave/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | /** |
| | | * 控管与初始化 |
| | | */ |
| | | HashSet<String> orders = new HashSet<>(); |
| | | for (Long id : ids){ |
| | | List<WaveDetl> waveDetls = waveDetlService.selectList(new EntityWrapper<WaveDetl>() |
| | | Wave wave = waveService.selectOne(new EntityWrapper<Wave>() |
| | | .eq("id", id)); |
| | | if (Cools.isEmpty(wave)) { |
| | | throw new CoolException("找不到该波次"); |
| | | } |
| | | if (wave.getStatus() != 0){ |
| | | throw new CoolException("仅支持撤销'待处理'状态的订单"); |
| | | } |
| | | List<WaveDetl> waveDetls = waveDetlService.selectList(new EntityWrapper<WaveDetl>() |
| | | .eq("wave_id", id)); |
| | | |
| | | for (WaveDetl waveDetl : waveDetls) { |
| | | |
| | | String orderNos = waveDetl.getOrderNos(); |
| | |
| | | }); |
| | | /* 表格2搜索 */ |
| | | form.on('submit(orderTbSearch)', function (data) { |
| | | |
| | | insTb2.reload({where: data.field, page: {curr: 1}}); |
| | | return false; |
| | | }); |
| | | /* 表格2重置 */ |
| | | form.on('submit(orderTbReset)', function (data) { |
| | | $("#orderNo").val(""); |
| | | insTb2.reload({where: null,page: {curr: 1}}); |
| | | return false; |
| | | }); |
| | |
| | | var pageCurr; |
| | | var currPick; |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).use(['table','laydate', 'form', 'admin'], function(){ |
| | |
| | | table.on('tool(leftTable)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | case 'complete': |
| | | complete(data); |
| | | case 'printOrder': |
| | | printPick(data); |
| | | break; |
| | | case "del": |
| | | var ids = [data.id]; |
| | |
| | | /* 监听行单击事件 */ |
| | | var selObj; |
| | | table.on('row(leftTable)', function (obj) { |
| | | currPick = obj.data.id; |
| | | selObj = obj; |
| | | obj.tr.addClass('layui-table-click').siblings().removeClass('layui-table-click'); |
| | | tableIns.reload({where: {head_id: obj.data.id}, page: {curr: 1}}); |
| | | |
| | | }); |
| | | |
| | | /* 删除 */ |
| | |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | |
| | | if (res.code === 200){ |
| | | |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | leftTB.reload({where: null,page: {curr: 1}}); |
| | | tableIns.reload({where: null,page: {curr: 1}}); |
| | | } |
| | | }) |
| | | }); |
| | |
| | | leftTB.reload({where: {wrk_no: data.field.docName}}); |
| | | return false; |
| | | }); |
| | | // 重置 |
| | | form.on('submit(leftReset)', function (data) { |
| | | |
| | | leftTB.reload({where: null,page: {curr: 1}}); |
| | | $("#docName").val(""); |
| | | tableReload(false); |
| | | }); |
| | | |
| | | function printPick(data){ |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | limit(); |
| | | } |
| | | }); |
| | | /* 表格2搜索 */ |
| | | form.on('submit(rightSearch)', function (data) { |
| | | |
| | | tableIns.reload({where: data.field , page: {curr: 1}}); |
| | | return false; |
| | | }); |
| | | // /* 表格2搜索 */ |
| | | // form.on('submit(rightSearch)', function (data) { |
| | | // |
| | | // tableIns.reload({where: data.field , page: {curr: 1}}); |
| | | // return false; |
| | | // }); |
| | | // // 监听排序事件 |
| | | // table.on('sort(pickout)', function (obj) { |
| | | // var searchData = {}; |
| | |
| | | // }); |
| | | // |
| | | // |
| | | // // 搜索 |
| | | // form.on('submit(search)', function (data) { |
| | | // pageCurr = 1; |
| | | // tableReload(false); |
| | | // }); |
| | | // |
| | | // // 重置 |
| | | // form.on('submit(reset)', function (data) { |
| | | // pageCurr = 1; |
| | | // clearFormVal($('#search-box')); |
| | | // tableReload(false); |
| | | // }); |
| | | // 搜索 |
| | | form.on('submit(rightSearch)', function (data) { |
| | | data.field.head_id = currPick; |
| | | tableIns.reload({ |
| | | where: data.field, |
| | | page: {curr: 1} |
| | | }); |
| | | }); |
| | | |
| | | // 重置 |
| | | form.on('submit(reset)', function (data) { |
| | | |
| | | tableIns.reload({where: null,page: {curr: 1}}); |
| | | $("#matnr").val(""); |
| | | tableReload(false); |
| | | }); |
| | | // |
| | | // 时间选择器 |
| | | function layDateRender() { |
| | |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: {curr: pageCurr} |
| | |
| | | function stockOut(mData, data){ |
| | | |
| | | console.log(mData); |
| | | layer.confirm('确定生成该波次的拣货单?(不可逆)', { |
| | | layer.confirm('确定生成该波次的拣货单?', { |
| | | skin: 'layui-layer-admin', |
| | | shade: .1 |
| | | }, function (i) { |
| | |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.closeAll(); |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">订单编号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input name="order_no" class="layui-input" placeholder="输入订单编号"/> |
| | | <input name="order_no" class="layui-input" id="orderNo" placeholder="输入订单编号"/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline">  |
| | |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body" style="padding: 10px;"> |
| | | <!-- 表格工具栏1 --> |
| | | <form class="layui-form toolbar"> |
| | | <div class="layui-form toolbar"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline" style="max-width: 140px;"> |
| | | <input name="docName" class="layui-input" placeholder="请输入任务号"/> |
| | | <input name="docName" id="docName" class="layui-input" placeholder="请输入任务号"/> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <button class="layui-btn icon-btn" lay-filter="leftResearch" lay-submit> |
| | | <i class="layui-icon"></i>搜索 |
| | | </button> |
| | | <button class="layui-btn icon-btn" lay-filter="leftReset" lay-submit> |
| | | <i class="layui-icon"></i>重置 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | <!-- 数据表格1 --> |
| | | <table id="leftTable" lay-filter="leftTable"></table> |
| | | </div> |
| | |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body" style="padding: 10px;"> |
| | | <!-- 表格工具栏2 --> |
| | | <form class="layui-form toolbar"> |
| | | <div class="layui-form toolbar"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">商品编码:</label> |
| | | <div class="layui-input-inline"> |
| | | <input name="matnr" class="layui-input"type="text" placeholder="编码" autocomplete="off"/> |
| | | <input name="matnr" id="matnr" class="layui-input"type="text" placeholder="编码" autocomplete="off"/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline">  |
| | |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | <!-- 数据表格2 --> |
| | | <table id="pickout" lay-filter="pickout"></table> |
| | | </div> |
| | |
| | | <div id="search-box" class="layui-form layui-card-header"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="id" placeholder="编号" autocomplete="off"> |
| | | <input class="layui-input" type="text" name="wave_no" placeholder="波次编号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <!-- 待添加 --> |