1
ch
2022-04-14 5535e952a9ad15a997a183ed224c7f01e5aacbf2
WebTM/views/²Ö´æ¹ÜÀí/²Ö¿âµ÷²¦/Kf_MoveStockBill_FastList.html
@@ -38,6 +38,7 @@
                        <ul class="layui-tab-title" lay-filter="tab-all">
                            <li lay-id="1">缓存列表</li>
                            <li lay-id="2">已上传列表</li>
                            <li lay-id="3">已上传查询</li>
                        </ul>
                        <div class="layui-tab-content">
                            <div class="layui-tab-item  layui-show">
@@ -51,6 +52,28 @@
                                <div class="layui-row">
                                    <div class="layui-col-xs12">
                                        <table class="layui-hide" id="yd-table" lay-filter="yd-table"></table>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-tab-item">
                                <div class="layui-inline">
                                    <label class="layui-form-label">单据号</label>
                                    <div class="layui-input-block">
                                        <input type="text" class="layui-input" name="HBillNo" id="HBillNo">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">源单号</label>
                                    <div class="layui-input-block">
                                        <input type="text" class="layui-input" name="HSourceBillNo" id="HSourceBillNo">
                                    </div>
                                </div>
                                <div class="layui-col-xs2">
                                    <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdQuery">查询</button>
                                </div>
                                <div class="layui-row">
                                    <div class="layui-col-xs12">
                                        <table class="layui-hide" id="sy-table" lay-filter="sy-table"></table>
                                    </div>
                                </div>
                            </div>
@@ -99,7 +122,7 @@
        , form = layui.form
        , element = layui.element;
        //清空界面  new
        var sBillType = '1207'
        //动态加载源单类型列表 new
        //加载源单类型
@@ -253,43 +276,75 @@
        form.on('submit(cmdDelete)', function () {//删除
            var checkStatus = table.checkStatus('dj-table')
                , data = checkStatus.data;
            var sInterID = data[0].HInterID
            $.ajax(
                {
                    type: "Get",
                    url: GetWEBURL() + "/ProductInBillList/Delete_Json",
                    async: true,
                    data: { "sHInterID": sInterID },
                    dataType: "json",
                    success: function (data) {
                        if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†,
                            layer.msg(data.Message, { time: 1 * 1000, icon: 1 }, function () {
                                // å¾—到frame索引
                                var index = layer.getFrameIndex(window.name);
                                //关闭当前frame
                                layer.close(index);
                                //修改为功后刷新界面
                                window.location.reload();
                            });
                        }
                        else {
                            layer.msg(data.Message, { icon: 2 });
                        }
                    },
                    error: function (err) {
                        layer.msg('错误' + err, {
                            icon: 5,
                            time: 20000
                        }, function () {
                            //do something
            if (checkStatus.data.length === 1) {
                var sInterID = data[0].HInterID;
                //逻辑删除方法
                layer.confirm("确认要删除吗,删除后不能恢复", { title: "删除确认" }, function (index) {
                    $.ajax(
                        {
                            type: "Get",
                            url: GetWEBURL() + "/ProductInBillList/Delete_Json",
                            async: true,
                            data: { "sHInterID": sInterID },
                            dataType: "json",
                            success: function (data) {
                                if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†,
                                    layer.msg(data.Message, { time: 1 * 1000, icon: 1 }, function () {
                                        // å¾—到frame索引
                                        var index = layer.getFrameIndex(window.name);
                                        //关闭当前frame
                                        layer.close(index);
                                        //修改为功后刷新界面
                                        window.location.reload();
                                    });
                                }
                                else {
                                    layer.msg(data.Message, { icon: 2 });
                                }
                            },
                            error: function (err) {
                                layer.msg('错误' + err, {
                                    icon: 5,
                                    time: 20000
                                }, function () {
                                    //do something
                                });
                            }
                        });
                    }
                });
                })
            }
            else {
                layer.msg('请选择一行数据删除!');
            }
        });
        //查询
        form.on('submit(cmdQuery)', function () {
            var HBillNo = $("#HBillNo").val();
            var HSourceBillNo = $("#HSourceBillNo").val();
            //进入页面显示的缓存列表
            $.ajax({
                url: GetWEBURL() + '/Gy_Mould/list1',
                type: "GET",
                data: { "BillType": sBillType, "HBillNo": HBillNo, "HSourceBillNo": HSourceBillNo },
                success: function (data1) {
                    if (data1.count == 1) {
                        option.data = data1.data;
                        table.render(option);
                        layer.close(index);
                    } else {
                        layer.close(index);
                        layer.alert(data1.code + data1.Message, { icon: 5 });
                    }
                }, error: function () {
                    layer.close(index);
                    layer.alert("接口请求失败!", { icon: 5 });
                }
            });
        });
       
        
        var sBillType = '1207'
                table.render({
                    elem: '#dj-table'
                    , url: GetWEBURL() + '/Web/chanpinruk'
@@ -338,6 +393,26 @@
                layer.closeAll("loading");
            }
        })
        //已上传查询
        table.render({
            elem: '#sy-table'
            , toolbar: '#toolbarDemo'
            , cols: [[
                { type: 'radio' }
                , { field: 'HInterID', title: '单据内码', width: 80 }
                , { field: 'HBillNo', title: '单据号', width: 80 }
                , { field: 'HMaker', title: '制单人', width: 100 }
                , { field: 'HMakeDate', title: '制单日期', width: 100 }
                , { field: 'HMaterNumber', title: '物料代码', width: 100 }
                , { field: 'HMaterName', title: '物料名称', width: 100 }
                , { field: 'HMaterModel', title: '规格型号', width: 100 }
                , { field: 'HQty', title: '数量', width: 100 }
                , { field: 'HSourceBillNo', title: '源单单号', width: 100 }
                , { field: 'HOrgID', title: '组织', width: 100 }
            ]]
            , height: 500
        })
        //刷新明细页签
        table.render({
            elem: '#mx-table'