llj
昨天 c64260886f18ad8e6d89d834537eefed4929bcad
添康小车转移操作功能调整
2个文件已修改
183 ■■■■ 已修改文件
WebTM/layuiadmin/Scripts/webConfig.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/WMS扫码模块/库存转移/kf_InventoryTransfer.html 179 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/layuiadmin/Scripts/webConfig.js
@@ -2,12 +2,12 @@
function GetWEBURL() {
    //var WEBURL = "http://192.168.16.80:8011/";        //办公室服务器
    //var WEBURL = "http://61.164.86.218:8099/ABAPI/";
    var WEBURL = "http://localhost/API/";             //颜晓军本地配置
    //var WEBURL = "http://localhost/API/";             //颜晓军本地配置
    //var WEBURL = "http://localhost:8082/API/";        //杜贺本地配置
    //var WEBURL = "http://localhost:81/API/"           //翁涛涛本地配置
    //var WEBURL = "http://localhost:8082/API/";        //张瑞广本地配置
    //var WEBURL = "http://localhost:81/API/";          //陈镐哲本地配置
    //var WEBURL = "http://localhost:8082/LuBaoAPI/";   //李林俊本地配置
    var WEBURL = "http://localhost:8082/LuBaoAPI/";   //李林俊本地配置
    //var WEBURL = "http://localhost:8080/API/";        //王仪本地配置
    //var WEBURL = "http://localhost:8082/LuBaoAPI/";   //余思杰本地配置
    //var WEBURL = "http://localhost:8088/ARAPI/";      //余思杰本地配置(安瑞)
WebTM/views/WMSɨÂëÄ£¿é/¿â´æ×ªÒÆ/kf_InventoryTransfer.html
@@ -299,19 +299,20 @@
                        // å¯ç”¨å°è½¦ä¿¡æ¯1和2
                        $('#HCarBarCode').removeAttr('disabled');
                        $('#HCarBarCode_2').removeAttr('disabled');
                        $('#HBarCode').removeAttr('disabled');
                        // ç¦ç”¨å…¶ä»–字段
                        $('#HWHName').attr('disabled', 'disabled');
                        $('#HStockPlaceName').attr('disabled', 'disabled');
                        $('#HWHName_2').attr('disabled', 'disabled');
                        $('#HStockPlaceName_2').attr('disabled', 'disabled');
                        $('#HBarCode').attr('disabled', 'disabled');
                        //$('#HBarCode').attr('disabled', 'disabled');
                        $('#HWHID-BT').addClass('layui-btn-disabled').attr('disabled', true);
                        $('#HSpID-BT').addClass('layui-btn-disabled').attr('disabled', true);
                        $('#HWHID-BT_2').addClass('layui-btn-disabled').attr('disabled', true);
                        $('#HSpID-BT_2').addClass('layui-btn-disabled').attr('disabled', true);
                        layer.msg("已启用小车转移模式:小车信息1和2可以输入/扫描", { icon: 1 });
                        clearTableData();
                        break;
                    case 'warehouse': // ä»“库转移
@@ -325,12 +326,14 @@
                        $('#HSpID-BT').removeClass('layui-btn-disabled').attr('disabled', false);
                        $('#HWHID-BT_2').removeClass('layui-btn-disabled').attr('disabled', false);
                        $('#HSpID-BT_2').removeClass('layui-btn-disabled').attr('disabled', false);
                        $('#HCarBarCode').removeAttr('disabled');
                        // ç¦ç”¨å°è½¦ä¿¡æ¯
                        $('#HCarBarCode').attr('disabled', 'disabled');
                       // $('#HCarBarCode').attr('disabled', 'disabled');
                        $('#HCarBarCode_2').attr('disabled', 'disabled');
                        layer.msg("已启用仓库转移模式:仓库仓位1、2和物料条码可以输入/扫描", { icon: 1 });
                        clearTableData();
                        break;
                    case 'car_warehouse': // å°è½¦-仓库转移
@@ -350,6 +353,7 @@
                        $('#HSpID-BT_2').addClass('layui-btn-disabled').attr('disabled', true);
                        layer.msg("已启用小车-仓库转移模式:小车信息1、仓库仓位1和物料条码可以输入/扫描", { icon: 1 });
                        clearTableData();
                        break;
                }
