王佳豪
2021-03-25 960d4eff85f99f138eda0ac360d2870882156a47
1.0.5
1.小太阳需求改动
22个文件已修改
447 ■■■■ 已修改文件
src/main/java/com/zy/asrs/controller/LocAreaController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/MobileController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/entity/CombBillQueryVo.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/entity/LocArea.java 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/mapper/LocAreaMapper.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/LocAreaService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/LocAreaServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/LocAreaMapper.xml 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/css/pda.css 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/common.js 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/locArea/locArea.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/locArea/locArea_detail.html 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/pda/comb.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/pda/combPro.html 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/pda/index.html 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/pda/locNormalIn.html 41 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/pda/locNormalMove.html 57 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/pda/locNormalOut.html 114 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/pda/matQuery.html 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/pda/stockIn.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/pda/stockOut.html 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
version/version/wjh.sql 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/LocAreaController.java
@@ -135,8 +135,8 @@
    @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);
    }
}
src/main/java/com/zy/asrs/controller/MobileController.java
@@ -119,7 +119,7 @@
                vo.setMatNo(waitPakin.getMatnr());
                vo.setMatName(waitPakin.getMaktx());
                vo.setCount(waitPakin.getAnfme());
                vo.setWarehouse(waitPakin.getWarehouse());
                vo.setMnemonic(waitPakin.getMnemonic());
                vos.add(vo);
            }
        }
src/main/java/com/zy/asrs/entity/CombBillQueryVo.java
@@ -16,4 +16,6 @@
    private String warehouse;
    private String mnemonic;
}
src/main/java/com/zy/asrs/entity/LocArea.java
@@ -12,18 +12,22 @@
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")
@@ -34,65 +38,73 @@
    /**
     * 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;
@@ -101,6 +113,7 @@
        this.updateBy = updateBy;
        this.updateTime = updateTime;
        this.memo = memo;
        this.areaType = areaType;
    }
//    LocArea locArea = new LocArea(
@@ -142,9 +155,11 @@
        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:
@@ -162,10 +177,10 @@
        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;
@@ -179,8 +194,8 @@
        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);
@@ -194,10 +209,10 @@
        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;
@@ -211,8 +226,8 @@
        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);
@@ -231,4 +246,11 @@
    }
    public String getAreaType() {
        return areaType;
    }
    public void setAreaType(String areaType) {
        this.areaType = areaType;
    }
}
src/main/java/com/zy/asrs/mapper/LocAreaMapper.java
@@ -3,6 +3,7 @@
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;
@@ -10,5 +11,5 @@
@Mapper
@Repository
public interface LocAreaMapper extends BaseMapper<LocArea> {
    List<LocArea> queryAllLocArea();
    List<LocArea> queryAllLocArea(@Param("areaType") String areaType);
}
src/main/java/com/zy/asrs/service/LocAreaService.java
@@ -6,5 +6,5 @@
import java.util.List;
public interface LocAreaService extends IService<LocArea> {
    List<LocArea> queryAllLocArea ();
    List<LocArea> queryAllLocArea (String areaType);
}
src/main/java/com/zy/asrs/service/impl/LocAreaServiceImpl.java
@@ -12,7 +12,7 @@
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);
    }
}
src/main/resources/mapper/LocAreaMapper.xml
@@ -4,20 +4,27 @@
    <!-- 通用查询映射结果 -->
    <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>
src/main/webapp/static/css/pda.css
@@ -31,7 +31,7 @@
    line-height: 30px;
}
#code {
    width: 75%;
    width: 70%;
    height: 40px;
    margin-right: 0;
}
src/main/webapp/static/js/common.js
@@ -7,6 +7,17 @@
// 详情窗口-宽度
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 === "";
src/main/webapp/static/js/locArea/locArea.js
@@ -314,7 +314,6 @@
        }
        var data = {
//            id: $('#id').val(),
            id: $('#id').val(),
            uuid: $('#uuid').val(),
            name: $('#name').val(),
@@ -324,7 +323,7 @@
            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透明度的背景
src/main/webapp/views/locArea/locArea_detail.html
@@ -44,6 +44,15 @@
            </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">
src/main/webapp/views/pda/comb.html
@@ -19,7 +19,7 @@
<!-- 头部 -->
<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">
src/main/webapp/views/pda/combPro.html
@@ -55,13 +55,13 @@
<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">&nbsp;&nbsp;&nbsp;单号</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>
@@ -105,7 +105,7 @@
</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() {
@@ -120,9 +120,9 @@
            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) {
@@ -156,9 +156,9 @@
    });
    function findCode(el) {
        if (el.value.length === 7) {
            $('#billNo').focus();
        }
//        if (el.value.length === 7) {
//            $('#code').focus();
//        }
    }
    // 添加表格数据
@@ -177,7 +177,7 @@
            }
        }
        tableIns.reload({data: matData});
        $("#comb-btn").focus();
//        $("#comb-btn").focus();
    }
@@ -215,7 +215,7 @@
                    tips(res.msg, true)
                }
            }
        })
        });
    }
    /*************************************  数量  ****************************************/
