New file |
| | |
| | | package com.zy.asrs.common.wms.entity; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import com.zy.asrs.common.wms.service.BasWrkIotypeService; |
| | | import com.zy.asrs.common.wms.service.BasWrkStatusService; |
| | | import com.zy.asrs.common.wms.service.LocMastService; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.zy.asrs.framework.common.Cools; |
| | | import com.zy.asrs.framework.common.SpringUtils; |
| | | import com.zy.asrs.common.sys.entity.User; |
| | | import com.zy.asrs.common.sys.entity.Host; |
| | | import com.zy.asrs.common.sys.service.UserService; |
| | | import com.zy.asrs.common.sys.service.HostService; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("wms_wrk_mast") |
| | | public class WrkMast implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 工作号 |
| | | */ |
| | | @ApiModelProperty(value= "工作号") |
| | | private Integer wrkNo; |
| | | |
| | | /** |
| | | * 工作状态 |
| | | */ |
| | | @ApiModelProperty(value= "工作状态") |
| | | private Long wrkSts; |
| | | |
| | | /** |
| | | * 入出库类型 |
| | | */ |
| | | @ApiModelProperty(value= "入出库类型") |
| | | private Integer ioType; |
| | | |
| | | /** |
| | | * 堆垛机 |
| | | */ |
| | | @ApiModelProperty(value= "堆垛机") |
| | | private Integer crnNo; |
| | | |
| | | /** |
| | | * 优先级 |
| | | */ |
| | | @ApiModelProperty(value= "优先级") |
| | | private Double ioPri; |
| | | |
| | | /** |
| | | * 目标库位 |
| | | */ |
| | | @ApiModelProperty(value= "目标库位") |
| | | private String locNo; |
| | | |
| | | /** |
| | | * 目标站 |
| | | */ |
| | | @ApiModelProperty(value= "目标站") |
| | | private Integer staNo; |
| | | |
| | | /** |
| | | * 源站 |
| | | */ |
| | | @ApiModelProperty(value= "源站") |
| | | private Integer sourceStaNo; |
| | | |
| | | /** |
| | | * 源库位 |
| | | */ |
| | | @ApiModelProperty(value= "源库位") |
| | | private String sourceLocNo; |
| | | |
| | | /** |
| | | * 拣料(checkBox) |
| | | */ |
| | | @ApiModelProperty(value= "拣料(checkBox)") |
| | | private String picking; |
| | | |
| | | /** |
| | | * 退出(checkBox) |
| | | */ |
| | | @ApiModelProperty(value= "退出(checkBox)") |
| | | private String exitMk; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | private Integer pltType; |
| | | |
| | | /** |
| | | * 空板(checkBox) |
| | | */ |
| | | @ApiModelProperty(value= "空板(checkBox)") |
| | | private String emptyMk; |
| | | |
| | | /** |
| | | * 工作时间 |
| | | */ |
| | | @ApiModelProperty(value= "工作时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date ioTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | private Integer ctnType; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | private String modiUser; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date modiTime; |
| | | |
| | | /** |
| | | * 创建者 |
| | | */ |
| | | @ApiModelProperty(value= "创建者") |
| | | private String appeUser; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date appeTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date errorTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | private String errorMemo; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | private String manuType; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | /** |
| | | * 条码 |
| | | */ |
| | | @ApiModelProperty(value= "条码") |
| | | private String barcode; |
| | | |
| | | /** |
| | | * 满板(checkBox) |
| | | */ |
| | | @ApiModelProperty(value= "满板(checkBox)") |
| | | private String fullPlt; |
| | | |
| | | /** |
| | | * 授权商户 |
| | | */ |
| | | @ApiModelProperty(value= "授权商户") |
| | | private Long hostId; |
| | | |
| | | public WrkMast() {} |
| | | |
| | | public WrkMast(Integer wrkNo,Long wrkSts,Integer ioType,Integer crnNo,Double ioPri,String locNo,Integer staNo,Integer sourceStaNo,String sourceLocNo,String picking,String exitMk,Integer pltType,String emptyMk,Date ioTime,Integer ctnType,String modiUser,Date modiTime,String appeUser,Date appeTime,Date errorTime,String errorMemo,String manuType,String memo,String barcode,String fullPlt,Long hostId) { |
| | | this.wrkNo = wrkNo; |
| | | this.wrkSts = wrkSts; |
| | | this.ioType = ioType; |
| | | this.crnNo = crnNo; |
| | | this.ioPri = ioPri; |
| | | this.locNo = locNo; |
| | | this.staNo = staNo; |
| | | this.sourceStaNo = sourceStaNo; |
| | | this.sourceLocNo = sourceLocNo; |
| | | this.picking = picking; |
| | | this.exitMk = exitMk; |
| | | this.pltType = pltType; |
| | | this.emptyMk = emptyMk; |
| | | this.ioTime = ioTime; |
| | | this.ctnType = ctnType; |
| | | this.modiUser = modiUser; |
| | | this.modiTime = modiTime; |
| | | this.appeUser = appeUser; |
| | | this.appeTime = appeTime; |
| | | this.errorTime = errorTime; |
| | | this.errorMemo = errorMemo; |
| | | this.manuType = manuType; |
| | | this.memo = memo; |
| | | this.barcode = barcode; |
| | | this.fullPlt = fullPlt; |
| | | this.hostId = hostId; |
| | | } |
| | | |
| | | // WrkMast wrkMast = new WrkMast( |
| | | // null, // 工作号[非空] |
| | | // null, // 工作状态 |
| | | // null, // 入出库类型 |
| | | // null, // 堆垛机 |
| | | // null, // 优先级 |
| | | // null, // 目标库位 |
| | | // null, // 目标站 |
| | | // null, // 源站 |
| | | // null, // 源库位 |
| | | // null, // 拣料(checkBox) |
| | | // null, // 退出(checkBox) |
| | | // null, // |
| | | // null, // 空板(checkBox) |
| | | // null, // 工作时间 |
| | | // null, // |
| | | // null, // 修改人员 |
| | | // null, // 修改时间 |
| | | // null, // 创建者 |
| | | // null, // 添加时间 |
| | | // null, // |
| | | // null, // |
| | | // null, // |
| | | // null, // 备注 |
| | | // null, // 条码 |
| | | // null, // 满板(checkBox) |
| | | // null // 授权商户 |
| | | // ); |
| | | |
| | | public String getWrkSts$(){ |
| | | BasWrkStatusService service = SpringUtils.getBean(BasWrkStatusService.class); |
| | | BasWrkStatus basWrkStatus = service.getById(this.wrkSts); |
| | | if (!Cools.isEmpty(basWrkStatus)){ |
| | | return String.valueOf(basWrkStatus.getWrkDesc()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getIoType$(){ |
| | | BasWrkIotypeService service = SpringUtils.getBean(BasWrkIotypeService.class); |
| | | BasWrkIotype basWrkIotype = service.getById(this.ioType); |
| | | if (!Cools.isEmpty(basWrkIotype)){ |
| | | return String.valueOf(basWrkIotype.getIoDesc()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getLocNo$(){ |
| | | LocMastService service = SpringUtils.getBean(LocMastService.class); |
| | | LocMast locMast = service.getById(this.locNo); |
| | | if (!Cools.isEmpty(locMast)){ |
| | | return String.valueOf(locMast.getLocNo()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getSourceLocNo$(){ |
| | | LocMastService service = SpringUtils.getBean(LocMastService.class); |
| | | LocMast locMast = service.getById(this.sourceLocNo); |
| | | if (!Cools.isEmpty(locMast)){ |
| | | return String.valueOf(locMast.getLocNo()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getIoTime$(){ |
| | | if (Cools.isEmpty(this.ioTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.ioTime); |
| | | } |
| | | |
| | | public String getModiUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.getById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getModiTime$(){ |
| | | if (Cools.isEmpty(this.modiTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime); |
| | | } |
| | | |
| | | public String getAppeUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.getById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getAppeTime$(){ |
| | | if (Cools.isEmpty(this.appeTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime); |
| | | } |
| | | |
| | | public String getErrorTime$(){ |
| | | if (Cools.isEmpty(this.errorTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.errorTime); |
| | | } |
| | | |
| | | public String getHostId$(){ |
| | | HostService service = SpringUtils.getBean(HostService.class); |
| | | Host host = service.getById(this.hostId); |
| | | if (!Cools.isEmpty(host)){ |
| | | return String.valueOf(host.getName()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.common.wms.mapper; |
| | | |
| | | import com.zy.asrs.common.wms.entity.WrkMast; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface WrkMastMapper extends BaseMapper<WrkMast> { |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.common.wms.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.asrs.common.wms.entity.WrkMast; |
| | | |
| | | public interface WrkMastService extends IService<WrkMast> { |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.common.wms.service.impl; |
| | | |
| | | import com.zy.asrs.common.wms.mapper.WrkMastMapper; |
| | | import com.zy.asrs.common.wms.entity.WrkMast; |
| | | import com.zy.asrs.common.wms.service.WrkMastService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("wrkMastService") |
| | | public class WrkMastServiceImpl extends ServiceImpl<WrkMastMapper, WrkMast> implements WrkMastService { |
| | | |
| | | } |
New file |
| | |
| | | -- save wrkMast record |
| | | -- mysql |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'wrkMast/wrkMast.html', 'wrkMast管理', null , '2', null , '1'); |
| | | |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'wrkMast#view', '查询', '', '3', '0', '1'); |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'wrkMast#btn-add', '新增', '', '3', '1', '1'); |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'wrkMast#btn-edit', '编辑', '', '3', '2', '1'); |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'wrkMast#btn-delete', '删除', '', '3', '3', '1'); |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'wrkMast#btn-export', '导出', '', '3', '4', '1'); |
| | | |
| | | -- sqlserver |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'wrkMast/wrkMast.html', N'wrkMast管理', null, '2', null, '1'); |
| | | |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'wrkMast#view', N'查询', '', '3', '0', '1'); |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'wrkMast#btn-add', N'新增', '', '3', '1', '1'); |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'wrkMast#btn-edit', N'编辑', '', '3', '2', '1'); |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'wrkMast#btn-delete', N'删除', '', '3', '3', '1'); |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'wrkMast#btn-export', N'导出', '', '3', '4', '1'); |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.asrs.common.wms.mapper.WrkMastMapper"> |
| | | |
| | | </mapper> |
New file |
| | |
| | | package com.zy.asrs.wms.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.zy.asrs.common.wms.entity.WrkMast; |
| | | import com.zy.asrs.common.wms.service.WrkMastService; |
| | | import com.zy.asrs.framework.annotations.ManagerAuth; |
| | | import com.zy.asrs.framework.common.Cools; |
| | | import com.zy.asrs.framework.common.R; |
| | | import com.zy.asrs.framework.domain.KeyValueVo; |
| | | import com.zy.asrs.framework.common.DateUtils; |
| | | import com.zy.asrs.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | | public class WrkMastController extends BaseController { |
| | | |
| | | @Autowired |
| | | private WrkMastService wrkMastService; |
| | | |
| | | @RequestMapping(value = "/wrkMast/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(wrkMastService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMast/page/auth") |
| | | @ManagerAuth |
| | | public R page(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam(required = false) String condition, |
| | | @RequestParam(required = false) String timeRange, |
| | | @RequestParam Map<String, Object> param) { |
| | | LambdaQueryWrapper<WrkMast> wrapper = new LambdaQueryWrapper<>(); |
| | | if (!Cools.isEmpty(condition)) { |
| | | wrapper.like(WrkMast::getWrkNo, condition); |
| | | } |
| | | if (!Cools.isEmpty(timeRange)) { |
| | | String[] range = timeRange.split(RANGE_TIME_LINK); |
| | | wrapper.ge(WrkMast::getAppeTime, DateUtils.convert(range[0])); |
| | | wrapper.le(WrkMast::getAppeTime, DateUtils.convert(range[1])); |
| | | } |
| | | return R.ok(wrkMastService.page(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/wrkMast/add/auth") |
| | | @ManagerAuth |
| | | public R add(WrkMast wrkMast) { |
| | | wrkMastService.save(wrkMast); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMast/update/auth") |
| | | @ManagerAuth |
| | | public R update(WrkMast wrkMast){ |
| | | if (Cools.isEmpty(wrkMast) || null==wrkMast.getId()){ |
| | | return R.error(); |
| | | } |
| | | wrkMastService.updateById(wrkMast); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMast/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | wrkMastService.removeById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMastQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | LambdaQueryWrapper<WrkMast> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.like(WrkMast::getWrkNo, condition); |
| | | Page<WrkMast> page = wrkMastService.page(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (WrkMast wrkMast : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", wrkMast.getId()); |
| | | map.put("value", wrkMast.getWrkNo()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |
| | | } |
| | | |
| | | @RequestMapping("/wrkMast/all/get/kv") |
| | | @ManagerAuth |
| | | public R getDataKV(@RequestParam(required = false) String condition) { |
| | | List<KeyValueVo> vos = new ArrayList<>(); |
| | | LambdaQueryWrapper<WrkMast> wrapper = new LambdaQueryWrapper<>(); |
| | | if (!Cools.isEmpty(condition)) { |
| | | wrapper.like(WrkMast::getWrkNo, condition); |
| | | } |
| | | wrkMastService.page(new Page<>(1, 30), wrapper).getRecords().forEach(item -> vos.add(new KeyValueVo(String.valueOf(item.getWrkNo()), item.getId()))); |
| | | return R.ok().add(vos); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMast/add/pri/auth") |
| | | @ManagerAuth(memo = "工作档增加优先级") |
| | | public R addPri(@RequestBody List<WrkMast> list) { |
| | | if (list.isEmpty()) { |
| | | return R.error("请至少选择一行数据"); |
| | | } |
| | | for (WrkMast entity : list){ |
| | | entity.setIoPri(entity.getIoPri() + 1); |
| | | } |
| | | wrkMastService.updateBatchById(list); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMast/red/pri/auth") |
| | | @ManagerAuth(memo = "工作档降低优先级") |
| | | public R redPri(@RequestBody List<WrkMast> list) { |
| | | if (list.isEmpty()) { |
| | | return R.error("请至少选择一行数据"); |
| | | } |
| | | for (WrkMast entity : list){ |
| | | entity.setIoPri(entity.getIoPri() - 1); |
| | | } |
| | | wrkMastService.updateBatchById(list); |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | var pageCurr; |
| | | var wrkNo; |
| | | layui.use(['table','laydate', 'form'], function(){ |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#wrkMast', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/wrkMast/page/auth', |
| | | page: true, |
| | | limit: 16, |
| | | limits: [16, 30, 50, 100, 200, 500], |
| | | even: true, |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | ,{field: 'wrkNo', align: 'center',title: '工作号',sort: true, width: 85} |
| | | ,{field: 'ioTime$', align: 'center',title: '工作时间',sort: true, width: 160} |
| | | ,{field: 'wrkSts$', align: 'center',title: '工作状态'} |
| | | ,{field: 'ioType$', align: 'center',title: '入出库类型'} |
| | | ,{field: 'ioPri', align: 'center',title: '优先级'} |
| | | ,{field: 'crnNo$', align: 'center',title: '堆垛机'} |
| | | ,{field: 'sourceStaNo$', align: 'center',title: '源站'} |
| | | ,{field: 'staNo$', align: 'center',title: '目标站'} |
| | | ,{field: 'sourceLocNo$', align: 'center',title: '源库位'} |
| | | ,{field: 'locNo$', align: 'center',title: '目标库位'} |
| | | ,{field: 'barcode', align: 'center',title: '条码'} |
| | | ,{field: 'invWh', align: 'center',title: '确认否', width:75} |
| | | ,{field: 'preHave', align: 'center',title: '先入品', hide: true} |
| | | ,{field: 'takeNone', align: 'center',title: '空操作', hide: true} |
| | | // ,{field: 'picking', align: 'center',title: '拣料', templet:function(row){ |
| | | // var html = "<input value='picking' type='checkbox' lay-skin='primary' lay-filter='tableCheckbox' table-index='"+row.LAY_TABLE_INDEX+"'"; |
| | | // if(row.picking === 'Y'){html += " checked ";} |
| | | // html += ">"; |
| | | // return html; |
| | | // }} |
| | | // ,{field: 'exitMk', align: 'center',title: '退出', templet:function(row){ |
| | | // var html = "<input value='exitMk' type='checkbox' lay-skin='primary' lay-filter='tableCheckbox' table-index='"+row.LAY_TABLE_INDEX+"'"; |
| | | // if(row.exitMk === 'Y'){html += " checked ";} |
| | | // html += ">"; |
| | | // return html; |
| | | // }} |
| | | // ,{field: 'emptyMk', align: 'center',title: '空板', templet:function(row){ |
| | | // var html = "<input value='emptyMk' type='checkbox' lay-skin='primary' lay-filter='tableCheckbox' table-index='"+row.LAY_TABLE_INDEX+"'"; |
| | | // if(row.emptyMk === 'Y'){html += " checked ";} |
| | | // html += ">"; |
| | | // return html; |
| | | // }} |
| | | // |
| | | // ,{field: 'crnStrTime$', align: 'center',title: '堆垛机启动时间'} |
| | | // ,{field: 'crnEndTime$', align: 'center',title: '堆垛机停止时间'} |
| | | // ,{field: 'refIotime$', align: 'center',title: '拣料时间'} |
| | | ,{field: 'modiUser$', align: 'center',title: '修改人员', hide:true} |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间', hide:true, width: 160} |
| | | // ,{field: 'memo', align: 'center',title: '备注'} |
| | | // |
| | | // ,{field: 'fullPlt', align: 'center',title: '满板', templet:function(row){ |
| | | // var html = "<input value='fullPlt' type='checkbox' lay-skin='primary' lay-filter='tableCheckbox' table-index='"+row.LAY_TABLE_INDEX+"'"; |
| | | // if(row.fullPlt === 'Y'){html += " checked ";} |
| | | // html += ">"; |
| | | // return html; |
| | | // }} |
| | | |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:250} |
| | | ]], |
| | | 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+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | form.on('checkbox(tableCheckbox)', function (data) { |
| | | var _index = $(data.elem).attr('table-index')||0; |
| | | if(data.elem.checked){ |
| | | res.data[_index][data.value] = 'Y'; |
| | | }else{ |
| | | res.data[_index][data.value] = 'N'; |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | // 监听排序事件 |
| | | table.on('sort(wrkMast)', function (obj) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | searchData['orderByField'] = obj.field; |
| | | searchData['orderByType'] = obj.type; |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: 1 |
| | | }, |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(wrkMast)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id); |
| | | switch(obj.event) { |
| | | // 增加优先级 |
| | | case 'priAdd': |
| | | var list=[]; |
| | | checkStatus.data.map(function (track) { |
| | | list.push({ |
| | | wrkNo: track.wrkNo, |
| | | ioTime: track.ioTime, |
| | | ioPri: track.ioPri |
| | | }); |
| | | }); |
| | | $.ajax({ |
| | | url: baseUrl+"/wrkMast/add/pri/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | contentType:'application/json;charset=UTF-8', |
| | | data: JSON.stringify(list), |
| | | method: 'POST', |
| | | traditional:true, |
| | | success: function (res) { |
| | | layer.closeAll(); |
| | | if (res.code === 200){ |
| | | $(".layui-laypage-btn")[0].click(); |
| | | layer.msg(res.msg); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | break; |
| | | // 降低优先级 |
| | | case 'priRed': |
| | | var list=[]; |
| | | checkStatus.data.map(function (track) { |
| | | list.push({ |
| | | wrkNo: track.wrkNo, |
| | | ioTime: track.ioTime, |
| | | ioPri: track.ioPri |
| | | }); |
| | | }); |
| | | $.ajax({ |
| | | url: baseUrl+"/wrkMast/red/pri/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | contentType:'application/json;charset=UTF-8', |
| | | data: JSON.stringify(list), |
| | | method: 'POST', |
| | | traditional:true, |
| | | success: function (res) { |
| | | layer.closeAll(); |
| | | if (res.code === 200){ |
| | | $(".layui-laypage-btn")[0].click(); |
| | | layer.msg(res.msg); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | break; |
| | | case 'addData': |
| | | layer.open({ |
| | | type: 2, |
| | | title: '新增', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: false, |
| | | content: 'wrkMast_detail.html', |
| | | success: function(layero, index){ |
| | | layer.getChildFrame('#data-detail-submit-edit', index).hide(); |
| | | clearFormVal(layer.getChildFrame('#detail', index)); |
| | | layer.getChildFrame('##dealDownLine', index).hide();layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); |
| | | } |
| | | }); |
| | | break; |
| | | case 'deleteData': |
| | | var data = checkStatus.data; |
| | | if (data.length === 0){ |
| | | layer.msg('请选择数据'); |
| | | } else { |
| | | layer.confirm('确定删除'+(data.length===1?'此':data.length)+'条数据吗', function(){ |
| | | $.ajax({ |
| | | url: baseUrl+"/wrkMast/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {param: JSON.stringify(data)}, |
| | | method: 'POST', |
| | | traditional:true, |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | layer.closeAll(); |
| | | tableReload(false); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | break; |
| | | case 'exportData': |
| | | layer.confirm('确定导出Excel吗', {shadeClose: true}, function(){ |
| | | var titles=[]; |
| | | var fields=[]; |
| | | obj.config.cols[0].map(function (col) { |
| | | if (col.type === 'normal' && col.hide === false && col.toolbar == null) { |
| | | titles.push(col.title); |
| | | fields.push(col.field); |
| | | } |
| | | }); |
| | | var exportData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | exportData[this.name] = this.value; |
| | | }); |
| | | var param = { |
| | | 'wrkMast': exportData, |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/wrkMast/export/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | dataType:'json', |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll(); |
| | | if (res.code === 200) { |
| | | table.exportFile(titles,res.data,'xls'); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(wrkMast)', function(obj){ |
| | | let data = obj.data; |
| | | switch (obj.event) { |
| | | // 明细展示 |
| | | case 'detlShow': |
| | | wrkNo = data.wrkNo; |
| | | // 表格下方显示 |
| | | // locDetl(data.wrkNo); |
| | | // 弹层显示 |
| | | layer.open({ |
| | | type: 2, |
| | | title: '工作档明细', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: true, |
| | | content: 'wrkDetl.html', |
| | | success: function(layero, index){ |
| | | } |
| | | }); |
| | | break; |
| | | // 完成 |
| | | case 'complete': |
| | | layer.confirm('确认完成该笔工作档?', {title: '工作号:'+data.wrkNo, shadeClose: true}, function(){ |
| | | http.post(baseUrl+"/hand/control/wrkMast", {workNo: data.wrkNo, type:1}, function (res) { |
| | | $(".layui-laypage-btn")[0].click(); |
| | | layer.msg(data.wrkNo + res.msg); |
| | | }) |
| | | layer.closeAll(); |
| | | |
| | | }); |
| | | break; |
| | | // 取消 |
| | | case 'cancel': |
| | | if (data.pdcType === "Y") { |
| | | layer.confirm('当前任务关联ERP销售单,取消将重新生成出库作业,是否继续?', {title: '工作号:'+data.wrkNo, shadeClose: true}, function(){ |
| | | http.post(baseUrl+"/hand/control/wrkMast", {workNo: data.wrkNo, type:2}, function (res) { |
| | | $(".layui-laypage-btn")[0].click(); |
| | | layer.msg(data.wrkNo + res.msg); |
| | | }) |
| | | layer.closeAll(); |
| | | }); |
| | | } else { |
| | | layer.confirm('确认取消该笔工作档?', {title: '工作号:'+data.wrkNo, shadeClose: true}, function(){ |
| | | http.post(baseUrl+"/hand/control/wrkMast", {workNo: data.wrkNo, type:2}, function (res) { |
| | | $(".layui-laypage-btn")[0].click(); |
| | | layer.msg(data.wrkNo + res.msg); |
| | | }) |
| | | layer.closeAll(); |
| | | }); |
| | | } |
| | | break; |
| | | // 拣料入库 |
| | | case 'pick': |
| | | layer.confirm('拣料入库该笔工作档?', {title: '工作号:'+data.wrkNo, shadeClose: true}, function(){ |
| | | http.post(baseUrl+"/hand/control/wrkMast", {workNo: data.wrkNo, type:3}, function (res) { |
| | | $(".layui-laypage-btn")[0].click(); |
| | | layer.msg(data.wrkNo + res.msg); |
| | | }) |
| | | layer.closeAll(); |
| | | }); |
| | | break; |
| | | // 先入品 |
| | | case 'preHave': |
| | | layer.confirm('任务发生先入品异常。如需重新入库,请确保货物已放至堆垛机出库站!', {title: '工作号:'+data.wrkNo, shadeClose: true}, function(){ |
| | | http.post(baseUrl+"/deal/preHave/start", {wrkNo: data.wrkNo}, function (res) { |
| | | $(".layui-laypage-btn")[0].click(); |
| | | layer.msg(data.wrkNo + res.msg, {icon: 1}); |
| | | }) |
| | | layer.closeAll(); |
| | | }); |
| | | break; |
| | | // 空操作 |
| | | case 'takeNone': |
| | | layer.confirm('任务发送空操作异常!是否。。。。。。。。?', {title: '工作号:'+data.wrkNo, shadeClose: true}, function(){ |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | // 数据保存动作 |
| | | form.on('submit(save)', function () { |
| | | if (banMsg != null){ |
| | | layer.msg(banMsg); |
| | | return; |
| | | } |
| | | method("add"); |
| | | }); |
| | | |
| | | // 数据修改动作 |
| | | form.on('submit(edit)', function () { |
| | | method("update") |
| | | }); |
| | | |
| | | function method(name){ |
| | | var index = layer.load(1, { |
| | | shade: [0.5,'#000'] //0.1透明度的背景 |
| | | }); |
| | | var data = { |
| | | wrkNo: $('#wrkNo').val(), |
| | | invWh: $('#invWh').val(), |
| | | ymd: top.strToDate($('#ymd\\$').val()), |
| | | mk: $('#mk').val(), |
| | | whsType: $('#whsType').val(), |
| | | wrkSts: $('#wrkSts').val(), |
| | | ioType: $('#ioType').val(), |
| | | crnNo: $('#crnNo').val(), |
| | | sheetNo: $('#sheetNo').val(), |
| | | ioPri: $('#ioPri').val(), |
| | | wrkDate: top.strToDate($('#wrkDate\\$').val()), |
| | | locNo: $('#locNo').val(), |
| | | staNo: $('#staNo').val(), |
| | | sourceStaNo: $('#sourceStaNo').val(), |
| | | sourceLocNo: $('#sourceLocNo').val(), |
| | | locSts: $('#locSts').val(), |
| | | picking: $('#picking').val(), |
| | | linkMis: $('#linkMis').val(), |
| | | onlineYn: $('#onlineYn').val(), |
| | | updMk: $('#updMk').val(), |
| | | exitMk: $('#exitMk').val(), |
| | | pltType: $('#pltType').val(), |
| | | emptyMk: $('#emptyMk').val(), |
| | | ioTime: top.strToDate($('#ioTime\\$').val()), |
| | | ctnType: $('#ctnType').val(), |
| | | packed: $('#packed').val(), |
| | | oveMk: $('#oveMk').val(), |
| | | mtnType: $('#mtnType').val(), |
| | | userNo: $('#userNo').val(), |
| | | crnStrTime: top.strToDate($('#crnStrTime\\$').val()), |
| | | crnEndTime: top.strToDate($('#crnEndTime\\$').val()), |
| | | plcStrTime: top.strToDate($('#plcStrTime\\$').val()), |
| | | crnPosTime: top.strToDate($('#crnPosTime\\$').val()), |
| | | loadTime: $('#loadTime').val(), |
| | | expTime: $('#expTime').val(), |
| | | refWrkno: $('#refWrkno').val(), |
| | | refIotime: top.strToDate($('#refIotime\\$').val()), |
| | | modiUser: $('#modiUser').val(), |
| | | modiTime: top.strToDate($('#modiTime\\$').val()), |
| | | appeUser: $('#appeUser').val(), |
| | | appeTime: top.strToDate($('#appeTime\\$').val()), |
| | | pauseMk: $('#pauseMk').val(), |
| | | errorTime: top.strToDate($('#errorTime\\$').val()), |
| | | errorMemo: $('#errorMemo').val(), |
| | | ctnKind: $('#ctnKind').val(), |
| | | manuType: $('#manuType').val(), |
| | | memo: $('#memo').val(), |
| | | scWeight: $('#scWeight').val(), |
| | | logMk: $('#logMk').val(), |
| | | logErrTime: top.strToDate($('#logErrTime\\$').val()), |
| | | logErrMemo: $('#logErrMemo').val(), |
| | | barcode: $('#barcode').val(), |
| | | PdcType: $('#PdcType').val(), |
| | | ctnNo: $('#ctnNo').val(), |
| | | fullPlt: $('#fullPlt').val(), |
| | | |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/wrkMast/"+name+"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: top.reObject(data), |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | parent.layer.closeAll(); |
| | | parent.$(".layui-laypage-btn")[0].click(); |
| | | $("#data-detail :input").each(function () { |
| | | $(this).val(""); |
| | | }); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg) |
| | | } |
| | | layer.close(index); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 复选框事件 |
| | | form.on('checkbox(detailCheckbox)', function (data) { |
| | | var el = data.elem; |
| | | if (el.checked) { |
| | | $(el).val('Y'); |
| | | } else { |
| | | $(el).val('N'); |
| | | } |
| | | }); |
| | | |
| | | // 搜索栏搜索事件 |
| | | form.on('submit(search)', function (data) { |
| | | pageCurr = 1; |
| | | $('#detlTable').css("display", 'none'); |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 搜索栏重置事件 |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | $('#detlTable').css("display", 'none'); |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 时间选择器 |
| | | layDate.render({ |
| | | elem: '#ymd\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#wrkDate\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#ioTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#crnStrTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#crnEndTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#plcStrTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#crnPosTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#refIotime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#modiTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#appeTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#errorTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#logErrTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '.layui-laydate-range' |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | }); |
| | | |
| | | var pageCur; |
| | | function locDetl(param){ |
| | | $('#detlTable').css("display", 'block'); |
| | | // 数据渲染 |
| | | $('#wrkNo').val(param); |
| | | // 数据渲染 |
| | | tableIns1 = table.render({ |
| | | elem: '#wrkDetlByMap', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/wrkDetl/list/auth', |
| | | where: {wrk_no: param}, |
| | | page: true, |
| | | limit: 16, |
| | | limits: [16, 30, 50, 100, 200, 500], |
| | | even: true, |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | ,{field: 'wrkNo', align: 'center',title: '工作号'} |
| | | ,{field: 'ioTime$', align: 'center',title: '工作时间'} |
| | | ,{field: 'matnr', align: 'center',title: '物料'} |
| | | ,{field: 'lgnum', align: 'center',title: '仓库号'} |
| | | ,{field: 'tbnum', align: 'center',title: '转储请求编号'} |
| | | ,{field: 'tbpos', align: 'center',title: '行项目'} |
| | | ,{field: 'zmatid', align: 'center',title: '物料标签ID'} |
| | | ,{field: 'maktx', align: 'center',title: '物料描述'} |
| | | ,{field: 'werks', align: 'center',title: '工厂'} |
| | | ,{field: 'anfme', align: 'center',title: '数量'} |
| | | ,{field: 'altme', align: 'center',title: '单位'} |
| | | ,{field: 'zpallet', align: 'center',title: '托盘条码'} |
| | | ,{field: 'bname', align: 'center',title: '用户ID'} |
| | | ,{field: 'memo', align: 'center',title: '备注'} |
| | | |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:50} |
| | | ]], |
| | | 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; |
| | | form.on('checkbox(tableCheckbox)', function (data) { |
| | | var _index = $(data.elem).attr('table-index')||0; |
| | | if(data.elem.checked){ |
| | | res.data[_index][data.value] = 'Y'; |
| | | }else{ |
| | | res.data[_index][data.value] = 'N'; |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | }); |
| | | |
| | | // 关闭动作 |
| | | $(document).on('click','#data-detail-close', function () { |
| | | parent.layer.closeAll(); |
| | | }); |
| | | |
| | | function tableReload(child) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | (child ? parent.tableIns : tableIns).reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: pageCurr |
| | | }, |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | if (res.data.length === 0 && count !== 0) { |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: pageCurr-1 |
| | | } |
| | | }); |
| | | pageCurr -= 1; |
| | | } |
| | | limit(child); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function setFormVal(el, data, showImg) { |
| | | for (var val in data) { |
| | | var find = el.find(":input[id='" + val + "']"); |
| | | if (find[0]!=null){ |
| | | if (find[0].type === 'checkbox'){ |
| | | if (data[val]==='Y'){ |
| | | find.attr("checked","checked"); |
| | | find.val('Y'); |
| | | } else { |
| | | find.remove("checked"); |
| | | find.val('N'); |
| | | } |
| | | continue; |
| | | } |
| | | } |
| | | find.val(data[val]); |
| | | if (showImg){ |
| | | var next = find.next(); |
| | | if (next.get(0)){ |
| | | if (next.get(0).localName === "img") { |
| | | find.hide(); |
| | | next.attr("src", data[val]); |
| | | next.show(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | function clearFormVal(el) { |
| | | $(':input', el) |
| | | .val('') |
| | | .removeAttr('checked') |
| | | .removeAttr('selected'); |
| | | } |
| | | |
| | | function detailScreen(index) { |
| | | var detail = layer.getChildFrame('#data-detail', index); |
| | | var height = detail.height()+60; |
| | | if (height > ($(window).height()*0.9)) { |
| | | height = ($(window).height()*0.8); |
| | | } |
| | | layer.style(index, { |
| | | // top: (($(window).height()-height)/3)+"px", |
| | | height: height+'px' |
| | | }); |
| | | } |
| | | |
| | | $('body').keydown(function () { |
| | | if (event.keyCode === 13) { |
| | | $("#search").click(); |
| | | } |
| | | }); |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <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/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/common.css" media="all"> |
| | | <style> |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <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> |
| | | <table class="layui-hide" id="wrkDetlByMast" lay-filter="wrkDetlByMast"></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/locMast/locMast.js" charset="utf-8"></script> |
| | | <script type="text/javascript"> |
| | | var pageCur; |
| | | function getCol() { |
| | | var cols = [ |
| | | {field: 'wrkNo', align: 'center',title: '工作号'} |
| | | ,{field: 'ioTime$', align: 'center',title: '工作时间'} |
| | | ]; |
| | | cols.push.apply(cols, detlCols); |
| | | return cols; |
| | | } |
| | | layui.use(['table','laydate', 'form'], function() { |
| | | table = layui.table; |
| | | var $ = layui.jquery; |
| | | var form = layui.form; |
| | | |
| | | $('#wrkNo').val(parent.wrkNo); |
| | | // 数据渲染 |
| | | tableIns1 = table.render({ |
| | | elem: '#wrkDetlByMast', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/wrkDetl/list/auth', |
| | | where: {wrk_no: parent.wrkNo}, |
| | | page: true, |
| | | limit: 16, |
| | | limits: [16, 30, 50, 100, 200, 500], |
| | | even: true, |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | cols: [getCol()], |
| | | 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; |
| | | form.on('checkbox(tableCheckbox)', function (data) { |
| | | var _index = $(data.elem).attr('table-index')||0; |
| | | if(data.elem.checked){ |
| | | res.data[_index][data.value] = 'Y'; |
| | | }else{ |
| | | res.data[_index][data.value] = 'N'; |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | </script> |
| | | </html> |
| | | |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <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/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/common.css" media="all"> |
| | | <style> |
| | | .layui-btn .layui-icon { |
| | | margin: 0; |
| | | } |
| | | #btn-pri-add { |
| | | display: none; |
| | | } |
| | | #btn-pri-red { |
| | | display: none; |
| | | } |
| | | .btn-complete { |
| | | display: none; |
| | | } |
| | | .btn-cancel { |
| | | display: none; |
| | | } |
| | | .btn-pick { |
| | | display: none; |
| | | } |
| | | |
| | | /*明细表*/ |
| | | #detlTable { |
| | | margin-top: 20px; |
| | | } |
| | | |
| | | #search-box { |
| | | padding: 30px 30px 10px 30px; |
| | | } |
| | | #search-box .layui-inline { |
| | | margin-right: 5px; |
| | | } |
| | | #data-search-btn { |
| | | margin-top: 10px; |
| | | } |
| | | #data-search-btn.layui-btn-container .layui-btn { |
| | | margin-right: 20px; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | |
| | | <!-- 搜索栏 --> |
| | | <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="wrk_no" placeholder="工作号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="owner" placeholder="拥有者编号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="wrkSts" class="layui-input" name="wrk_sts" type="text" placeholder="请输入" autocomplete="off" 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"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="crn_no" placeholder="堆垛机号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <!-- 日期范围 --> |
| | | <div class="layui-inline" style="width: 300px"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input layui-laydate-range" name="io_time" type="text" placeholder="起始时间 - 终止时间" autocomplete="off" style="width: 300px"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="condition" placeholder="请输入" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <!-- 待添加 --> |
| | | <div id="data-search-btn" class="layui-btn-container layui-form-item"> |
| | | <button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="search">搜索</button> |
| | | <button id="reset" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="reset">重置</button> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 表格 --> |
| | | <div class="layui-form"> |
| | | <table class="layui-hide" id="wrkMast" lay-filter="wrkMast"></table> |
| | | </div> |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn layui-btn-normal" id="btn-pri-add" lay-event="priAdd"><i class="layui-icon"></i>增加优先级</button> |
| | | <button class="layui-btn layui-btn-normal" id="btn-pri-red" lay-event="priRed"><i class="layui-icon"></i>降低优先级</button> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData">导出</button> |
| | | </div> |
| | | </script> |
| | | |
| | | <!--明细表--> |
| | | <div id="detlTable" style="display: none"> |
| | | <div class="layui-inline" style="width:90%;margin-top: 10px;margin-left: 20px"> |
| | | <span style=" color: indianred">以下为当前工作流的物料明细</span> |
| | | </div> |
| | | |
| | | <table class="layui-hide" id="wrkDetlByMap" lay-filter="wrkDetlByMap"></table> |
| | | </div> |
| | | |
| | | <script type="text/html" id="operate"> |
| | | {{#if (d.preHave === 'Y' && d.wrkSts === 3) { }} |
| | | <a class="layui-btn layui-btn-primary layui-border-red layui-btn-xs btn-error" lay-event="preHave">先入品</a> |
| | | {{# } }} |
| | | {{#if (d.takeNone === 'Y' && d.wrkSts === 12) { }} |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs btn-error" lay-event="takeNone">空操作</a> |
| | | {{# } }} |
| | | <a class="layui-btn layui-btn-xs btn-detlShow" lay-event="detlShow">明细</a> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs btn-complete" lay-event="complete">完成</a> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs btn-cancel" lay-event="cancel">取消</a> |
| | | {{#if (d.ioType === 103) { }} |
| | | <a class="layui-btn layui-btn-warm layui-btn-xs btn-pick" lay-event="pick">拣</a> |
| | | {{# } }} |
| | | {{#if (d.ioType === 107) { }} |
| | | <a class="layui-btn layui-btn-warm layui-btn-xs btn-pick" lay-event="pick">盘</a> |
| | | {{# } }} |
| | | </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> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/wrkMast/wrkMast.js" charset="utf-8"></script> |
| | | |
| | | <iframe id="detail-iframe" scrolling="auto" style="display:none;"></iframe> |
| | | |
| | | </body> |
| | | </html> |
| | | |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <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/layui/css/layui.css" media="all"> |
| | | <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%;"> |
| | | <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, 'wrkMast')"> |
| | | </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" 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" 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" 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"> |
| | | </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" 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" 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="refIotime$" 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="memo" 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="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> |
| | | </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/wrkMast/wrkMast.js" charset="utf-8"></script> |
| | | </html> |
| | | |