自动化立体仓库 - WMS系统
#
luxiaotao1123
2022-03-30 706f4c7f1ca5f44d6e246eaeee831d24305c49e6
#
5个文件已修改
106 ■■■■ 已修改文件
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/pakStore/pakStore.js 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/pakStore/stockOut.js 76 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/pakStore/locDetlQuery.html 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/pakStore/stockOut.html 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -12,6 +12,7 @@
import com.zy.asrs.service.*;
import com.zy.asrs.utils.VersionUtils;
import com.zy.common.model.DetlDto;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -24,6 +25,7 @@
 * 移动端服务核心类
 * Created by vincent on 2020/6/28
 */
@Slf4j
@Service
public class MobileServiceImpl implements MobileService {
src/main/webapp/static/js/pakStore/pakStore.js
@@ -115,14 +115,10 @@
    // 监听行工具事件
    table.on('tool(chooseData)', function(obj){
        var data = obj.data;
        switch (obj.event) {
            case 'remove':
                for (let i = matCodeData.length - 1; i >= 0; i--) {
                    if (matCodeData[i].matNo === data.matNo && matCodeData[i].batch === data.batch) {
                        matCodeData.splice(i, 1);
                    }
                }
                let index = obj.tr.attr("data-index");
                matCodeData.splice(index, 1);
                tableIns.reload({data: matCodeData});
                break;
        }
src/main/webapp/static/js/pakStore/stockOut.js
@@ -1,22 +1,25 @@
var admin;
var locDetlData = [];
function getCol() {
    var cols = [
        {field: 'count', align: 'center',title: '出库数量', edit:'text', width: 130,  style:'color: blue;font-weight: bold'}
        ,{field: 'anfme', align: 'center',title: '原数量'}
        ,{field: 'anfme', align: 'center',title: '库存数量'}
        ,{field: 'locNo$', align: 'center',title: '库位号'}
    ];
    arrRemove(detlCols,  'field', 'anfme');
    cols.push.apply(cols, detlCols);
    cols.push({fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:80})
    cols.push({fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width: 80})
    return cols;
}
layui.use(['table','laydate', 'form'], function() {
layui.config({
    base: baseUrl + "/static/layui/lay/modules/"
}).use(['admin', 'table','laydate', 'form'], function() {
    var table = layui.table;
    var $ = layui.jquery;
    var layer = layui.layer;
    var form = layui.form;
    admin = layui.admin;
    tableIns = table.render({
        elem: '#chooseData',
@@ -34,7 +37,29 @@
    // 页面修改
    table.on('edit(chooseData)', function (obj) {
        updateLocDetlData(obj.data.locNo, obj.data.matnr, Number(obj.value));
        let index = obj.tr.attr("data-index");
        let data = locDetlData[index];
        let modify = true;
        if (obj.field === 'count'){
            let vle = Number(obj.value);
            if (isNaN(vle)) {
                layer.msg("请输入数字", {icon: 2});
                modify = false;
            } else {
                if (vle <= 0) {
                    layer.msg("数量必须大于零", {icon: 2});
                    modify = false;
                }
                if (vle > Number(data.anfme)) {
                    layer.msg("出库数量不得大于库存数量", {icon: 2});
                    modify = false;
                }
            }
        }
        if (modify) {
            data[obj.field] = obj.value;
        }
        tableIns.reload({data: locDetlData});
    });
    // 监听头工具栏事件
@@ -83,40 +108,14 @@
    // 监听行工具事件
    table.on('tool(chooseData)', function(obj){
        var data = obj.data;
        switch (obj.event) {
            case 'remove':
                for (var i = locDetlData.length - 1; i >= 0; i--) {
                    if (locDetlData[i].locNo === data.locNo && locDetlData[i].matnr === data.matnr) {
                        locDetlData.splice(i, 1);
                    }
                }
                tableIns.reload({data: locDetlData,done:function (res) {limit();getOutBound();}});
                let index = obj.tr.attr("data-index");
                locDetlData.splice(index, 1);
                tableIns.reload({data: locDetlData});
                break;
        }
    });
    function updateLocDetlData(locNo, matnr, count) {
        if (isNaN(count)) {
            layer.msg("请输入数字");
        } else {
            if (count > 0) {
                for (var i=0;i<locDetlData.length;i++){
                    if (locDetlData[i]["locNo"] === locNo && locDetlData[i]["matnr"] === matnr){
                        if (count > locDetlData[i]["anfme"]) {
                            layer.msg("不能超过原数量");
                        } else {
                            locDetlData[i]["count"] = count;
                        }
                        break;
                    }
                }
            } else {
                layer.msg("数量必须大于零");
            }
        }
        tableIns.reload({data: locDetlData,done:function (res) {limit(); getOutBound();}});
    }
    // 获取出库口
    function getOutBound(){
@@ -147,9 +146,10 @@
function getLocDetl() {
    locDetlLayerIdx = layer.open({
        type: 2,
        title: '提取出货内容',
        maxmin: true,
        area: [top.detailWidth, top.detailHeight],
        title: false,
        closeBtn: false,
        maxmin: false,
        area: ['90%', '85%'],
        shadeClose: true,
        content: 'locDetlQuery.html',
        success: function(layero, index){
@@ -177,4 +177,4 @@
    locDetlData.push.apply(locDetlData, data);
    tableIns.reload({data: locDetlData});
    layer.close(locDetlLayerIdx);
}
}
src/main/webapp/views/pakStore/locDetlQuery.html
@@ -7,11 +7,11 @@
    <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/admin.css?v=318" media="all">
    <link rel="stylesheet" href="../../static/css/cool.css" media="all">
    <link rel="stylesheet" href="../../static/css/common.css" media="all">
    <style>
        body {
            padding: 0 20px;
        }
        .layui-table-box {
            border-right: 1px solid #9F9F9F;
@@ -38,7 +38,9 @@
    </style>
</head>
<body>
<div style="padding: 25px; line-height: 22px; background-color: #393D49; color: #fff; font-weight: 300;">
    <span style="font-size: large; font-weight: bold">提取库存商品</span>
</div>
<!-- 搜索栏 -->
<fieldset class="layui-elem-field site-demo-button" style="margin: 20px;">
    <legend>搜索栏</legend>
@@ -104,12 +106,16 @@
        return cols;
    }
    layui.use(['table','laydate', 'form'], function() {
    layui.config({
        base: baseUrl + "/static/layui/lay/modules/"
    }).use(['table','laydate', 'form', 'admin'], function() {
        var table = layui.table;
        var $ = layui.jquery;
        var layer = layui.layer;
        var layDate = layui.laydate;
        var form = layui.form;
        var admin = layui.admin;
        // 数据渲染
        locDetlTableIns = table.render({
            elem: '#stockOut',
src/main/webapp/views/pakStore/stockOut.html
@@ -7,6 +7,7 @@
    <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/admin.css?v=318" media="all">
    <link rel="stylesheet" href="../../static/css/cool.css" media="all">
    <link rel="stylesheet" href="../../static/css/common.css" media="all">
    <style>
@@ -14,6 +15,7 @@
            height: 100%;
            padding: 10px;
            background-color: #f1f1f1;
            box-sizing: border-box;
        }
        body {
            background-color: #fff;
@@ -55,7 +57,7 @@
        }
        .function-btn {
            font-size: 16px;
            padding: 1px 1px 1px 1px;
            padding: 1px 2px;
            width: 100px;
            height: 50px;
            border-color: #2b425b;
@@ -65,7 +67,7 @@
            border-style: solid;
            transition: 0.4s;
            cursor: pointer;
            letter-spacing: 3px;
            letter-spacing: 1.5px;
        }
        .function-btn:hover {
            background-color: #2b425b;
@@ -81,7 +83,7 @@
<!-- 功能区 -->
<div class="function-area">
    <button id="mat-query" class="function-btn" onclick="getLocDetl()">新增</button>
    <button id="mat-query" class="function-btn" onclick="getLocDetl()">提取库存</button>
</div>
<hr>