llj
1 天以前 e9360531c79517080a2c58bfbb9ce7db9161e2d1
库存转移模块版本1
1个文件已修改
143 ■■■■■ 已修改文件
WebTM/views/WMS扫码模块/库存转移/kf_InventoryTransfer.html 143 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/WMSɨÂëÄ£¿é/¿â´æ×ªÒÆ/kf_InventoryTransfer.html
@@ -138,7 +138,7 @@
                        <div class="layui-tab layui-col-xs12" style="margin-top:5px;" lay-filter="tab-Kf_MaterialUpperBill_PDA">
                            <ul class="layui-tab-title" lay-filter="tab-all">
                                <li lay-id="1" style="padding:1px;">单据信息</li>
                                <!--<li lay-id="2" style="padding:1px;">上架信息</li>-->
                                <li lay-id="2" style="padding:1px;">物料条码信息</li>
                            </ul>
                            <div class="layui-tab-content">
                                <!--单据信息-->
@@ -481,6 +481,7 @@
                var data = [];
                listOption.cols = [[
                    { field: '数量', title: '数量', width: 100 }
                    , { field: '物料条码', title: '物料条码', width: 100 }
                    , { field: '物料代码', title: '物料代码', width: 100 }
                    , { field: '物料名称', title: '物料名称', width: 100 }
                    , { field: '规格型号', title: '规格型号', width: 100 }
@@ -777,10 +778,76 @@
                        });
                        return;
                    }
                    else {
                        GetMeesageByCarBarCode();
                    }
                }
            });
            //扫条码
            function GetMeesageByCarBarCode(obj) {
                //仓库、仓位文本框为空时,清空对应ID
                var sHWHID = $("#HWHID").val()
                var sHSPID = $("#HStockPlaceID").val()
                var sHQty = $("#HQty").val()
                var sSourceBillType = "-1"
                var sCarBarCode = $("#HCarBarCode").val()
                //todo æ²¡æœ‰å†™*删除条码的功能,后续若有需要再完善
                if (sCarBarCode == '') {
                        playSound();
                        layer.msg("小车条码为空,请扫描小车条码!", {
                            icon: 0, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "温馨提示", btn: ['确认']
                        }, function () {
                            $("#HCarBarCode").select();
                            $("#HCarBarCode").focus();
                        });
                        return;
                    }
                    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");
            }
            //#endregion
@@ -1241,6 +1308,7 @@
                        else {
                            listOption.cols = [[
                                { field: '数量', title: '数量', width: 100 }
                                , { field: '物料条码', title: '物料条码', width: 100 }
                                , { field: '物料代码', title: '物料代码', width: 100 }
                                , { field: '物料名称', title: '物料名称', width: 100 }
                                , { field: '规格型号', title: '规格型号', width: 100 }
@@ -1256,7 +1324,80 @@
            }
            //#endregion
            //#region æ˜¾ç¤ºç‰©æ–™åˆ—表信息
            function DisBillEntryList_CarMaterial() {
                $.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;
                            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 }
                            ]];
                            listOption.data = data;
                            table.render(listOption);
                        }
                    },
                    complete: function (XHR, TS) { XHR = null }//回收资源
                });
            }
            //#endregion
        });