zgq
2021-08-05 e4fc4be3a162854c2acbd521c72bd1c8c7d39d01
扫码详情
1个文件已添加
3个文件已修改
260 ■■■■■ 已修改文件
WebTM/WebTM.csproj 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/layuiadmin/Scripts/webConfig.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/Baseset/基础资料/WMSBarCodeDetailsList.html 166 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/领料发货/领料出库/Kf_MateOutBill_Fast.html 90 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/WebTM.csproj
@@ -300,6 +300,7 @@
    <Content Include="views\Baseset\基础资料\Gy_StockPlaceList.html" />
    <Content Include="views\Baseset\基础资料\Gy_SupplierList.html" />
    <Content Include="views\Baseset\基础资料\Gy_WarehouseList.html" />
    <Content Include="views\Baseset\基础资料\WMSBarCodeDetailsList.html" />
    <Content Include="views\component\anim\index.html" />
    <Content Include="views\component\auxiliar\index.html" />
    <Content Include="views\component\badge\index.html" />
WebTM/layuiadmin/Scripts/webConfig.js
@@ -1,9 +1,10 @@
function GetWEBURL() {
    var WEBURL = "http://61.130.49.162:9090/WMSAPI//";  //开山外网
    //var WEBURL = "http://61.130.49.162:9090/WMSAPI//";  //开山外网
    //var WEBURL = "http://192.168.16.80:8011/";          //办公室服务器
    //var WEBURL = "http://192.168.235.1:8011/";          //陈航
    //var WEBURL = "http://192.168.3.7:8011/";            //家里无线
    //var WEBURL = "http://localhost:8086/API";
    var WEBURL = "http://localhost:8085/API/";   //zgq本地
    //61.130.49.162:9090
    //WEBURL = "";
    return WEBURL
WebTM/views/Baseset/»ù´¡×ÊÁÏ/WMSBarCodeDetailsList.html
New file
@@ -0,0 +1,166 @@
<!DOCTYPE html>
<html>
<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.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
    <style type="text/css">
        .layui-form-label {
            width: 85px;
        }
    </style>
</head>
<body>
    <div id="layout1" class="layui-fluid">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-body" style="padding: 15px;">
                        <form class="layui-form" action="" lay-filter="component-form-group">
                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <!--<button type="button" lay-submit="" class="layui-btn" lay-filter="FH">返回</button>-->
                                    <button type="button" lay-submit="" class="layui-btn" lay-filter="Exit">退出</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table>
    <script type="text/html" id="barDemo">
        <!--<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>-->
        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
    </script>
    <script src="../../../layuiadmin/layui/layui.js"></script>
    <script src="../../../layuiadmin/Scripts/json2.js"></script>
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <script>
        layui.config({
            base: '../../../layuiadmin/' //静态资源所在路径
        }).extend({
            index: 'lib/index' //主入口模块
        }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
            var $ = layui.$
                , admin = layui.admin
                , layer = layui.layer
                , table = layui.table
                , form = layui.form
                , laydate = layui.laydate
                , element = layui.element;
            //获取参数
            function getUrlVars() {
                var vars = [], hash;
                var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
                for (var i = 0; i < hashes.length; i++) {
                    hash = hashes[i].split('=');
                    vars.push(hash[0]);
                    vars[hash[0]] = hash[1];
                }
                return vars;
            }
            var params = getUrlVars();
            var HInterID = params[params[0]];
            var HBillType = params[params[1]];
            form.on('submit(FH)', function () {
                var checkStatus = table.checkStatus('ck-table')
                    , data = checkStatus.data;
                parent.GetHKeeperValue(data);
                var index = parent.layer.getFrameIndex(window.name);
                parent.layer.close(index);
            });
            form.on('submit(Exit)', function () {
                var index = parent.layer.getFrameIndex(window.name);
                parent.layer.close(index);
            });
            RoadQuery(HInterID, HBillType);
            table.render({
                elem: '#mainTable'
                // , url: '/demo/table/user/'
                //, toolbar: '#toolbarDemo'
                , data: []
                //, cellMinWidth: 80 //全局定义常规单元格的最小宽度,layui 2.2.1 æ–°å¢ž
                , height: 'full-1000'
                , cols: [[
                    { type: 'radio' }
                    , { field: 'HInterID', width: 150, title: 'HInterID', hide: true }//, hide: true
                    , { field: 'HBillType', width: 150, title: '单据类型' }
                    , { field: 'HMaterID', width: 150, title: 'HMaterID', hide: true }
                    , { field: 'HMaterNumber', width: 150, title: '产品编码' }
                    , { field: 'HMaterName', width: 150, title: '产品名称' }
                    , { field: 'HMaterModel', width: 150, title: '规格型号' }
                    , { field: 'HQty', width: 150, title: '数量' }
                    , { field: 'HQtyMust', width: 150, title: '应收数量' }
                    , { field: 'HBatchNo', width: 150, title: '批次' }
                    , { field: 'HPieceQty', width: 150, title: '件数' }
                    , { fixed: 'right', width: 70, title: '操作', toolbar: '#barDemo' }
                ]]
                //, page: true
            });
            ///加载显示数据
            function RoadQuery(HInterID, HBillType) {
                $.ajax({
                    type: "get",
                    url: GetWEBURL() + "/Web/GetWMSBarCodeDetailsList",
                    async: true,
                    data: { "HInterID": HInterID, "HBillType": HBillType },
                    success: function (result) {
                        ajaxReturnData = JSON.parse(JSON.stringify(result)).data;
                        table.reload('mainTable', {
                            data: ajaxReturnData
                            , height: 'full-1000'
                            , loading: false
                            , done: function (index, res) {
                            }
                        });
                    },
                    error: function (result) {
                        console.log(result);
                        //layer.msg('获取采购订单出现异常', { icon: 2, time: 2000 });
                    }
                });
            };
            //行内事件
            table.on('tool(mainTable)', function (obj) {
                var data = obj.data;
                if (obj.event === 'del') {
                    layer.confirm('真的删除行么', function (index) {
                        $.ajax({
                            url: GetWEBURL() + '/Web/DelCacheList',
                            type: "GET",
                            data: { "sHitemID": data.HitemID },
                            success: function (data) {
                                if (data.count == 1) {
                                    layer.close(index);
                                    obj.del(); //删除对应行(tr)的DOM结构
                                    layer.msg('删除成功');
                                } else {
                                    layer.alert(data.code + data.msg, { icon: 5 });
                                }
                            }, error: function () {
                                layer.msg("接口请求失败!", {
                                    icon: 5, btn: ['确认'], time: 100000, offset: 't',
                                    skin: 'layui-layer-lan', title: "温馨提示"
                                });
                            }
                        });
                    });
                }
            });
            //以上为layui模块
        });
    </script>