@@ -387,6 +391,16 @@
            //用户模块权限判断
            CheckModRight();
            function clearTableData() {
                // æ¸…空表格数据
                listOption.data = [];
                currentTableData = [];
                table.reload('wl-table', {
                    data: []
                });
                // table.render(listOption);
            }
            function CheckModRight() {
                layer.load(3);
                $.ajax({
@@ -484,9 +498,11 @@
                    , { field: '物料条码', title: '物料条码', width: 100 }
                    , { field: '物料代码', title: '物料代码', width: 100 }
                    , { field: '物料名称', title: '物料名称', width: 100 }
                    , { field: '规格型号', title: '规格型号', width: 100 }
                    , { field: '辅助属性', title: '辅助属性', width: 100 }
                    , { field: '条码个数', title: '条码个数', width: 100 }
                    , { field: '仓库代码', title: '仓库代码', width: 100 }
                    , { field: '仓库名称', title: '仓库名称', width: 100 }
                    , { field: '仓位代码', title: '仓位代码', width: 100 }
                    , { field: '仓位名称', title: '仓位名称', width: 100 }
                    , { field: '小车条码', title: '小车条码', width: 100 }
                ]];
                listOption.data = data;
                table.render(listOption);
@@ -560,7 +576,7 @@
                //$("#HBarCode").select();
                //$("#HBarCode").focus();
                //显示表体明细
                DisBillEntryList();
                DisBillEntryList_CarMaterial();
                HSourceFlag = true;
                element.tabChange('tab-Kf_MaterialUpperBill_PDA', '2');
            }
@@ -802,49 +818,11 @@
                            $("#HCarBarCode").focus();
                        });
                        return;
                    }
                }
                element.tabChange('tab-Kf_MaterialUpperBill_PDA', '2');
                //显示表体明细
                DisBillEntryList_CarMaterial();
                    layer.load(3)
                    $.ajax({
                        type: "GET",
                        url: GetWEBURL() + "/WEBSController/Get_BarCode_WorkShop_Json",
                        async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                        data: { "HBarCode": sBarCode, "HInterID": HInterID, "HBillType": HBillType, "HBillNo": HBillNo, "HMaker": HMaker, "HWhID": sHWHID, "HSPID": sHSPID, "HQty": sHQty, "SourceFlag": HSourceFlag, "HSourceBillType": sSourceBillType, "HCarBarCode": sCarBarCode, "HStockOrgID": HStockOrgID },
                        success: function (result) {
                            if (result.count == 1) {
                                playSound_OK();
                                if (sBarCode.startsWith("GXLX")) {
                                    $("#HMainSourceBillNo").val(sBarCode);
                                    $("#HSourceBillNo").val(sBarCode);
                                }
                                if (HSourceFlag != true) {
                                    HSourceFlag = true;
                                }
                                element.tabChange('tab-Kf_MaterialUpperBill_PDA', '2');
                                //显示表体明细
                                DisBillEntryList();
                            }
                            else {
                                playSound();
                                layer.msg(result.Message, {
                                    icon: 5, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                                }, function () {
                                    $("#HBarCode").select();
                                    $("#HBarCode").focus();
                                });
                            }
                        },
                        complete: function (XHR, TS) { XHR = null },//回收资源
                        error: function (err) {
                            playSound();
                            layer.msg("错误!" + err, {
                                icon: 5, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                            }, function () {
                                $("#HBarCode").select();
                                $("#HBarCode").focus();
                            });
                        }
                    });
                    layer.closeAll("loading");
                
            }
