| | |
| | | if (!Cools.isEmpty(orderByField)) { |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | } |
| | | wrapper.orderBy("appe_time",false); |
| | | return R.ok(taskLogService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| New file |
| | |
| | | package com.zy.asrs.enums; |
| | | |
| | | /** |
| | | * 工作状态枚举 |
| | | * 根据WrkStaus表生成对应枚举信息 |
| | | */ |
| | | public enum TaskStatusType { |
| | | |
| | | IN_START("1", "1.生成入库ID"), |
| | | DEVICE_MOVE("2", "2.设备上走"), |
| | | CRANE_IN_PROGRESS("3", "3.吊车入库中"), |
| | | INBOUND_COMPLETED("4", "4.入库完成"), |
| | | INBOUND_ARCHIVED("5", "5.库存更新完成"), |
| | | DEVICE_EXIT("6", "6.设备上退出"), |
| | | OUT_START("11", "11.生成出库ID"), |
| | | CRANE_OUT_PROGRESS("12", "12.吊车出库中"), |
| | | CRANE_EMPTY_OUT_ERROR("13", "13.吊车空出库错误"), |
| | | OUTBOUND_COMPLETED("14", "14.已出库未确认"), |
| | | OUTBOUND_ARCHIVED("15", "15.出库更新完成"), |
| | | |
| | | ; |
| | | |
| | | public Long type; |
| | | public String desc; |
| | | |
| | | TaskStatusType(String type, String desc) { |
| | | this.type = Long.valueOf(type); |
| | | this.desc = desc; |
| | | } |
| | | |
| | | } |
| | |
| | | public interface TaskMapper extends BaseMapper<Task> { |
| | | |
| | | List<Task> selectToBeCompleteData(); |
| | | |
| | | List<Task> selectToBeHistoryData(); |
| | | } |
| | |
| | | void pickWrkMast(String workNo, Long userId); |
| | | |
| | | List<Task> selectToBeCompleteData(); |
| | | |
| | | List<Task> selectToBeHistoryData(); |
| | | } |
| | |
| | | throw new CoolException("当前工作档已完成"); |
| | | } |
| | | // 入库 + 库位转移 |
| | | if (wrkMast.getWrkSts() < 4 || (wrkMast.getWrkSts() > 10 && wrkMast.getIoType() == 11)) { |
| | | if (wrkMast.getIoType() < 100){ |
| | | wrkMast.setWrkSts(4L); |
| | | // 出库 |
| | | } else if (wrkMast.getWrkSts() > 10) { |
| | |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public List<Task> selectToBeHistoryData() { |
| | | return this.baseMapper.selectToBeHistoryData(); |
| | | } |
| | | |
| | | } |
| | |
| | | package com.zy.asrs.task; |
| | | |
| | | import com.zy.asrs.entity.Task; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import com.zy.asrs.service.TaskService; |
| | | import com.zy.asrs.service.WrkMastService; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.asrs.task.handler.WorkLogHandler; |
| | |
| | | @Autowired |
| | | private WrkMastService wrkMastService; |
| | | |
| | | |
| | | @Autowired |
| | | private TaskService taskService; |
| | | |
| | | |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | private void execute() { |
| | | List<WrkMast> wrkMasts = wrkMastService.selectToBeHistoryData(); |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | private void executeTask(){ |
| | | List<Task> taskList = taskService.selectToBeHistoryData(); |
| | | if (taskList.isEmpty()) { |
| | | return; |
| | | } |
| | | for (Task task : taskList) { |
| | | ReturnT<String> result = workLogHandler.AgvStart(task); |
| | | if (!result.isSuccess()) { |
| | | log.error("工作档[workNo={}]历史档处理失败", task.getWrkNo()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | // @Scheduled(cron = "0/3 * * * * ? ") |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | private void executeTask() { |
| | | List<Task> wrkMasts = taskService.selectToBeCompleteData(); |
| | | if (wrkMasts.isEmpty()) { |
| | |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.Cools; |
| | | import com.zy.asrs.entity.WaitPakin; |
| | | import com.zy.asrs.entity.WrkDetl; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.enums.TaskStatusType; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.task.AbstractHandler; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | private OrderPakinService orderPakinService; |
| | | @Autowired |
| | | private OrderPakoutService orderPakoutService; |
| | | |
| | | @Autowired |
| | | private TaskService taskService; |
| | | @Autowired |
| | | private TaskLogService taskLogService; |
| | | @Autowired |
| | | private TaskDetlService taskDetlService; |
| | | @Autowired |
| | | private TaskDetlLogService taskDetlLogService; |
| | | |
| | | @Transactional |
| | | public ReturnT<String> start(WrkMast wrkMast) { |
| | |
| | | return SUCCESS; |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public ReturnT<String> AgvStart(Task task) { |
| | | try { |
| | | List<TaskDetl> taskDetls = taskDetlService.selectList(new EntityWrapper<TaskDetl>().eq("wrk_no", task.getWrkNo())); |
| | | // 修改订单状态 作业中 ===>> 已完成 |
| | | if (!Cools.isEmpty(taskDetls)) { |
| | | Iterator<TaskDetl> iterator = taskDetls.iterator(); |
| | | |
| | | } |
| | | |
| | | // 入库 -------------------------------------------------------------------------------- |
| | | if (task.getWrkSts().equals(TaskStatusType.INBOUND_ARCHIVED.type)) { |
| | | // 全板入库 |
| | | if (task.getIoType() == 1) { |
| | | // 入库通知单 |
| | | if (!Cools.isEmpty(task.getBarcode())) { |
| | | // 保存入库通知档历史档 |
| | | // if (!waitPakinLogService.save(task.getBarcode())) { |
| | | //// exceptionHandle("保存入库通知档历史档[workNo={0}]失败", wrkMast.getWrkNo()); |
| | | // } |
| | | // // 删除入库通知档 |
| | | // if (!waitPakinService.delete(new EntityWrapper<WaitPakin>().eq("zpallet", task.getBarcode()))) { |
| | | //// exceptionHandle("删除入库通知档[workNo={0}]失败", wrkMast.getWrkNo()); |
| | | // } |
| | | } |
| | | // // 手动入库生成单据 【 上报三方平台 】 |
| | | // if (!Cools.isEmpty(wrkDetls)) { |
| | | // if (!orderService.saveHandlerOrder(Boolean.TRUE, wrkMast, wrkDetls)) { |
| | | // exceptionHandle("生成手动入库单据[workNo={0}]失败", wrkMast.getWrkNo()); |
| | | // } |
| | | // } |
| | | // 拣料再入库 |
| | | } else if (task.getIoType() == 53) { |
| | | // if (!Cools.isEmpty(wrkDetls)) { |
| | | // if (!orderService.saveHandlerOrder(Boolean.FALSE, wrkMast, wrkDetls)) { |
| | | // exceptionHandle("生成手动出库单据[workNo={0}]失败", wrkMast.getWrkNo()); |
| | | // } |
| | | // } |
| | | } |
| | | |
| | | // 出库 -------------------------------------------------------------------------------- |
| | | } else if (task.getWrkSts().equals(TaskStatusType.OUTBOUND_ARCHIVED.type)) { |
| | | // if (!Cools.isEmpty(wrkDetls)) { |
| | | // if (!orderService.saveHandlerOrder(Boolean.FALSE, wrkMast, wrkDetls)) { |
| | | // exceptionHandle("生成手动出库单据[workNo={0}]失败", wrkMast.getWrkNo()); |
| | | // } |
| | | // } |
| | | } |
| | | |
| | | TaskLog taskLog = new TaskLog(); |
| | | BeanUtils.copyProperties(task, taskLog); |
| | | // 保存工作主档历史档 |
| | | if (!taskLogService.insert(taskLog)) { |
| | | exceptionHandle("保存AGV工作历史档[workNo={0}]失败", task.getWrkNo()); |
| | | } |
| | | |
| | | // 删除工作主档 |
| | | if (!taskService.deleteById(task)) { |
| | | exceptionHandle("删除工作主档[workNo={0}]失败", task.getWrkNo()); |
| | | } |
| | | List<TaskDetl> taskDetls2 = taskDetlService.selectList(new EntityWrapper<TaskDetl>().eq("wrk_no", task.getWrkNo())); |
| | | for (TaskDetl taskDetl :taskDetls2){ |
| | | TaskDetlLog taskDetlLog = new TaskDetlLog(); |
| | | BeanUtils.copyProperties(taskDetl, taskDetlLog); |
| | | taskDetlLog.setTaskID(taskLog.getId()); |
| | | taskDetlLog.setId(null); |
| | | // 保存工作明细档历史档 |
| | | if (!taskDetlLogService.insert(taskDetlLog)) { |
| | | exceptionHandle("保存工作明细历史档[workNo={0}]失败", task.getWrkNo()); |
| | | } |
| | | // 删除工作明细档 |
| | | if (!taskDetlService.deleteById(taskDetl)) { |
| | | exceptionHandle("删除工作明细档[workNo={0}]失败", task.getWrkNo()); |
| | | } |
| | | } |
| | | |
| | | |
| | | } catch (Exception e) { |
| | | log.error("fail", e); |
| | | e.printStackTrace(); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg(e.getMessage()); |
| | | } |
| | | return SUCCESS; |
| | | } |
| | | } |
| | |
| | | if (!locCache.getLocSts().equals(LocStsType.LOC_STS_TYPE_S.type)) { |
| | | throw new CoolException("当前库位状态为:" + LocStsType.LOC_STS_TYPE_S.type + "." + LocStsType.LOC_STS_TYPE_S.desc + ",不是出库预约状态"); |
| | | } |
| | | List<WaitPakin> apallet = waitPakinService.selectList(new EntityWrapper<WaitPakin>().eq("zpallet", wrkMast.getBarcode())); |
| | | if (Objects.isNull(apallet)) { |
| | | List<TaskDetl> taskDetls = taskDetlService.selectList(new EntityWrapper<TaskDetl>().eq("task_id", wrkMast.getId())); |
| | | if (Objects.isNull(taskDetls)) { |
| | | throw new CoolException("数据错误:组托数据不存在!!"); |
| | | } |
| | | apallet.forEach(pakin -> { |
| | | taskDetls.forEach(pakin -> { |
| | | LocCacheDetl detl = new LocCacheDetl(); |
| | | BeanUtils.copyProperties(pakin, detl); |
| | | detl.setBarcode(pakin.getBarcode()) |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.asrs.mapper.TaskMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.zy.asrs.entity.Task"> |
| | | <id column="id" property="id" jdbcType="BIGINT"/> |
| | | <result column="wrk_no" property="wrkNo" jdbcType="INTEGER"/> |
| | | <result column="io_time" property="ioTime" jdbcType="TIMESTAMP"/> |
| | | <result column="wrk_sts" property="wrkSts" jdbcType="BIGINT"/> |
| | | <result column="io_type" property="ioType" jdbcType="INTEGER"/> |
| | | <result column="task_type" property="taskType" jdbcType="VARCHAR"/> |
| | | <result column="io_pri" property="ioPri" jdbcType="DOUBLE"/> |
| | | <result column="crn_no" property="crnNo" jdbcType="INTEGER"/> |
| | | <result column="source_sta_no" property="sourceStaNo" jdbcType="VARCHAR"/> |
| | | <result column="sta_no" property="staNo" jdbcType="VARCHAR"/> |
| | | <result column="source_loc_no" property="sourceLocNo" jdbcType="VARCHAR"/> |
| | | <result column="loc_no" property="locNo" jdbcType="VARCHAR"/> |
| | | <result column="full_plt" property="fullPlt" jdbcType="VARCHAR"/> |
| | | <result column="picking" property="picking" jdbcType="VARCHAR"/> |
| | | <result column="exit_mk" property="exitMk" jdbcType="VARCHAR"/> |
| | | <result column="empty_mk" property="emptyMk" jdbcType="VARCHAR"/> |
| | | <result column="link_mis" property="linkMis" jdbcType="VARCHAR"/> |
| | | <result column="barcode" property="barcode" jdbcType="VARCHAR"/> |
| | | <result column="appe_user" property="appeUser" jdbcType="BIGINT"/> |
| | | <result column="appe_time" property="appeTime" jdbcType="TIMESTAMP"/> |
| | | <result column="modi_user" property="modiUser" jdbcType="BIGINT"/> |
| | | <result column="modi_time" property="modiTime" jdbcType="TIMESTAMP"/> |
| | | <result column="error_time" property="errorTime" jdbcType="TIMESTAMP"/> |
| | | <result column="upd_mk" property="updMk" jdbcType="VARCHAR"/> |
| | | |
| | | <select id="selectToBeCompleteData" resultType="com.zy.asrs.entity.Task"> |
| | | |
| | | |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="selectToBeCompleteData" resultMap="BaseResultMap"> |
| | | select * from agv_task where ((wrk_sts = 4 Or wrk_sts = 14 ) and io_type != 103 and io_type != 104 and io_type != 107 ) or (wrk_sts = 2 and io_type=6) order by upd_mk,error_time,io_time,wrk_no |
| | | </select> |
| | | |
| | | |
| | | <select id="selectToBeHistoryData" resultMap="BaseResultMap"> |
| | | select * from agv_task |
| | | where wrk_sts=5 or wrk_sts=15 |
| | | order by io_time,wrk_no asc |
| | | </select> |
| | | </mapper> |
| | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#locCache', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | headers: { token: localStorage.getItem('token') }, |
| | | url: baseUrl + '/locCache/list/auth', |
| | | page: true, |
| | | limit: 15, |
| | |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 80, |
| | | height: 'full-120', |
| | | cols: [[{type: 'checkbox'}, {field: 'locNo', align: 'center', title: '库位号', width: 120} |
| | | , {field: 'barcode', align: 'center', title: '托盘码'} |
| | | , {field: 'areaName', align: 'center', title: '库区名称'} |
| | | cols: [[{ type: 'checkbox' }, { field: 'locNo', align: 'center', title: '库位号', width: 120 } |
| | | , { field: 'barcode', align: 'center', title: '托盘码' } |
| | | , { field: 'areaName', align: 'center', title: '库区名称' } |
| | | // , {field: 'whsType$', align: 'center', title: '库位类型'} |
| | | , {field: 'locSts', align: 'center', title: '库位状态'} |
| | | , {field: 'row1', align: 'center', title: '排'} |
| | | , {field: 'bay1', align: 'center', title: '列'} |
| | | , {field: 'lev1', align: 'center', title: '层'} |
| | | , { field: 'locSts', align: 'center', title: '库位状态' } |
| | | , { field: 'row1', align: 'center', title: '排' } |
| | | , { field: 'bay1', align: 'center', title: '列' } |
| | | , { field: 'lev1', align: 'center', title: '层' } |
| | | // , {field: 'locType', align: 'center', title: '库位类型'} |
| | | , {field: 'sort', align: 'center', title: '优先级'} |
| | | , {field: 'modiUser$', align: 'center', title: '修改人员'} |
| | | , {field: 'modiTime$', align: 'center', title: '修改时间'} |
| | | , {field: 'appeUser$', align: 'center', title: '创建者'} |
| | | , {field: 'appeTime$', align: 'center', title: '添加时间'} |
| | | , {field: 'frozen', align: 'center', title: '是否冻结,0.未冻结,1.已冻结', hide: true} |
| | | , {field: 'frozenMemo', align: 'center', title: '冻结备注', hide: true} |
| | | , {fixed: 'right', title: '操作', align: 'center', toolbar: '#operate', width: 160}] |
| | | , { field: 'sort', align: 'center', title: '优先级' } |
| | | , { field: 'modiUser$', align: 'center', title: '修改人员', hide: true } |
| | | , { field: 'modiTime$', align: 'center', title: '修改时间' } |
| | | , { field: 'appeUser$', align: 'center', title: '创建者', hide: true } |
| | | , { field: 'appeTime$', align: 'center', title: '添加时间', hide: true } |
| | | , { field: 'frozen', align: 'center', title: '是否冻结', hide: true } |
| | | , { field: 'frozenMemo', align: 'center', title: '冻结备注', hide: true } |
| | | , { fixed: 'right', title: '操作', align: 'center', toolbar: '#operate', width: 200 }] |
| | | ], |
| | | request: { |
| | | pageName: 'curr', pageSize: 'limit' |
| | |
| | | searchData['orderByField'] = obj.field; |
| | | searchData['orderByType'] = obj.type; |
| | | tableIns.reload({ |
| | | where: searchData, page: {curr: 1} |
| | | where: searchData, page: { curr: 1 } |
| | | }); |
| | | }); |
| | | |
| | |
| | | break; |
| | | case 'batchModifties': |
| | | if (checkStatus.length === 0) { |
| | | layer.msg('请选择需要修改的数据信息', {icon: 2}); |
| | | layer.msg('请选择需要修改的数据信息', { icon: 2 }); |
| | | return; |
| | | } |
| | | batchModifies(); |
| | | break; |
| | | case 'deleteData': |
| | | if (checkStatus.length === 0) { |
| | | layer.msg('请选择要删除的数据', {icon: 2}); |
| | | layer.msg('请选择要删除的数据', { icon: 2 }); |
| | | return; |
| | | } |
| | | del(checkStatus.map(function (d) { |
| | |
| | | })); |
| | | break; |
| | | case 'init': |
| | | layer.prompt({title: '请输入口令,并重置库位', formType: 1, shadeClose: true}, function (pass, idx) { |
| | | http.get(baseUrl + "/locMast/init/pwd", {pwd: pass}, function (res) { |
| | | layer.prompt({ title: '请输入口令,并重置库位', formType: 1, shadeClose: true }, function (pass, idx) { |
| | | http.get(baseUrl + "/locMast/init/pwd", { pwd: pass }, function (res) { |
| | | if (res.data) { |
| | | layer.open({ |
| | | type: 1, |
| | |
| | | console.log(data.field) |
| | | $.ajax({ |
| | | url: baseUrl + "/locCache/init/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | headers: { 'token': localStorage.getItem('token') }, |
| | | data: data.field, |
| | | method: 'POST', |
| | | async: false, |
| | |
| | | admin.open({ |
| | | type: 1, |
| | | area: '600px', |
| | | title: (mData ? '修改' : '添加') + '订单状态', |
| | | title: (mData ? '修改' : '添加') + '库位缓存', |
| | | content: $('#editDialog').html(), |
| | | success: function (layero, dIndex) { |
| | | layDateRender(mData); |
| | | form.val('detail', mData); |
| | | // 加载库区列表 |
| | | $.ajax({ |
| | | url: baseUrl + "/basAreasQuery/auth", |
| | | headers: { 'token': localStorage.getItem('token') }, |
| | | data: { condition: '' }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | var areaSelect = $(layero).find('select[name="areaName"]'); |
| | | areaSelect.empty(); |
| | | areaSelect.append('<option value="">请选择库区</option>'); |
| | | var list = res.data; |
| | | for (var i = 0; i < list.length; i++) { |
| | | areaSelect.append('<option value="' + list[i].value + '" data-id="' + list[i].id + '">' + list[i].value + '</option>'); |
| | | } |
| | | // 设置表单值 |
| | | form.val('detail', mData); |
| | | // 如果有数据,设置选中的库区 |
| | | if (mData && mData.areaName) { |
| | | areaSelect.val(mData.areaName); |
| | | } |
| | | form.render('select'); |
| | | } |
| | | } |
| | | }); |
| | | // 监听库区选择变化,同步areaId |
| | | form.on('select(editAreaName)', function (data) { |
| | | var selectedOption = $(data.elem).find('option:selected'); |
| | | var areaId = selectedOption.attr('data-id') || ''; |
| | | $(layero).find('input[name="areaId"]').val(areaId); |
| | | }); |
| | | form.on('submit(editSubmit)', function (data) { |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl + "/locCache/" + (mData ? 'update' : 'add') + "/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | headers: { 'token': localStorage.getItem('token') }, |
| | | data: data.field, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200) { |
| | | layer.close(dIndex); |
| | | layer.msg(res.msg, {icon: 1}); |
| | | layer.msg(res.msg, { icon: 1 }); |
| | | tableReload(); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | layer.msg(res.msg, { icon: 2 }); |
| | | } |
| | | } |
| | | }) |
| | |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl + "/locCache/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {ids: ids}, |
| | | headers: { 'token': localStorage.getItem('token') }, |
| | | data: { ids: ids }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200) { |
| | | layer.msg(res.msg, {icon: 1}); |
| | | layer.msg(res.msg, { icon: 1 }); |
| | | tableReload(); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | layer.msg(res.msg, { icon: 2 }); |
| | | } |
| | | } |
| | | }) |
| | |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | tableIns.reload({ |
| | | where: searchData, page: {curr: pageCurr} |
| | | where: searchData, page: { curr: pageCurr } |
| | | }); |
| | | } |
| | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#taskLog', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | headers: { token: localStorage.getItem('token') }, |
| | | url: baseUrl + '/taskLog/list/auth', |
| | | page: true, |
| | | limit: 16, |
| | |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | cols: [[ |
| | | {field: 'id', align: 'center', title: 'id'} |
| | | , {field: 'wrkNo', align: 'center', title: '任务号'} |
| | | , {field: 'ioType$', align: 'center', title: '入出库类型',} |
| | | , {field: 'wrkSts$', align: 'center', title: '工作状态'} |
| | | , {field: 'ioPri', align: 'center', title: '优先级',hide: true} |
| | | , {field: 'sourceStaNo', align: 'center', title: '源站'} |
| | | , {field: 'staNo', align: 'center', title: '目标站'} |
| | | , {field: 'invWh', align: 'center', title: 'agv'} |
| | | , {field: 'barcode', align: 'center', title: '条码'} |
| | | , {field: 'appeUser$', align: 'center', title: '创建人'} |
| | | , {field: 'appeTime$', align: 'center', title: '创建时间',width: 170} |
| | | , {field: 'modiUser$', align: 'center', title: '修改人员', hide: true} |
| | | , {field: 'modiTime$', align: 'center', title: '修改时间', hide: true,width: 170} |
| | | // {field: 'id', align: 'center', title: 'id'} |
| | | { field: 'wrkNo', align: 'center', title: '工作号', sort: true, width: 105 } |
| | | , { field: 'ioTime$', align: 'center', title: '工作时间', } |
| | | , { field: 'wrkSts$', align: 'center', title: '工作状态', } |
| | | , { field: 'ioType$', align: 'center', title: '入出库类型', width: 150 } |
| | | , { field: 'ioPri', align: 'center', title: '优先级', width: 80 } |
| | | , { field: 'taskType$', align: 'center', title: '任务类型', width: 120 } |
| | | , { field: 'crnNo$', align: 'center', title: '堆垛机', hide: true } |
| | | , { field: 'sourceStaNo$', align: 'center', title: '源站', width: 120 } |
| | | , { field: 'sourceLocNo', align: 'center', title: '源库位', width: 120 } |
| | | , { field: 'staNo$', align: 'center', title: '目标站', width: 120 } |
| | | , { field: 'locNo', align: 'center', title: '目标库位', width: 120 } |
| | | , { field: 'barcode', align: 'center', title: '条码', width: 110 } |
| | | , { field: 'preHave', align: 'center', title: '先入品', hide: true } |
| | | , { field: 'takeNone', align: 'center', title: '空操作', hide: true } |
| | | , { field: 'modiUser$', align: 'center', title: '修改人员', hide: true } |
| | | , { field: 'modiTime$', align: 'center', title: '修改时间', hide: true, width: 160 } |
| | | , { fixed: 'right', title: '操作', align: 'center', toolbar: '#operate', width: 200 } |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | |
| | | switch (obj.event) { |
| | | // 明细展示 |
| | | case 'detlShow': |
| | | id = data.id; |
| | | wrkNo = data.wrkNo; |
| | | ioTime = data.ioTime; |
| | | // 表格下方显示 |
| | |
| | | shade: [0.5, '#000'] //0.1透明度的背景 |
| | | }); |
| | | var data = { |
| | | // id: $('#id').val(), |
| | | // id: $('#id').val(), |
| | | id: $('#id').val(), |
| | | wrkNo: $('#wrkNo').val(), |
| | | invWh: $('#invWh').val(), |
| | |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl + "/taskLog/" + name + "/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | headers: { 'token': localStorage.getItem('token') }, |
| | | data: top.reObject(data), |
| | | method: 'POST', |
| | | success: function (res) { |
| | |
| | | height = ($(window).height() * 0.8); |
| | | } |
| | | layer.style(index, { |
| | | // top: (($(window).height()-height)/3)+"px", |
| | | // top: (($(window).height()-height)/3)+"px", |
| | | height: height + 'px' |
| | | }); |
| | | } |
| | |
| | | </div> |
| | | |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">新增</button> |
| | | <button class="layui-btn layui-btn-sm" id="btn-print-batch" lay-event="batchModifties">批量修改</button> |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn layui-btn-danger layui-btn-sm" id="btn-delete" lay-event="deleteData">删除</button> |
| | | <button class="layui-btn layui-btn-primary" id="btn-init" lay-event="init">初始化</button> |
| | | </div> |
| | |
| | | |
| | | <script type="text/html" id="operate"> |
| | | <a class="layui-btn layui-btn-xs btn-detlShow" lay-event="showDetl">明细</a> |
| | | <!-- <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">修改</a>--> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">修改</a> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">删除</a> |
| | | </script> |
| | | |
| | | <!-- 表单弹窗 --> |
| | | <script type="text/html" id="editDialog"> |
| | | <form id="detail" lay-filter="detail" class="layui-form admin-form model-form"> |
| | | <input name="id" type="hidden"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-md12"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">库位号: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="locNo" placeholder="库位号" readonly style="background-color:#f0f0f0"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">托盘码: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="barcode" placeholder="请输入托盘码"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">库区名称: </label> |
| | | <div class="layui-input-block"> |
| | | <input name="areaId" type="hidden"> |
| | | <select name="areaName" id="editAreaName" lay-filter="editAreaName"> |
| | | <option value="">请选择库区</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">库位状态: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="locSts" placeholder="请输入库位状态"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">优先级: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="sort" placeholder="请输入优先级" type="number"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">高低类型: </label> |
| | | <div class="layui-input-block"> |
| | | <select name="locType1"> |
| | | <option value="">请选择</option> |
| | | <option value="0">未知</option> |
| | | <option value="1">低库位</option> |
| | | <option value="2">高库位</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">宽窄类型: </label> |
| | | <div class="layui-input-block"> |
| | | <select name="locType2"> |
| | | <option value="">请选择</option> |
| | | <option value="0">未知</option> |
| | | <option value="1">窄库位</option> |
| | | <option value="2">宽库位</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">轻重类型: </label> |
| | | <div class="layui-input-block"> |
| | | <select name="locType3"> |
| | | <option value="">请选择</option> |
| | | <option value="0">未知</option> |
| | | <option value="1">轻库位</option> |
| | | <option value="2">重库位</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">是否冻结: </label> |
| | | <div class="layui-input-block"> |
| | | <select name="frozen"> |
| | | <option value="">请选择</option> |
| | | <option value="0">未冻结</option> |
| | | <option value="1">已冻结</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">冻结备注: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="frozenMemo" placeholder="请输入冻结备注"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <hr class="layui-bg-gray"> |
| | | <div class="layui-form-item text-right"> |
| | | <button class="layui-btn" lay-filter="editSubmit" lay-submit="">保存</button> |
| | | <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button> |
| | | </div> |
| | | </form> |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title></title> |
| | | <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/css/cool.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/common.css" media="all"> |
| | | </head> |
| | | |
| | | <body> |
| | | |
| | | <!-- 详情 --> |
| | | <div id="data-detail" class="layer_self_wrap"> |
| | | <form id="detail" class="layui-form"> |
| | | <div class="layui-inline" style="width:31%;display: none"> |
| | | <label class="layui-form-label"><span class="not-null">*</span>编 号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="id" class="layui-input" type="text" onkeyup="check(this.id, 'wrkMastLog')" lay-verify="number" > |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;margin-top: 20px"> |
| | | <label class="layui-form-label">工 作 号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="wrkNo" class="layui-input" type="text" disabled="disabled"> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label"><span class="not-null">*</span>工 作 号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="wrkNo" class="layui-input" type="text" onkeyup="check(this.id, 'wrkMastLog')" lay-verify="required|number" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">工作状态:</label> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="wrkSts" class="layui-input" type="text" lay-verify="number" style="display: none"> |
| | | <input id="wrkSts$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入..." onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="basWrkStatusQueryBywrkSts" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="basWrkStatusQueryBywrkStsSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">入出库类型:</label> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="ioType" class="layui-input" type="text" lay-verify="number" style="display: none"> |
| | | <input id="ioType$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入..." onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="basWrkIotypeQueryByioType" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="basWrkIotypeQueryByioTypeSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">堆垛机号:</label> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="crnNo" class="layui-input" type="text" lay-verify="number" style="display: none"> |
| | | <input id="crnNo$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入..." onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="basCrnpQueryBycrnNo" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="basCrnpQueryBycrnNoSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">优 先 级:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="ioPri" class="layui-input" type="text" lay-verify="number" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">目标库位:</label> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="locNo" class="layui-input" type="text" style="display: none"> |
| | | <input id="locNo$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入..." onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="locMastQueryBylocNo" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="locMastQueryBylocNoSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">目 标 站:</label> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="staNo" class="layui-input" type="text" lay-verify="number" style="display: none"> |
| | | <input id="staNo$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入..." onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="basDevpQueryBystaNo" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="basDevpQueryBystaNoSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">源 站:</label> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="sourceStaNo" class="layui-input" type="text" lay-verify="number" style="display: none"> |
| | | <input id="sourceStaNo$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入..." onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="basDevpQueryBysourceStaNo" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="basDevpQueryBysourceStaNoSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">源 库 位:</label> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="sourceLocNo" class="layui-input" type="text" style="display: none"> |
| | | <input id="sourceLocNo$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入..." onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="locMastQueryBysourceLocNo" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="locMastQueryBysourceLocNoSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">拣 料:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="picking" class="layui-input" type="checkBox" lay-skin="primary" lay-filter='detailCheckbox'> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">退 出:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="exitMk" class="layui-input" type="checkBox" lay-skin="primary" lay-filter='detailCheckbox'> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">空 板:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="emptyMk" class="layui-input" type="checkBox" lay-skin="primary" lay-filter='detailCheckbox'> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">工作时间:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="ioTime$" class="layui-input" type="text" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label" style="font-size: x-small">堆垛机启动时间:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="crnStrTime$" class="layui-input" type="text" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label" style="font-size: x-small">堆垛机停止时间:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="crnEndTime$" class="layui-input" type="text" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">拣料时间:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="plcStrTime$" class="layui-input" type="text" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">条 码:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="barcode" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">满 板:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="fullPlt" class="layui-input" type="checkBox" lay-skin="primary" lay-filter='detailCheckbox'> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <hr class="layui-bg-gray"> |
| | | |
| | | <div id="data-detail-btn" class="layui-btn-container layui-form-item"> |
| | | <div id="data-detail-submit-save" type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="save">保存</div> |
| | | <div id="data-detail-submit-edit" type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="edit">修改</div> |
| | | <div id="data-detail-close" type="button" class="layui-btn" lay-submit lay-filter="close">关闭</div> |
| | | </div> |
| | | |
| | | <div id="prompt"> |
| | | 温馨提示:请仔细填写相关信息,<span class="extrude"><span class="not-null">*</span> 为必填选项。</span> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | </div> |
| | | <table class="layui-hide" id="taskDetlLog" lay-filter="taskDetlLog"></table> |
| | | </body> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/wrkMastLog/wrkMastLog.js" charset="utf-8"></script> |
| | | </html> |
| | | <script type="text/javascript"> |
| | | var pageCur; |
| | | |
| | | layui.use(['table', 'laydate', 'form'], function () { |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var form = layui.form; |
| | | |
| | | $('#wrkNo').val(parent.wrkNo); |
| | | // 数据渲染 |
| | | table.render({ |
| | | elem: '#taskDetlLog', |
| | | headers: { token: localStorage.getItem('token') }, |
| | | url: baseUrl + '/taskDetlLog/list/auth', |
| | | where: { task_id: parent.id }, |
| | | page: true, |
| | | limit: 16, |
| | | limits: [16, 30, 50, 100, 200, 500], |
| | | even: true, |
| | | cellMinWidth: 50, |
| | | cols: [[ |
| | | { field: 'wrkNo', align: 'center', title: '工作号', width: 100 } |
| | | , { field: 'ioTime$', align: 'center', title: '工作时间', width: 160 } |
| | | , { field: 'matnr', align: 'center', title: '物料编码', width: 120 } |
| | | , { field: 'maktx', align: 'center', title: '物料名称' } |
| | | , { field: 'anfme', align: 'center', title: '数量', width: 80 } |
| | | , { field: 'batch', align: 'center', title: '批次', width: 100 } |
| | | , { field: 'orderNo', align: 'center', title: '单据编号', width: 120 } |
| | | , { field: 'zpallet', align: 'center', title: '托盘条码', width: 120 } |
| | | , { field: 'specs', align: 'center', title: '规格' } |
| | | , { field: 'unit', align: 'center', title: '单位', width: 60 } |
| | | , { field: 'supp', align: 'center', title: '供应商' } |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | | 'count': res.data.total, |
| | | 'data': res.data.records |
| | | } |
| | | }, |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } |
| | | pageCur = curr; |
| | | } |
| | | }); |
| | | }); |
| | | </script> |
| | | |
| | | </html> |