</body>
</html>
WebTM/views/ÁìÁÏ·¢»õ/ÁìÁϳö¿â/Kf_MateOutBill_Fast.html
@@ -8,6 +8,18 @@
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
    <style>
        /*.layui-table-body{
            height:auto;
        }*/
        .layui-table-fixed .layui-table-body {
            height: auto !important;
        }
        .layui-table-fixed.layui-hide {
            display: block !important;
        }
    </style>
</head>
<!--<style>
    @media screen and (max-width: 450px) {
@@ -32,6 +44,7 @@
        }
    }
</style>-->
<body>
    <div class="layui-fluid">
        <div class="layui-card" style="padding: 1px">
@@ -244,6 +257,9 @@
    <script src="../../../layuiadmin/Scripts/json2.js"></script>
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <script type="text/html" id="barDemo">
        <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
    </script>
    <script>
    layui.config({
        base: '../../../layuiadmin/' //静态资源所在路径
@@ -334,6 +350,7 @@
                , { field: 'HSourceEntryID', title: '源单子内码', width: 90 }
                , { field: 'HSourceBillNo', title: '源单单号', width: 90 }
                , { field: 'HBatchNo', title: '批次', width: 90 }
                        , { fixed: 'right', title: '操作', toolbar: '#barDemo', width: 70 }
                ]]
                // , data: [linterid]
                // , page: true