@@ -1065,6 +1043,7 @@
                        if (result.count == 1) {
                            playSound_OK();
                            layer.alert("库存转移成功");
                            clearTableData();
                        }
                        else {
                            playSound();
@@ -1167,13 +1146,14 @@
                $("#HBarCode").focus();     //获取光标
            });
            //扫描小车条码
            $('#HCarBarCode').on('keydown', function (event) {
                if (event.keyCode == 13) {
                    //$("#HBarCode").select();
                    //$("#HBarCode").focus();     //获取光标
                }
            });
            ////扫描小车条码
            //$('#HCarBarCode').on('keydown', function (event) {
            //    if (event.keyCode == 13) {
            //        GetMeesageByCarBarCode();
            //        //$("#HBarCode").select();
            //        //$("#HBarCode").focus();     //获取光标
            //    }
            //});
            //绑定
            function BindBetweenCarHw(obj) {
@@ -1249,89 +1229,17 @@
                $("#HBarCode").val("");
            }
            //#region æ˜¾ç¤ºç‰©æ–™åˆ—表信息
            function DisBillList() {
                $.ajax({
                    type: "GET",
                    url: GetWEBURL() + '/WEBSController/GetBillEntryTmpList_Json',
                    async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                    data: { "HInterID": HInterID, "HBillNo": HBillNo, "HBillType": HBillType, "HStockOrgID": HStockOrgID },
                    success: function (result) {
                        var data = [];
                        var col = [];
                        if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            //给空的数组赋值
                            for (var key in result.list) {
                                //动态获取列表所有列名
                                data.push({ "id": result.list[key].ColmCols, "name": result.list[key].ColmCols, "Type": result.list[key].ColmType });
                                //获取不需要显示的列(H开头的列不显示)
                                var patrn = new RegExp(/^h/i);
                                if (patrn.test(result.list[key].ColmCols)) {
                                    titleData[key] = result.list[key].ColmCols;
                                }
                            }
                            //在列表左边添加勾选框
                            col.push({ type: 'radio', totalRowText: '合计' });
                            for (var i = 0; i < data.length; i++) {
                                if ($.inArray(data[i].name, titleData) > -1) {
                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //隐藏id列
                                }
                                else {
                                    switch (data[i].Type) {
                                        //int
                                        case 'DateTime':
                                            col.push({ field: data[i].id, title: data[i].name, align: 'left', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 120 });
                                            break;
                                        default:
                                        if (data[i].name == '数量' || data[i].name == '源单数量' || data[i].name == '条码个数') {
                                            col.push({ field: data[i].id, title: data[i].name, align: 'left', totalRow: true });
                                        } else if (data[i].name == '物料代码') {
                                            col.push({ field: data[i].id, title: data[i].name, align: 'left', width: 120 });
                                        } else if (data[i].name == '物料名称' || data[i].name == '规格型号') {
                                            col.push({ field: data[i].id, title: data[i].name, align: 'left', width: 180 });
                                        } else {
                                            col.push({ field: data[i].id, title: data[i].name, align: 'left', width: 150 });
                                        }
                                    }
                                }
                            }
                            columns = col;
                            listOption.cols = [columns];
                            listOption.data = result.data.Materlist;
                            listOption.totalRow = true;
                            table.cache['wl-table'] = null;         //清空表格缓存数据
                            table.render(listOption);
                        }
                        else {
                            listOption.cols = [[
                                { field: '数量', title: '数量', width: 100 }
                                , { field: '物料条码', title: '物料条码', width: 100 }
                                , { field: '物料代码', title: '物料代码', width: 100 }
                                , { field: '物料名称', title: '物料名称', width: 100 }
                                , { field: '规格型号', title: '规格型号', width: 100 }
                                , { field: '辅助属性', title: '辅助属性', width: 100 }
                                , { field: '条码个数', title: '条码个数', width: 100 }
                            ]];
                            listOption.data = data;
                            table.render(listOption);
                        }
                    },
                    complete: function (XHR, TS) { XHR = null }//回收资源
                });
            }
            //#endregion
            //#region æ˜¾ç¤ºç‰©æ–™åˆ—表信息
            function DisBillEntryList_CarMaterial() {
                var HCarBarCode = $("#HCarBarCode").val();
                $.ajax({
                    type: "GET",
                    url: GetWEBURL() + '/WEBSController/GetBillEntryTmpList_Json',
                    url: GetWEBURL() + '/WEBSController/GetMaterIDByCarBarCode',
                    async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                    data: { "HInterID": HInterID, "HBillNo": HBillNo, "HBillType": HBillType, "HStockOrgID": HStockOrgID },
                    data: { "CarBarCode": HCarBarCode},
                    success: function (result) {
                        var data = [];
                        var col = [];
@@ -1383,11 +1291,14 @@
                        else {
                            listOption.cols = [[
                                { field: '数量', title: '数量', width: 100 }
                                , { field: '物料条码', title: '物料条码', width: 100 }
                                , { field: '物料代码', title: '物料代码', width: 100 }
                                , { field: '物料名称', title: '物料名称', width: 100 }
                                , { field: '规格型号', title: '规格型号', width: 100 }
                                , { field: '辅助属性', title: '辅助属性', width: 100 }
                                , { field: '条码个数', title: '条码个数', width: 100 }
                                , { field: '仓库代码', title: '仓库代码', width: 100 }
                                , { field: '仓库名称', title: '仓库名称', width: 100 }
                                , { field: '仓位代码', title: '仓位代码', width: 100 }
                                , { field: '仓位名称', title: '仓位名称', width: 100 }
                                , { field: '小车条码', title: '小车条码', width: 100 }
                            ]];
                            listOption.data = data;
                            table.render(listOption);