智云SRM-LAYUI(夏宝服务器版本)
王 垚
2021-10-29 125ee8640f8c2b9fdd842ed7b743662ce690424a
nothing
3个文件已修改
414 ■■■■ 已修改文件
WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POInStockBill.html 378 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POInStockBillList.html 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POInStockBill_Edit.html 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POInStockBill.html
@@ -93,7 +93,7 @@
                                                <div class="layui-col-xs3">
                                                    <label class="layui-form-label"> 物流单号:</label>
                                                    <div class="layui-input-inline">
                                                        <input class="layui-input" name="HDeliveryNo" id="HDeliveryNo"   autocomplete="off">
                                                        <input class="layui-input" name="HDeliveryNo" id="HDeliveryNo" autocomplete="off">
                                                    </div>
                                                </div>
@@ -184,7 +184,7 @@
                    </script>
                    <blockquote class="layui-elem-quote">送货单</blockquote>
                </div>
                        </div>
            </div>
        </div>
    </div>
    <!--<script src="../../layuiadmin/layui/lay/modules/mobile/jquery-3.3.1.min.js"></script>-->
@@ -200,81 +200,82 @@
            index: 'lib/index' //主入口模块
        }).use(['index', 'table', 'form', 'element'], function () {
            var table = layui.table
            , $ = layui.$
            , form = layui.form
            , element = layui.element; //Tab的切换功能,切换事件监听等,需要依赖element模块
                , $ = layui.$
                , form = layui.form
                , element = layui.element; //Tab的切换功能,切换事件监听等,需要依赖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 linterid = params[params[0]];
        var lentryid = params[params[1]];
        RoadBillMain(linterid);
        RoadBillSub(linterid);
        // debugger;
        function RoadBillMain(linterid) {
            $.ajax({
                url: GetWEBURL()+"GetPOInStockShowBillMain",
                type: "GET",
                data: { "sMsg": linterid },
                success: function (d) {
                    console.log(d.data);
                    //$("#HDate").val(d.)
                    $("#HInterID").val(d.data[0].HInterID);
                    $("#HBillNo").val(d.data[0].HBillNo);
                    $("#HStatus").val(d.data[0].HStatus);
                    $("#HInnerBillNo").val(d.data[0].HInnerBillNo);
                    $("#HRemark").val(d.data[0].HRemark);
                    $("#HDate").val(d.data[0].HDateForWeb);
                    $("#HMaker").val(d.data[0].HMaker);
                    $("#HMakerDate").val(d.data[0].HMakerDate)
                    $("#HChecker").val(d.data[0].HChecker);
                    $("#HCheckDate").val(d.data[0].HCheckDate);
                    $("#HDeptID").val(d.data[0].HDeptID);
                    $("#HDeptName").val(d.data[0].HDeptName);
                    $("#HSupID").val(d.data[0].HSupID);
                    $("#HSupName").val(d.data[0].HSupName);
                    $("#HEmpID").val(d.data[0].HEmpID);
                    $("#HEmpName").val(d.data[0].HEmpName);
                    $("#HManagerID").val(d.data[0].HManagerID);
                    $("#HManagerName").val(d.data[0].HManagerName);
                    $("#HDeliveryNo").val(d.data[0].HDeliveryNo);
            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 linterid = params[params[0]];
            var lentryid = params[params[1]];
            var btntype = params[params[1]];
            RoadBillMain(linterid);
            RoadBillSub(linterid);
            // debugger;
            function RoadBillMain(linterid) {
                $.ajax({
                    url: GetWEBURL() + "GetPOInStockShowBillMain",
                    type: "GET",
                    data: { "sMsg": linterid },
                    success: function (d) {
                        console.log(d.data);
                        //$("#HDate").val(d.)
                        $("#HInterID").val(d.data[0].HInterID);
                        $("#HBillNo").val(d.data[0].HBillNo);
                        $("#HStatus").val(d.data[0].HStatus);
                        $("#HInnerBillNo").val(d.data[0].HInnerBillNo);
                        $("#HRemark").val(d.data[0].HRemark);
                        $("#HDate").val(d.data[0].HDateForWeb);
                        $("#HMaker").val(d.data[0].HMaker);
                        $("#HMakerDate").val(d.data[0].HMakerDate)
                        $("#HChecker").val(d.data[0].HChecker);
                        $("#HCheckDate").val(d.data[0].HCheckDate);
                        $("#HDeptID").val(d.data[0].HDeptID);
                        $("#HDeptName").val(d.data[0].HDeptName);
                        $("#HSupID").val(d.data[0].HSupID);
                        $("#HSupName").val(d.data[0].HSupName);
                        $("#HEmpID").val(d.data[0].HEmpID);
                        $("#HEmpName").val(d.data[0].HEmpName);
                        $("#HManagerID").val(d.data[0].HManagerID);
                        $("#HManagerName").val(d.data[0].HManagerName);
                        $("#HDeliveryNo").val(d.data[0].HDeliveryNo);
                    }
                });
            }
            ///加载显示数据
        function RoadBillSub(linterid) {
            $.ajax({
                type: "get",
                url: GetWEBURL()+"GetPOInStockShowBillSub",
                async: true,
                data: { sMsg: linterid},
                success: function (result) {
                    ajaxReturnData = JSON.parse(JSON.stringify(result)).data;
                    table.reload('mainTable', {
                        data: ajaxReturnData
                        , height: 'full-10'
                        , loading: false
                        , done: function (index, res) {
            function RoadBillSub(linterid) {
                $.ajax({
                    type: "get",
                    url: GetWEBURL() + "GetPOInStockShowBillSub",
                    async: true,
                    data: { sMsg: linterid },
                    success: function (result) {
                        ajaxReturnData = JSON.parse(JSON.stringify(result)).data;
                        table.reload('mainTable', {
                            data: ajaxReturnData
                            , height: 'full-10'
                            , loading: false
                            , done: function (index, res) {
                        }
                    });
                },
                error: function (result) {
                    console.log(result);
                    //layer.msg('获取采购订单出现异常', { icon: 2, time: 2000 });
                }
            });
        }
                            }
                        });
                    },
                    error: function (result) {
                        console.log(result);
                        //layer.msg('获取采购订单出现异常', { icon: 2, time: 2000 });
                    }
                });
            }
            //监听提交
            //form.verify({
            //    numberOrEmpty: function (value, item) {
@@ -285,48 +286,48 @@
            //        //}
            //    }
            //});
        layer.load(3)
        table.render({
            elem: '#mainTable'
          , url:  GetWEBURL()+'GetPOInStockShowBillSub'
            , toolbar: '#toolbarDemo' //开启头部工具栏,并为其绑定左侧模板
            , defaultToolbar: ['filter', 'exports']
            //, where: { sMsg: linterid }
          , where: { sMsg: linterid }
          , cols: [[
           // , { field: 'HMTONO', title: '计划跟踪单号', width: 100,, sort: true, fixed: true edit: 'text', hide: true }
            , { field: 'HMaterID', title: '物料ID', width: 100, edit: 'text', hide: true }
            , { field: 'HMaterNumber', title: '物料代码', width: 100}
            , { field: 'HMaterName', title: '物料名称', width: 200}
            , { field: 'HMaterModel', title: '规格型号', width: 200}
            , { field: 'HUnitName', title: '计量单位', width: 100}
            , { field: 'HUnitNumber', title: '计量单位代码', width: 100, hide: true }
            , { field: 'HUnitID', title: '计量单位ID', width: 100, hide: true }
            , { field: 'HQty', title: '数量', width: 100}
            , { field: 'HPrice', title: '单价', width: 100}
            , { field: 'HMoney', title: '金额', width: 100}
            , { field: 'HWHName', title: '收料仓库', width: 100 }
            , { field: 'HWHNumber', title: '收料仓库代码', width: 100, hide: true }
            , { field: 'HWHID', title: '收料仓库ID', width: 100, hide: true }
            , { field: 'HPOOrderInterID', title: '采购订单主内码', width: 150, hide: true }
            , { field: 'HPOOrderEntryID', title: '采购订单子内码', width: 150, hide: true }
            , { field: 'HPOOrderBillNo', title: '采购订单号', width: 200 }
            , { field: 'HWWOrderInterID', title: '委外订单主内码', width: 150, hide: true }
            , { field: 'HWWOrderEntryID', title: '委外订单子内码', width: 150, hide: true }
            , { field: 'HWWOrderDetaiLID', title: '委外订单明细内码', width: 150, hide: true }
            , { field: 'HWWOrderBillNo', title: '委外订单号', width: 200 }
            , { field: 'HSourceBillType', title: '源单类型', width: 100, hide: true }
            , { field: 'HSourceBillNo', title: '源单单号', width: 200}
            , { field: 'HSourceEntryID', title: '源单子内码', width: 150, hide: true }
            , { field: 'HSourceInterID', title: '源单主内码', width: 150, hide: true }
          ]]
            // , data: [linterid]
            // , page: true
            //, height: 500
          , done: function () {
              layer.closeAll("loading");
          }
        });
            layer.load(3)
            table.render({
                elem: '#mainTable'
                , url: GetWEBURL() + 'GetPOInStockShowBillSub'
                , toolbar: '#toolbarDemo' //开启头部工具栏,并为其绑定左侧模板
                , defaultToolbar: ['filter', 'exports']
                //, where: { sMsg: linterid }
                , where: { sMsg: linterid }
                , cols: [[
                    // , { field: 'HMTONO', title: '计划跟踪单号', width: 100,, sort: true, fixed: true edit: 'text', hide: true }
                    , { field: 'HMaterID', title: '物料ID', width: 100, edit: 'text', hide: true }
                    , { field: 'HMaterNumber', title: '物料代码', width: 100 }
                    , { field: 'HMaterName', title: '物料名称', width: 200 }
                    , { field: 'HMaterModel', title: '规格型号', width: 200 }
                    , { field: 'HUnitName', title: '计量单位', width: 100 }
                    , { field: 'HUnitNumber', title: '计量单位代码', width: 100, hide: true }
                    , { field: 'HUnitID', title: '计量单位ID', width: 100, hide: true }
                    , { field: 'HQty', title: '数量', width: 100 }
                    , { field: 'HPrice', title: '单价', width: 100 }
                    , { field: 'HMoney', title: '金额', width: 100 }
                    , { field: 'HWHName', title: '收料仓库', width: 100 }
                    , { field: 'HWHNumber', title: '收料仓库代码', width: 100, hide: true }
                    , { field: 'HWHID', title: '收料仓库ID', width: 100, hide: true }
                    , { field: 'HPOOrderInterID', title: '采购订单主内码', width: 150, hide: true }
                    , { field: 'HPOOrderEntryID', title: '采购订单子内码', width: 150, hide: true }
                    , { field: 'HPOOrderBillNo', title: '采购订单号', width: 200 }
                    , { field: 'HWWOrderInterID', title: '委外订单主内码', width: 150, hide: true }
                    , { field: 'HWWOrderEntryID', title: '委外订单子内码', width: 150, hide: true }
                    , { field: 'HWWOrderDetaiLID', title: '委外订单明细内码', width: 150, hide: true }
                    , { field: 'HWWOrderBillNo', title: '委外订单号', width: 200 }
                    , { field: 'HSourceBillType', title: '源单类型', width: 100, hide: true }
                    , { field: 'HSourceBillNo', title: '源单单号', width: 200 }
                    , { field: 'HSourceEntryID', title: '源单子内码', width: 150, hide: true }
                    , { field: 'HSourceInterID', title: '源单主内码', width: 150, hide: true }
                ]]
                // , data: [linterid]
                // , page: true
                //, height: 500
                , done: function () {
                    layer.closeAll("loading");
                }
            });
            //头工具栏事件
            table.on('toolbar(mainTable)', function (obj) {
                var checkStatus = table.checkStatus(obj.config.id);
@@ -338,12 +339,12 @@
                        window.open("../../views/SRM/HBarPlanPrint.html?linterid=" + linterid + "&Type=HPOInStockBill");
                        break;
                        //自定义头工具栏右侧图标 - 提示
                    //自定义头工具栏右侧图标 - 提示
                    case 'btn-reload':
                        RoadBillMain(linterid);
                        RoadBillSub(linterid);
                        break;
                    case 'btn-exit':
                        var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                        parent.layer.close(index); //再执行关闭
@@ -352,29 +353,31 @@
                    case 'btn-Save':
                        var HDeliveryNo = $("#HDeliveryNo").val();
                        $.ajax(
                            {
                                type: "GET",
                                url: GetWEBURL() + "SavePOInStock", //方法所在页面和方法名
                                async: true,
                                data: { "HmainId": linterid, "HDeliveryNo": HDeliveryNo },
                                dataType: "json",
                                success: function (data) {
                                    if (data.Message.indexOf("成功") > 0) { // 说明验证成功了,
                                        layer.msg(data.Message, { icon: 1 });
                        if (btntype == "changebg") {
                            $.ajax(
                                {
                                    type: "GET",
                                    url: GetWEBURL() + "SavePOInStock", //方法所在页面和方法名
                                    async: true,
                                    data: { "HmainId": linterid, "HDeliveryNo": HDeliveryNo },
                                    dataType: "json",
                                    success: function (data) {
                                        if (data.Message.indexOf("成功") > 0) { // 说明验证成功了,
                                            layer.msg(data.Message, { icon: 1 });
                                        }
                                        else {
                                            layer.msg(data.Message, { icon: 5 });
                                        }
                                        layer.closeAll("loading");
                                    },
                                    error: function (err) {
                                        f_alert("错误:" + err);
                                    }
                                    else {
                                        layer.msg(data.Message, { icon: 5 });
                                    }
                                    layer.closeAll("loading");
                                },
                                error: function (err) {
                                    f_alert("错误:" + err);
                                }
                            });
                                });
                        }
                        break;
                };
        });
            });
            form.on('submit(Saver)', function (data) {//保存
                //debugger;
                var sMainStr = JSON.stringify(data.field);
@@ -382,40 +385,15 @@
                var sMainSub = sMainStr + ';' + sSubStr;
                layer.load(3)
                $.ajax(
                {
                    type: "POST",
                    url: GetWEBURL()+"SaverPOInStock", //方法所在页面和方法名
                    async: true,
                    data: { "msg": sMainSub },
                    dataType: "json",
                    success: function (data) {
                        if (data.count == 1) { // 说明验证成功了,
                            layer.msg(data.Message, { icon: 1 });
                        }
                        else {
                            layer.msg(data.Message, { icon: 5 });
                        }
                        layer.closeAll("loading");
                    },
                    error: function (err) {
                        f_alert("错误:" + err);
                    }
                });
                return false;
            });
            form.on('submit(Save)', function (data) {//更新物流单号
                //debugger;
                var HDeliveryNo = $("#HDeliveryNo").val();
                $.ajax(
                    {
                        type: "POST",
                        url: GetWEBURL() + "SavePOInStock", //方法所在页面和方法名
                        url: GetWEBURL() + "SaverPOInStock", //方法所在页面和方法名
                        async: true,
                        data: { "HmainId": linterid, "HDeliveryNo": HDeliveryNo },
                        data: { "msg": sMainSub },
                        dataType: "json",
                        success: function (data) {
                            if (data.Message.indexOf("成功") > 0) { // 说明验证成功了,
                            if (data.count == 1) { // 说明验证成功了,
                                layer.msg(data.Message, { icon: 1 });
                            }
                            else {
@@ -429,6 +407,34 @@
                    });
                return false;
            });
            form.on('submit(Save)', function (data) {//更新物流单号
                //debugger;
                //获取上个页面传过来的按钮事件
                if (btntype == "changebg") {
                    var HDeliveryNo = $("#HDeliveryNo").val();
                    $.ajax(
                        {
                            type: "POST",
                            url: GetWEBURL() + "SavePOInStock", //方法所在页面和方法名
                            async: true,
                            data: { "HmainId": linterid, "HDeliveryNo": HDeliveryNo },
                            dataType: "json",
                            success: function (data) {
                                if (data.Message.indexOf("成功") > 0) { // 说明验证成功了,
                                    layer.msg(data.Message, { icon: 1 });
                                }
                                else {
                                    layer.msg(data.Message, { icon: 5 });
                                }
                                layer.closeAll("loading");
                            },
                            error: function (err) {
                                f_alert("错误:" + err);
                            }
                        });
                    return false;
                }
            });
@@ -437,26 +443,26 @@
                //jiuajax从服务器获取
                layer.load(3)
                $.ajax(
                {
                    type: "POST",
                    url: GetWEBURL()+"SaverPOInStock", //方法所在页面和方法名
                    async:true,
                    data: { msg: sMainSub },
                    dataType: "json",
                    success: function (data) {
                        if (data.count == 1) { // 说明验证成功了,
                            layer.msg(data.Message, { icon: 1 });
                    {
                        type: "POST",
                        url: GetWEBURL() + "SaverPOInStock", //方法所在页面和方法名
                        async: true,
                        data: { msg: sMainSub },
                        dataType: "json",
                        success: function (data) {
                            if (data.count == 1) { // 说明验证成功了,
                                layer.msg(data.Message, { icon: 1 });
                            }
                            else {
                                // $("#verifycode").click();
                                layer.msg(data.Message, { icon: 5 });
                            }
                            layer.closeAll("loading");
                        },
                        error: function (err) {
                            f_alert("错误:" + err);
                        }
                        else {
                            // $("#verifycode").click();
                            layer.msg(data.Message, { icon: 5 });
                        }
                        layer.closeAll("loading");
                    },
                    error: function (err) {
                        f_alert("错误:" + err);
                    }
                });
                    });
            }
            function f_alert(sMsg) {
                layer.alert(sMsg, { icon: 5 });
@@ -497,7 +503,7 @@
            //    return JSON.stringify(ajaxData).replace(/(")/g, "\\\"");
            //   // return false;
            //});
            //function f_SaveBefore() {
            //    //保存前处理(字段格式:int类型不能为空,日期类型符合格式,bool类型)
            //    if ($("#HInterID").val() == '') {
@@ -511,7 +517,7 @@
                var type = $(this).data('type');
                active[type] ? active[type].call(this) : '';
            });
           });
        });
    </script>
</body>
</html>
WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POInStockBillList.html
@@ -139,9 +139,10 @@
                            <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-getCheckData"><i class="layui-icon layui-icon-tips"></i>预览</button>-->
                            <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-reload"><i class="layui-icon layui-icon-refresh"></i>刷新</button>
                            <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-confirm"><i class="layui-icon layui-icon-ok-circle"></i>确认</button>
                            <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-back"><i class="layui-icon layui-icon-close-fill"></i>驳回</button>-->
    <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-back"><i class="layui-icon layui-icon-close-fill"></i>驳回</button>-->
                            <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-details"><i class="layui-icon layui-icon-form"></i>详情</button>
                            <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-print"><i class="layui-icon layui-icon-print"></i>打印送货单</button>
                            <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-changebg"><i class="layui-icon layui-icon-form"></i>变更</button>
                            <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-print"><i class="layui-icon layui-icon-print"></i>打印送货单</button>
                            <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-generate"><i class="layui-icon layui-icon-file"></i>生成条码</button>
                            <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-exit"><i class="layui-icon layui-icon-return"></i>退出</button>
@@ -312,7 +313,7 @@
                   
                    case 'btn-details':
                        var checkStatus = table.checkStatus('mainTable')
                       , data = checkStatus.data;
                            , data = checkStatus.data;
                        var linterid = data[0].hmainid.toString();
                        //if (AllowLoadData(sSubStr) != false) {//非空验证
@@ -330,6 +331,27 @@
                            }
                        })
                        break;
                    case 'btn-changebg':
                        var checkStatus = table.checkStatus('mainTable')
                            , data = checkStatus.data;
                        var linterid = data[0].hmainid.toString();
                        //if (AllowLoadData(sSubStr) != false) {//非空验证
                        layer.open({
                            type: 2
                            , area: ['100%', '100%']
                            , title: '送货单'
                            , shade: 0.6 //遮罩透明度
                            , maxmin: true //允许全屏最小化
                            , anim: 0 //0-6的动画形式,-1不开启
                            , content: '../../../src/views/SRM/SRM_POInStockBill.html?linterid=' + linterid +'&type =changebg'
                            , resize: false
                            , cancel: function () {
                                //$(".layui-btn").removeClass("layui-btn-disabled");
                            }
                        })
                        break;
                    case 'btn-print':
                        var checkStatus = table.checkStatus('mainTable')
                        , data = checkStatus.data;
WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POInStockBill_Edit.html
@@ -109,12 +109,18 @@
                                        </div>
                                        <div class="layui-form-item">
                                            <div class="layui-row">
                                                <div class="layui-col-xs6">
                                                <div class="layui-col-xs3">
                                                    <label class="layui-form-label"> 送货单号:</label>
                                                    <div class="layui-input-block">
                                                        <input class="layui-input" name="HInnerBillNo" id="HInnerBillNo" autocomplete="off">
                                                    </div>
                                                </div>
                                                <div class="layui-col-xs3">
                                                    <label class="layui-form-label"> 物流单号:</label>
                                                    <div class="layui-input-block">
                                                        <input class="layui-input" name="HDeliveryNo" id="HDeliveryNo" autocomplete="off">
                                                    </div>
                                                </div>
                                                <div class="layui-col-xs6">
                                                    <label class="layui-form-label"> 备    注:</label>
                                                    <div class="layui-input-block">