src/main/webapp/views/pda/index.html
@@ -86,39 +86,50 @@
            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>
@@ -133,7 +144,14 @@
    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');
    }
src/main/webapp/views/pda/locNormalIn.html
@@ -6,6 +6,7 @@
    <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>
@@ -17,12 +18,15 @@
</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>
@@ -73,14 +77,33 @@
            }
        });
        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;
@@ -126,8 +149,9 @@
    // 组托
    function comb() {
        let barcode = $('#uuid').val();
        console.log('barcode', barcode);
        if (isEmpty(barcode)) {
            tips("库区条码为空", true);
            tips("请选择库区", true);
            document.getElementById("uuid").focus();
            return;
        }
@@ -203,7 +227,6 @@
    // 重置
    function reset() {
        $('#uuid').val("");
        matData = [];
        tableIns.reload({data: matData});
        layer.closeAll();
src/main/webapp/views/pda/locNormalMove.html
@@ -13,7 +13,7 @@
</head>
<body>
<!-- 头部 -->
<header>
<header class="layui-form">
    <div>
        <div class="layui-input-inline">
            <label class="layui-form-label">物料编码</label>
@@ -24,15 +24,25 @@
    <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>
@@ -72,12 +82,41 @@
            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)
                }
            }
        });
    });
@@ -175,8 +214,8 @@
    }
    function reset() {
        $('#warehouse1').val("");
        $('#warehouse2').val("");
//        $('#warehouse1').val("");
//        $('#warehouse2').val("");
        $('#matnr').val("");
        tableIns.reload({data: []});
        layer.closeAll();
src/main/webapp/views/pda/locNormalOut.html
@@ -18,11 +18,13 @@
        display: inline-block;
        width: 120px;
    }
    .number-tool:after {
        clear: both;
        content: "";
        display: table;
    }
    .number-tool button {
        background-color: #fff;
        margin-top: 3px;
@@ -32,6 +34,7 @@
        width: 25px;
        border: 1px solid #777777;
    }
    .number-tool input {
        text-align: center;
        height: 30px;
@@ -43,20 +46,20 @@
</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>
@@ -84,13 +87,15 @@
    </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>
@@ -105,7 +110,7 @@
    // 表格数据
    var normalOutList = [];
    window.onload = function () {
        document.getElementById("uuid").focus();
        document.getElementById("matnr").focus();
    }
    /**
@@ -114,7 +119,7 @@
     * @param warn true:红色字体
     */
    function tips(msg, warn) {
        layer.msg(msg, {icon: warn?2:1})
        layer.msg(msg, {icon: warn ? 2 : 1})
    }
    function back() {
@@ -122,7 +127,7 @@
    }
    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;
@@ -135,11 +140,20 @@
            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) {
            }
@@ -147,7 +161,7 @@
        // 监听行工具事件
        table.on('tool(locNormalOut)', function(obj) {
        table.on('tool(locNormalOut)', function (obj) {
            var data = obj.data;
            switch (obj.event) {
                case 'modify':
@@ -169,19 +183,50 @@
                    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;
@@ -193,7 +238,7 @@
        }
        $.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',
@@ -203,7 +248,7 @@
                    if (res.data && res.data.length > 0) {
                        res.data.map(function (item) {
                            // 默认赋值0开始
                           item.anfmeOut = 0;
                            item.anfmeOut = 0;
                        });
                    }
                    tableIns.reload({
@@ -221,27 +266,31 @@
    /* 修改数量 */
    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);
            }
@@ -250,12 +299,13 @@
        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);
@@ -282,7 +332,7 @@
        // 库区赋值
        var warehouse = $('#uuid').val();
        data.map(function (item) {
           item.warehouse =  warehouse;
            item.warehouse = warehouse;
        });
        // 出库接口
        $.ajax({
@@ -298,7 +348,7 @@
                if (res.code === 200) {
                    layer.msg("出库成功");
                    $("#matnr").val(null);
                    $("#uuid").val(null);
//                    $("#uuid").val(null);
                    warehouseBar = null;
                    matnrBar = null;
                    normalOutList = [];
src/main/webapp/views/pda/matQuery.html
@@ -81,17 +81,17 @@
        <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">
src/main/webapp/views/pda/stockIn.html
@@ -71,7 +71,7 @@
<!-- 头部 -->
<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">
src/main/webapp/views/pda/stockOut.html
@@ -24,17 +24,17 @@
<!-- 头部 -->
<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>
@@ -62,7 +62,7 @@
<script>
    window.onload = function(){
        document.getElementById("locNo").focus();
        document.getElementById("matNo").focus();
        getOutBound();
    }
@@ -102,7 +102,7 @@
                        locDetlData = res.data;
                        tableIns.reload({data: locDetlData});
                    }
                    $('#pakOut').focus();
//                    $('#pakOut').focus();
                } else if (res.code === 403) {
                    top.location.href = baseUrl + "/pda";
                } else {
version/version/wjh.sql
@@ -326,3 +326,5 @@
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);