@@ -516,7 +533,7 @@
                               elem: '#wl-table' 
                               , url: GetWEBURL1() + '/MateOutBill/DisBillEntryList_Webs_New_Json'
                               //, cellMinWidth: 80
                               , toolbar: '#toolbarDemo'
                                    //, toolbar: '#toolbarDemo'
                               , where: { HBillID: sInterID, HBillType: '1204', sWhere: '' }
                               , cols: [[
                                  { type: 'radio' }
@@ -611,8 +628,7 @@
            if (sQty == "") {
                sQty = 0;
            }
            if (sHBillType == '-1')
            {
                if (sHBillType == '-1') {
                sSourceBillNo=''
            }
            if (event.keyCode == 13) {
@@ -702,7 +718,7 @@
                            table.render({
                                elem: '#wl-table' 
                          , url: GetWEBURL1() + '/MateOutBill/DisBillEntryList_Webs_New_Json'
                          , toolbar: '#toolbarDemo'
                                    //, toolbar: '#toolbarDemo'
                          , where: { HBillID: sInterID, HBillType: '1204', sWhere: '' }
                          , cols: [[
                              { type: 'radio' }
@@ -716,6 +732,7 @@
                            , { field: 'HSourceEntryID', title: '源单子内码', width: 150 }
                            , { field: 'HSourceBillNo', title: '源单单号', width: 150 }
                            , { field: 'HBatchNo', title: '批次', width: 150 }
                                        , { fixed: 'right', title: '操作', toolbar: '#barDemo', width: 70 }
                          ]]
                                // , data: [linterid]
                                // , page: true
@@ -754,7 +771,7 @@
                                elem: '#wl-table' 
                                , url: GetWEBURL1() + '/MateOutBill/DisBillEntryList_Webs_New_Json'
                                //, cellMinWidth: 80
                              , toolbar: '#toolbarDemo'
                                    //, toolbar: '#toolbarDemo'
                              , where: { HBillID: sInterID, HBillType: '1204', sWhere: '' }
                              , cols: [[
                                  { type: 'radio' }
@@ -768,6 +785,7 @@
                                , { field: 'HSourceEntryID', title: '源单子内码', width: 90 }
                                , { field: 'HSourceBillNo', title: '源单单号', width: 90 }
                                , { field: 'HBatchNo', title: '批次', width: 90 }
                                        , { fixed: 'right', title: '操作', toolbar: '#barDemo', width: 70 }
                              ]]
                                // , data: [linterid]
                                // , page: true
@@ -802,6 +820,56 @@
         , done: function () {
         }
        });
            //测试数据begin
            var rowdata = [{
                "HSNO": "1", "HQty": "2", "HQtyMust": "3", "HMaterName": "4", "HMaterNumber": "5"
                , "HMaterModel": "6"
                , "HSourceInterID": "367", "HSourceEntryID": "7", "HSourceBillNo": "8", "HBatchNo": "9"
            }];
            var option = {
                elem: '#wl-table'
                , height: 'full-1000'
                , cols: [[
                    { type: 'radio' }
                    , { field: 'HSNO', title: '序号', width: 60 }
                    , { field: 'HQty', title: '数量', width: 80 }
                    , { field: 'HQtyMust', title: '应收数量', width: 80 }
                    , { field: 'HMaterName', title: '物料名称', width: 90 }
                    , { field: 'HMaterNumber', title: '物料代码', width: 90 }
                    , { field: 'HMaterModel', title: '规格型号', width: 90 }
                    , { field: 'HSourceInterID', title: '源单主内码', width: 90 }
                    , { field: 'HSourceEntryID', title: '源单子内码', width: 90 }
                    , { field: 'HSourceBillNo', title: '源单单号', width: 90 }
                    , { field: 'HBatchNo', title: '批次', width: 90 }
                    , { fixed: 'right', title: '操作', toolbar: '#barDemo', width: 70 }
                ]]
                //, page: true
            };
            option.data = rowdata;
            table.render(option);
            //测试数据end
            //行内事件
            table.on('tool(wl-table)', function (obj) {
                var data = obj.data;
                console.log(data.源单主内码);
                var rowIndex = $(obj.tr).attr("data-index");
                if (obj.event === 'edit') {
                    var _obj = obj;
                    layer.open({
                        type: 2
                        , area: ['90%', '90%']
                        , title: '扫码详情列表'
                        , content: ['../../../views/Baseset/基础资料/WMSBarCodeDetailsList.html?HInterID=' + data.HSourceInterID + '&HBillType=3789', 'yes']
                        , end: function () {
                        }
                    })
                }
            });
    });
    function GetHWHValue(obj)  //返回仓库
    {
@@ -863,8 +931,7 @@
            layer.msg("错误的内码!", { icon: 5 });
            return false;
        }
        if(sSubStr=='')
        {
            if (sSubStr == '') {
            layer.msg("没有物料明细记录!", { icon: 5 });
            return false;
        }
@@ -872,8 +939,7 @@
        if (sSubStr != '') {
            for (var i = 0; i <= sSubStr.length - 1; i++) {  //判断扫码数量不能大于应收数量
                if (parseFloat(sSubStr[i].HQtyMust) > 0) {
                    if (parseFloat(sSubStr[i].HQty) > parseFloat(sSubStr[i].HQtyMust))
                    {
                        if (parseFloat(sSubStr[i].HQty) > parseFloat(sSubStr[i].HQtyMust)) {
                        layer.msg("数量不能大于应发数量!", { icon: 5 });
                        return false;
                    }
@@ -884,14 +950,12 @@
                    s = 1;
                }
            }
            if (s == 0)
            {
                if (s == 0) {
                layer.msg("生产领料出库记录未扫码!", { icon: 5 });
                return false;
            }
        }
        else
        {
            else {
            return true;
        }
    }