| | |
| | | |
| | | @RequestMapping(value = "/locArea/queryAll/auth") |
| | | @ManagerAuth |
| | | public R queryAll() { |
| | | List<LocArea> result = locAreaService.queryAllLocArea(); |
| | | public R queryAll(String areaType) { |
| | | List<LocArea> result = locAreaService.queryAllLocArea(areaType); |
| | | return R.ok(result); |
| | | } |
| | | } |
| | |
| | | vo.setMatNo(waitPakin.getMatnr()); |
| | | vo.setMatName(waitPakin.getMaktx()); |
| | | vo.setCount(waitPakin.getAnfme()); |
| | | vo.setWarehouse(waitPakin.getWarehouse()); |
| | | vo.setMnemonic(waitPakin.getMnemonic()); |
| | | vos.add(vo); |
| | | } |
| | | } |
| | |
| | | |
| | | private String warehouse; |
| | | |
| | | private String mnemonic; |
| | | |
| | | } |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.core.common.SpringUtils; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.core.common.SpringUtils; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @TableName("asr_loc_area") |
| | |
| | | /** |
| | | * ID |
| | | */ |
| | | @ApiModelProperty(value= "ID") |
| | | @ApiModelProperty(value = "ID") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 库区编号 |
| | | */ |
| | | @ApiModelProperty(value= "库区编号") |
| | | @ApiModelProperty(value = "库区编号") |
| | | private String uuid; |
| | | |
| | | /** |
| | | * 库区名称 |
| | | */ |
| | | @ApiModelProperty(value= "库区名称") |
| | | @ApiModelProperty(value = "库区名称") |
| | | private String name; |
| | | |
| | | /** |
| | | * 状态 1: 正常 0: 禁用 |
| | | * 状态 1: 正常 0: 禁用 |
| | | */ |
| | | @ApiModelProperty(value= "状态 1: 正常 0: 禁用 ") |
| | | @ApiModelProperty(value = "状态 1: 正常 0: 禁用 ") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 添加人员 |
| | | */ |
| | | @ApiModelProperty(value= "添加人员") |
| | | @ApiModelProperty(value = "添加人员") |
| | | @TableField("create_by") |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("create_time") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @ApiModelProperty(value = "修改人员") |
| | | @TableField("update_by") |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("update_time") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | @ApiModelProperty(value = "备注") |
| | | private String memo; |
| | | |
| | | public LocArea() {} |
| | | /** |
| | | * 库区类型 |
| | | */ |
| | | @ApiModelProperty(value = "库区类型") |
| | | @TableField("area_type") |
| | | private String areaType; |
| | | |
| | | public LocArea(String uuid,String name,Integer status,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { |
| | | public LocArea() { |
| | | } |
| | | |
| | | public LocArea(String uuid, String name, Integer status, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo, String areaType) { |
| | | this.uuid = uuid; |
| | | this.name = name; |
| | | this.status = status; |
| | |
| | | this.updateBy = updateBy; |
| | | this.updateTime = updateTime; |
| | | this.memo = memo; |
| | | this.areaType = areaType; |
| | | } |
| | | |
| | | // LocArea locArea = new LocArea( |
| | |
| | | return status; |
| | | } |
| | | |
| | | public String getStatus$(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | public String getStatus$() { |
| | | if (null == this.status) { |
| | | return null; |
| | | } |
| | | switch (this.status) { |
| | | case 1: |
| | | return "正常"; |
| | | case 0: |
| | |
| | | return createBy; |
| | | } |
| | | |
| | | public String getCreateBy$(){ |
| | | public String getCreateBy$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.createBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | |
| | | return createTime; |
| | | } |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | | public String getCreateTime$() { |
| | | if (Cools.isEmpty(this.createTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | |
| | | return updateBy; |
| | | } |
| | | |
| | | public String getUpdateBy$(){ |
| | | public String getUpdateBy$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.updateBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | |
| | | return updateTime; |
| | | } |
| | | |
| | | public String getUpdateTime$(){ |
| | | if (Cools.isEmpty(this.updateTime)){ |
| | | public String getUpdateTime$() { |
| | | if (Cools.isEmpty(this.updateTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); |
| | |
| | | } |
| | | |
| | | |
| | | public String getAreaType() { |
| | | return areaType; |
| | | } |
| | | |
| | | public void setAreaType(String areaType) { |
| | | this.areaType = areaType; |
| | | } |
| | | } |
| | |
| | | import com.zy.asrs.entity.LocArea; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | |
| | | @Mapper |
| | | @Repository |
| | | public interface LocAreaMapper extends BaseMapper<LocArea> { |
| | | List<LocArea> queryAllLocArea(); |
| | | List<LocArea> queryAllLocArea(@Param("areaType") String areaType); |
| | | } |
| | |
| | | import java.util.List; |
| | | |
| | | public interface LocAreaService extends IService<LocArea> { |
| | | List<LocArea> queryAllLocArea (); |
| | | List<LocArea> queryAllLocArea (String areaType); |
| | | } |
| | |
| | | public class LocAreaServiceImpl extends ServiceImpl<LocAreaMapper, LocArea> implements LocAreaService { |
| | | |
| | | @Override |
| | | public List<LocArea> queryAllLocArea() { |
| | | return baseMapper.queryAllLocArea(); |
| | | public List<LocArea> queryAllLocArea(String areaType) { |
| | | return baseMapper.queryAllLocArea(areaType); |
| | | } |
| | | } |
| | |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.zy.asrs.entity.LocArea"> |
| | | <id column="id" property="id" /> |
| | | <result column="uuid" property="uuid" /> |
| | | <result column="name" property="name" /> |
| | | <result column="status" property="status" /> |
| | | <result column="create_by" property="createBy" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_by" property="updateBy" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="memo" property="memo" /> |
| | | <id column="id" property="id"/> |
| | | <result column="uuid" property="uuid"/> |
| | | <result column="name" property="name"/> |
| | | <result column="status" property="status"/> |
| | | <result column="create_by" property="createBy"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="update_by" property="updateBy"/> |
| | | <result column="update_time" property="updateTime"/> |
| | | <result column="memo" property="memo"/> |
| | | |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="queryAllLocArea" resultMap="BaseResultMap"> |
| | | select * from asr_loc_area |
| | | <choose> |
| | | <when test="areaType == 1"> |
| | | select * from asr_loc_area where area_type = '1' |
| | | </when> |
| | | <otherwise> |
| | | select * from asr_loc_area where area_type != '1' or area_type is null |
| | | </otherwise> |
| | | </choose> |
| | | </select> |
| | | </mapper> |
| | |
| | | line-height: 30px; |
| | | } |
| | | #code { |
| | | width: 75%; |
| | | width: 70%; |
| | | height: 40px; |
| | | margin-right: 0; |
| | | } |
| | |
| | | // 详情窗口-宽度 |
| | | var detailWidth = '90%'; |
| | | |
| | | function getQueryVariable(variable) |
| | | { |
| | | var query = window.location.search.substring(1); |
| | | var vars = query.split("&"); |
| | | for (var i=0;i<vars.length;i++) { |
| | | var pair = vars[i].split("="); |
| | | if(pair[0] == variable){return pair[1];} |
| | | } |
| | | return(false); |
| | | } |
| | | |
| | | // 非空判断 |
| | | function isEmpty(obj){ |
| | | return typeof obj == "undefined" || obj == null || obj === ""; |
| | |
| | | } |
| | | |
| | | var data = { |
| | | // id: $('#id').val(), |
| | | id: $('#id').val(), |
| | | uuid: $('#uuid').val(), |
| | | name: $('#name').val(), |
| | |
| | | updateBy: $('#updateBy').val(), |
| | | updateTime: top.strToDate($('#updateTime\\$').val()), |
| | | memo: $('#memo').val(), |
| | | |
| | | areaType: $('#areaType').val() === "" ? null : $('#areaType').val(), |
| | | }; |
| | | var index = layer.load(1, { |
| | | shade: [0.5,'#000'] //0.1透明度的背景 |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">库区类型:</label> |
| | | <div class="layui-input-inline"> |
| | | <select id="areaType"> |
| | | <option value="0">无</option> |
| | | <option value="1">材料仓库</option> |
| | | </select> |
| | | </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"> |
| | |
| | | <!-- 头部 --> |
| | | <header> |
| | | <div class="layui-input-inline"> |
| | | <label class="layui-form-label">条码</label> |
| | | <label class="layui-form-label">托盘码</label> |
| | | <input class="layui-input" type="number" id="code" onkeyup="findCode(this)" oninput="if(value.length>8)value=value.slice(0,8)" placeholder="扫码 / 输入" autocomplete="off"> |
| | | </div> |
| | | <div style="margin: 5px 5px"> |
| | |
| | | <body> |
| | | <!-- 头部 --> |
| | | <header> |
| | | <div class="layui-input-inline"> |
| | | <label class="layui-form-label">条码</label> |
| | | <input class="layui-input" type="number" id="code" onkeyup="findCode(this)" oninput="if(value.length>8)value=value.slice(0,8)" placeholder="扫码 / 输入" autocomplete="off"> |
| | | </div> |
| | | <div class="layui-input-inline" style="margin-top: 5px"> |
| | | <label class="layui-form-label">单号</label> |
| | | <input class="layui-input" id="billNo" oninput="find(this)" placeholder="扫码 / 输入" autocomplete="off" style="width: 75%; height: 40px; margin-right: 0;"> |
| | | <label class="layui-form-label"> 单号</label> |
| | | <input class="layui-input" id="billNo" oninput="find(this)" placeholder="扫码 / 输入" autocomplete="off" style="width: 70%; height: 40px; margin-right: 0;"> |
| | | </div> |
| | | <div class="layui-input-inline"> |
| | | <label class="layui-form-label">托盘码</label> |
| | | <input class="layui-input" type="number" id="code" onkeyup="findCode(this)" oninput="if(value.length>8)value=value.slice(0,8)" placeholder="扫码 / 输入" autocomplete="off"> |
| | | </div> |
| | | </header> |
| | | |
| | |
| | | |
| | | </body> |
| | | <script> |
| | | window.onload = function(){document.getElementById("code").focus();} |
| | | window.onload = function(){document.getElementById("billNo").focus();} |
| | | var tableIns; |
| | | var countLayer; |
| | | layui.use(['table','laydate', 'form'], function() { |
| | |
| | | limit: 500, |
| | | cellMinWidth: 50, |
| | | cols: [[ |
| | | {fixed: 'left', align: 'center', field: 'count', title: '数量', event: 'modify', style:'cursor: pointer;color: blue', width:50}, |
| | | {field: 'matNo', align: 'center', title: '物料编码'}, |
| | | {field: 'warehouse', align: 'center', title: '生产单号'} |
| | | {field: 'mnemonic', align: 'center', title: '生产单号'}, |
| | | {fixed: 'right', align: 'center', field: 'count', title: '数量', event: 'modify', style:'cursor: pointer;color: blue', width:50}, |
| | | // {field: 'matName', align: 'center', title: '物料名称'} |
| | | ]], |
| | | done: function (res, curr, count) { |
| | |
| | | }); |
| | | |
| | | function findCode(el) { |
| | | if (el.value.length === 7) { |
| | | $('#billNo').focus(); |
| | | } |
| | | // if (el.value.length === 7) { |
| | | // $('#code').focus(); |
| | | // } |
| | | } |
| | | |
| | | // 添加表格数据 |
| | |
| | | } |
| | | } |
| | | tableIns.reload({data: matData}); |
| | | $("#comb-btn").focus(); |
| | | // $("#comb-btn").focus(); |
| | | } |
| | | |
| | | |
| | |
| | | tips(res.msg, true) |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | /************************************* 数量 ****************************************/ |
| | |
| | | height: 80px; |
| | | font-size: 24px; |
| | | } |
| | | .nav-font-size { |
| | | font-size: 18px; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | |
| | | <!-- 导航菜单 --> |
| | | <table id="navList" style="width: 100%; border-color: #e6e6e6" border="0" cellspacing="2"> |
| | | <table id="navList" style="width: 100%; border-color: #e6e6e6;" border="0" cellspacing="2"> |
| | | <tr> |
| | | <td> |
| | | <div id="comb" onclick="nav(this.id)">组托</div> |
| | | <div id="comb" onclick="nav(this.id)" class="nav-font-size">立库组托入库</div> |
| | | </td> |
| | | <td> |
| | | <div id="combPro" onclick="nav(this.id)">关联组托</div> |
| | | <div id="combPro" onclick="nav(this.id)" style="font-size: 15px">立库任务单入库</div> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <div id="stockIn" onclick="nav(this.id)">入库</div> |
| | | <div id="stockIn" onclick="nav(this.id)" class="nav-font-size">立库配件入库</div> |
| | | </td> |
| | | <td> |
| | | <div id="stockOut" onclick="nav(this.id)">出库</div> |
| | | <div id="stockOut" onclick="nav(this.id)" class="nav-font-size">立库配件出库</div> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <div id="locNormalIn" onclick="nav(this.id)">平仓入库</div> |
| | | <div id="locNormalIn1" onclick="nav(this.id)" class="nav-font-size">平仓材料入库</div> |
| | | </td> |
| | | <td> |
| | | <div id="locNormalOut" onclick="nav(this.id)">平仓出库</div> |
| | | <div id="locNormalOut1" onclick="nav(this.id)" class="nav-font-size">平仓材料出库</div> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <div id="locNormalMove" onclick="nav(this.id)">平仓移库</div> |
| | | <div id="locNormalIn" onclick="nav(this.id)" class="nav-font-size">平仓成品入库</div> |
| | | </td> |
| | | <td> |
| | | <div id="locNormalOut" onclick="nav(this.id)" class="nav-font-size">平仓成品出库</div> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <div id="locNormalMove" onclick="nav(this.id)" class="nav-font-size">平仓成品移库</div> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | |
| | | function nav(id) { |
| | | // $('.nav-select').attr("class", "nav-unselect"); |
| | | // $('#' + id).attr("class", "nav-select"); |
| | | $('#content').attr("src", id + ".html"); |
| | | |
| | | if (id === 'locNormalIn1') { |
| | | $('#content').attr("src", "locNormalIn.html?areaType=1"); |
| | | } else if (id === 'locNormalOut1') { |
| | | $('#content').attr("src", "locNormalOut.html?areaType=1"); |
| | | } else { |
| | | $('#content').attr("src", id + ".html"); |
| | | } |
| | | $('#navList').css('display', 'none'); |
| | | $('#content').css('display', 'block'); |
| | | } |
| | |
| | | <title>平仓入库</title> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/pda.css" media="all"> |
| | | |
| | | <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> |
| | |
| | | </head> |
| | | <body> |
| | | <!-- 头部 --> |
| | | <header> |
| | | <header class="layui-form"> |
| | | <div> |
| | | <div class="layui-input-inline"> |
| | | <label class="layui-form-label">库区</label> |
| | | <input class="layui-input" id="uuid" onkeyup="exist(this.id, 'locArea')" placeholder="扫码 / 输入" |
| | | autocomplete="off"> |
| | | <div class="layui-input-inline" style="margin-left: 5px;width: 180px"> |
| | | <select id="uuid"> |
| | | <option value="">请选择</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | } |
| | | }); |
| | | |
| | | var areaType = getQueryVariable('areaType'); |
| | | // 获取仓库下拉 |
| | | $.ajax({ |
| | | url: baseUrl + "/locArea/queryAll/auth?areaType=" + (areaType ? areaType : ""), |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | var html = ""; |
| | | if (res.data && res.data.length > 0) { |
| | | html += res.data.map(function (item) { |
| | | return "<Option value=" + item.uuid + ">" + item.name + "</Option>"; |
| | | }); |
| | | } |
| | | $('#uuid').append(html); |
| | | layui.form.render('select'); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | window.onload = function () { |
| | | document.getElementById("uuid").focus(); |
| | | } |
| | | |
| | | function findCode(el) { |
| | | |
| | | } |
| | | |
| | | var matCodeLayerIdx; |
| | |
| | | // 组托 |
| | | function comb() { |
| | | let barcode = $('#uuid').val(); |
| | | console.log('barcode', barcode); |
| | | if (isEmpty(barcode)) { |
| | | tips("库区条码为空", true); |
| | | tips("请选择库区", true); |
| | | document.getElementById("uuid").focus(); |
| | | return; |
| | | } |
| | |
| | | |
| | | // 重置 |
| | | function reset() { |
| | | $('#uuid').val(""); |
| | | matData = []; |
| | | tableIns.reload({data: matData}); |
| | | layer.closeAll(); |
| | |
| | | </head> |
| | | <body> |
| | | <!-- 头部 --> |
| | | <header> |
| | | <header class="layui-form"> |
| | | <div> |
| | | <div class="layui-input-inline"> |
| | | <label class="layui-form-label">物料编码</label> |
| | |
| | | <div> |
| | | <div class="layui-input-inline"> |
| | | <label class="layui-form-label" style="margin-left: 16px">源库区</label> |
| | | <input class="layui-input" id="warehouse1" onkeyup="find(true)" placeholder="扫码 / 输入" |
| | | autocomplete="off" style="width: 60%"> |
| | | <!--<input class="layui-input" id="warehouse1" onkeyup="find(true)" placeholder="扫码 / 输入"--> |
| | | <!--autocomplete="off" style="width: 60%">--> |
| | | <div class="layui-input-inline" style="width: 180px"> |
| | | <select id="warehouse1" lay-filter="warehouse1"> |
| | | <option value="">请选择</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <div class="layui-input-inline"> |
| | | <label class="layui-form-label">目标库区</label> |
| | | <input class="layui-input" id="warehouse2" placeholder="扫码 / 输入" |
| | | autocomplete="off" style="width: 60%" onkeyup="exist('uuid', 'locArea', 'warehouse2')"> |
| | | <!--<input class="layui-input" id="warehouse2" placeholder="扫码 / 输入"--> |
| | | <!--autocomplete="off" style="width: 60%" onkeyup="exist('uuid', 'locArea', 'warehouse2')">--> |
| | | <div class="layui-input-inline" style="width: 180px"> |
| | | <select id="warehouse2"> |
| | | <option value="">请选择</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </header> |
| | |
| | | limit: 500, |
| | | cellMinWidth: 50, |
| | | cols: [[ |
| | | {type: 'checkbox', fixed: 'left', width: 30}, |
| | | {field: 'matnr', align: 'center', title: '编码', event: 'detail', width: 80}, |
| | | {field: 'maktx', align: 'center', title: '名称', event: 'detail'}, |
| | | {field: 'warehouse', align: 'center', title: '库区', event: 'detail', width: 50} |
| | | {field: 'warehouse', align: 'center', title: '库区', event: 'detail', width: 50}, |
| | | {type: 'checkbox', fixed: 'right', width: 30}, |
| | | ]], |
| | | done: function (res, curr, count) { |
| | | } |
| | | }); |
| | | |
| | | form.on('select(warehouse1)', function (data) { |
| | | var val = data.value; |
| | | find(true); |
| | | }); |
| | | |
| | | // 获取仓库下拉 |
| | | $.ajax({ |
| | | url: baseUrl + "/locArea/queryAll/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | var html = ""; |
| | | if (res.data && res.data.length > 0) { |
| | | html += res.data.map(function (item) { |
| | | return "<Option value=" + item.uuid + ">" + item.name + "</Option>"; |
| | | }); |
| | | } |
| | | $('#warehouse1').append(html); |
| | | $('#warehouse2').append(html); |
| | | layui.form.render('select'); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | |
| | | } |
| | | |
| | | function reset() { |
| | | $('#warehouse1').val(""); |
| | | $('#warehouse2').val(""); |
| | | // $('#warehouse1').val(""); |
| | | // $('#warehouse2').val(""); |
| | | $('#matnr').val(""); |
| | | tableIns.reload({data: []}); |
| | | layer.closeAll(); |
| | |
| | | display: inline-block; |
| | | width: 120px; |
| | | } |
| | | |
| | | .number-tool:after { |
| | | clear: both; |
| | | content: ""; |
| | | display: table; |
| | | } |
| | | |
| | | .number-tool button { |
| | | background-color: #fff; |
| | | margin-top: 3px; |
| | |
| | | width: 25px; |
| | | border: 1px solid #777777; |
| | | } |
| | | |
| | | .number-tool input { |
| | | text-align: center; |
| | | height: 30px; |
| | |
| | | </style> |
| | | <body> |
| | | |
| | | <header> |
| | | <div> |
| | | <div class="layui-input-inline"> |
| | | <label class="layui-form-label" style="margin-left: 32px">库区</label> |
| | | <input class="layui-input" id="uuid" onkeyup="findCode(this, 'uuid')" placeholder="扫码 / 输入" |
| | | autocomplete="off"> |
| | | </div> |
| | | <div class="layui-input-inline"> |
| | | <label class="layui-form-label">物料编码</label> |
| | | <input class="layui-input" id="matnr" onkeyup="findCode(this, 'matnr')" placeholder="扫码 / 输入" style="width: 65%" |
| | | autocomplete="off"> |
| | | <header class="layui-form"> |
| | | <div class="layui-input-inline"> |
| | | <label class="layui-form-label">物料编码</label> |
| | | <input class="layui-input" id="matnr" onkeyup="findCode(this, 'matnr')" placeholder="扫码 / 输入" style="width: 65%" |
| | | autocomplete="off"> |
| | | </div> |
| | | <div class="layui-input-inline"> |
| | | <label class="layui-form-label" style="margin-left: 28px">库区</label> |
| | | <div class="layui-input-inline" style="margin-left: 5px;width: 180px"> |
| | | <select id="uuid" lay-filter="uuid"> |
| | | <option value="">请选择</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | </header> |
| | | |
| | | <main> |
| | |
| | | </div> |
| | | <div class="form-item"> |
| | | <span>名称</span> |
| | | <input id="maktx2" type="text" disabled="disabled" style="width: 70%"> |
| | | <textarea rows="2" style="width: 70%; resize: none" id="maktx2" type="text" disabled="disabled" readonly="readonly"></textarea> |
| | | </div> |
| | | <input id="index" type="text" disabled="disabled" style="display: none;"> |
| | | <div class="form-item" style="margin-top: 5px; margin-bottom: 8px"> |
| | | <span style="vertical-align: middle">数量</span> |
| | | <div class="number-tool" style="vertical-align: middle"> |
| | | <button onclick="reduce()">-</button><input id="anfme2" type="number" onchange="fix(this)"><button onclick="add()">+</button> |
| | | <button onclick="reduce()">-</button> |
| | | <input id="anfme2" type="number" onchange="fix(this)"> |
| | | <button onclick="add()">+</button> |
| | | </div> |
| | | </div> |
| | | <button id="remove" onclick="remove()">移除</button> |
| | |
| | | // 表格数据 |
| | | var normalOutList = []; |
| | | window.onload = function () { |
| | | document.getElementById("uuid").focus(); |
| | | document.getElementById("matnr").focus(); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param warn true:红色字体 |
| | | */ |
| | | function tips(msg, warn) { |
| | | layer.msg(msg, {icon: warn?2:1}) |
| | | layer.msg(msg, {icon: warn ? 2 : 1}) |
| | | } |
| | | |
| | | function back() { |
| | |
| | | } |
| | | |
| | | var tableIns; |
| | | layui.use(['table','laydate', 'form'], function() { |
| | | layui.use(['table', 'laydate', 'form'], function () { |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | |
| | | limit: 500, |
| | | cellMinWidth: 50, |
| | | cols: [[ |
| | | {type: 'checkbox', fixed: 'left', width:30}, |
| | | {field: 'anfmeOut', align: 'center', title: '数量', event: 'detail', style:'color: blue', event: 'modify', style:'cursor: pointer;color: blue', width:50}, |
| | | {field: 'matnr', align: 'center', title: '编码', event: 'detail', width:80}, |
| | | {field: 'matnr', align: 'center', title: '编码', event: 'detail', width: 80}, |
| | | {field: 'maktx', align: 'center', title: '名称', event: 'detail'}, |
| | | {field: 'warehouse', align: 'center', title: '库区', event: 'detail', width:50} |
| | | {field: 'warehouse', align: 'center', title: '库区', event: 'detail', width: 50}, |
| | | { |
| | | field: 'anfmeOut', |
| | | align: 'center', |
| | | title: '数量', |
| | | event: 'detail', |
| | | style: 'color: blue', |
| | | event: 'modify', |
| | | style: 'cursor: pointer;color: blue', |
| | | width: 50 |
| | | }, |
| | | {type: 'checkbox', fixed: 'right', width: 30}, |
| | | ]], |
| | | done: function (res, curr, count) { |
| | | } |
| | |
| | | |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(locNormalOut)', function(obj) { |
| | | table.on('tool(locNormalOut)', function (obj) { |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | case 'modify': |
| | |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | form.on('select(uuid)', function (data) { |
| | | var val = data.value; |
| | | findCode(this, 'uuid'); |
| | | }); |
| | | |
| | | var areaType = getQueryVariable('areaType'); |
| | | // 获取仓库下拉 |
| | | $.ajax({ |
| | | url: baseUrl + "/locArea/queryAll/auth?areaType=" + (areaType ? areaType : ""), |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | var html = ""; |
| | | if (res.data && res.data.length > 0) { |
| | | html += res.data.map(function (item) { |
| | | return "<Option value=" + item.uuid + ">" + item.name + "</Option>"; |
| | | }); |
| | | } |
| | | $('#uuid').append(html); |
| | | layui.form.render('select'); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | var warehouseBar; |
| | | var matnrBar; |
| | | |
| | | /* 扫码、输入库区和物料编码 */ |
| | | function findCode(el, type) { |
| | | warehouseBar = $('#uuid').val(); |
| | | ; |
| | | switch (type) { |
| | | case 'uuid': |
| | | warehouseBar = el.value; |
| | | exist('uuid', 'locArea'); |
| | | // exist('uuid', 'locArea'); |
| | | break; |
| | | case 'matnr': |
| | | matnrBar = el.value; |
| | | matnrBar = el.value; |
| | | break; |
| | | default: |
| | | break; |
| | |
| | | } |
| | | |
| | | $.ajax({ |
| | | url: baseUrl + "/locNormal/pda/out/query?matnr="+matnrBar+"&warehouse="+warehouseBar, |
| | | url: baseUrl + "/locNormal/pda/out/query?matnr=" + matnrBar + "&warehouse=" + warehouseBar, |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | // contentType: 'application/json;charset=UTF-8', |
| | | method: 'GET', |
| | |
| | | if (res.data && res.data.length > 0) { |
| | | res.data.map(function (item) { |
| | | // 默认赋值0开始 |
| | | item.anfmeOut = 0; |
| | | item.anfmeOut = 0; |
| | | }); |
| | | } |
| | | tableIns.reload({ |
| | |
| | | |
| | | /* 修改数量 */ |
| | | var countDom = $('#anfme2'); |
| | | |
| | | function add() { |
| | | if (countDom.val() >= maxCount) { |
| | | return; |
| | | } |
| | | countDom.val(Number(countDom.val()) + 1); |
| | | } |
| | | |
| | | function reduce() { |
| | | if (countDom.val() <= 0) { |
| | | return; |
| | | } |
| | | countDom.val(Number(countDom.val()) - 1); |
| | | } |
| | | |
| | | function fix(e) { |
| | | if (Number(e.value) > maxCount) { |
| | | countDom.val(maxCount); |
| | | } |
| | | } |
| | | |
| | | function remove() { |
| | | var matnr = $('#matnr2').val(); |
| | | var index = $('#index').val(); |
| | | for (var j=0;j<normalOutList.length;j++){ |
| | | for (var j = 0; j < normalOutList.length; j++) { |
| | | if (matnr === normalOutList[j].matnr && index == normalOutList[j].id) { |
| | | normalOutList.splice(j, 1); |
| | | } |
| | |
| | | layer.close(countLayer); |
| | | tips("移除成功"); |
| | | } |
| | | |
| | | // 修改数量 |
| | | function confirm(){ |
| | | function confirm() { |
| | | var matnr = $('#matnr2').val(); |
| | | var count = $('#anfme2').val(); |
| | | var index = $('#index').val(); |
| | | for (var j=0;j<normalOutList.length;j++){ |
| | | for (var j = 0; j < normalOutList.length; j++) { |
| | | if (matnr === normalOutList[j].matnr && index == normalOutList[j].id) { |
| | | if (count > maxCount || count < 0) { |
| | | tips("数量不能超过范围", true); |
| | |
| | | // 库区赋值 |
| | | var warehouse = $('#uuid').val(); |
| | | data.map(function (item) { |
| | | item.warehouse = warehouse; |
| | | item.warehouse = warehouse; |
| | | }); |
| | | // 出库接口 |
| | | $.ajax({ |
| | |
| | | if (res.code === 200) { |
| | | layer.msg("出库成功"); |
| | | $("#matnr").val(null); |
| | | $("#uuid").val(null); |
| | | // $("#uuid").val(null); |
| | | warehouseBar = null; |
| | | matnrBar = null; |
| | | normalOutList = []; |
| | |
| | | <input id="matNo" type="text" placeholder="扫码 / 输入" onkeyup="find(this)" autocomplete="off"> |
| | | </div> |
| | | <div class="form-item"> |
| | | <span>物料名称</span> |
| | | <input id="matName" type="text" disabled="disabled"> |
| | | <span style="margin-right: 10px">物料名称</span> |
| | | <textarea rows="2" style="width: 125px; resize: none" id="matName" type="text" disabled="disabled" readonly="readonly"></textarea> |
| | | </div> |
| | | <div class="form-item"> |
| | | <span>物料规格</span> |
| | | <input id="str2" type="text" disabled="disabled"> |
| | | </div> |
| | | <div class="form-item"> |
| | | <span>单位</span> |
| | | <input id="str1" type="text" disabled="disabled"> |
| | | </div> |
| | | <!--<div class="form-item">--> |
| | | <!--<span>单位</span>--> |
| | | <!--<input id="str1" type="text" disabled="disabled">--> |
| | | <!--</div>--> |
| | | <div class="form-item"> |
| | | <span style="vertical-align: middle">数量</span> |
| | | <div class="number-tool" style="vertical-align: middle"> |
| | |
| | | <!-- 头部 --> |
| | | <header> |
| | | <div class="layui-input-inline"> |
| | | <label class="layui-form-label">条码</label> |
| | | <label class="layui-form-label">托盘码</label> |
| | | <input class="layui-input" type="number" id="code" onkeyup="findCode(this)" oninput="if(value.length>8)value=value.slice(0,8)" placeholder="扫码 / 输入" autocomplete="off"> |
| | | </div> |
| | | <div style="margin: 5px 5px" class="layui-form"> |
| | |
| | | <!-- 头部 --> |
| | | <header class="layui-form"> |
| | | <div class="layui-input-inline"> |
| | | <label class="layui-form-label">物料</label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" type="text" id="matNo" onkeyup="findByMatNo(this)" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-input-inline"> |
| | | <label class="layui-form-label">库位</label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" type="number" id="locNo" onkeyup="findByLocNo(this)" autocomplete="off"> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="layui-input-inline"> |
| | | <label class="layui-form-label">物料</label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" type="text" id="matNo" onkeyup="findByMatNo(this)" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-input-inline"> |
| | | <label class="layui-form-label">出库口</label> |
| | |
| | | <script> |
| | | |
| | | window.onload = function(){ |
| | | document.getElementById("locNo").focus(); |
| | | document.getElementById("matNo").focus(); |
| | | getOutBound(); |
| | | } |
| | | |
| | |
| | | locDetlData = res.data; |
| | | tableIns.reload({data: locDetlData}); |
| | | } |
| | | $('#pakOut').focus(); |
| | | // $('#pakOut').focus(); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/pda"; |
| | | } else { |
| | |
| | | GO |
| | | ALTER TABLE [dbo].[OutStockbillEntry] ADD DEFAULT ((0)) FOR [fsecinvoiceqty] |
| | | GO |
| | | /* v1.0.5 2021.03.24 */ |
| | | alter table asr_loc_area add area_type varchar(10); |