zzr99
2021-09-27 538c6b96405095762f49964c6cdd9d9113563de8
WebTM/views/Ä£Öξ߹ÜÀí/Ä£Öξֿ߲â¹ÜÀí/Sc_MouldRepairInBillEdit.html
@@ -87,7 +87,7 @@
                                            <div class="layui-input-inline">
                                                <input type="text" name="HKeeperName" id="HKeeperName" class="layui-input" value="" style="float:left;width:150px;">
                                                <input type="hidden" name="HKeeperID" id="HKeeperID" class="layui-input" value="" style="float:left;width:150px;">
                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HSecManagerList" style="width:40px;">
                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HKeeperList" style="width:40px;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                </button>
                                            </div>
@@ -97,7 +97,7 @@
                                            <div class="layui-input-inline">
                                                <input type="text" name="HSupName" id="HSupName" class="layui-input" value="" style="float:left;width:150px;">
                                                <input type="hidden" name="HSupID" id="HSupID" class="layui-input" value="" style="float:left;width:150px;">
                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HEmpList" style="width:40px;">
                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HSupList" style="width:40px;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                </button>
                                            </div>
@@ -117,9 +117,9 @@
                                        <div class="layui-inline">
                                            <label class="layui-form-label">负责人</label>
                                            <div class="layui-input-inline">
                                                <input type="text" name="HMangerName" id="HMangerName" class="layui-input" value="" style="float:left;width:150px;">
                                                <input type="hidden" name="HMangerID" id="HMangerID" class="layui-input" value="" style="float:left;width:150px;">
                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HSecManagerList" style="width:40px;">
                                                <input type="text" name="HManagerName" id="HManagerName" class="layui-input" value="" style="float:left;width:150px;">
                                                <input type="hidden" name="HManagerID" id="HManagerID" class="layui-input" value="" style="float:left;width:150px;">
                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HManagerList" style="width:40px;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                </button>
                                            </div>
@@ -254,8 +254,6 @@
                    <script type="text/html" id="xuhao">
                        {{d.LAY_TABLE_INDEX+1}}
                    </script>
                    <!--隐藏字段-->
                    <input type="hidden" name="HInnerBillNo" id="HInnerBillNo" value="">
                </form>
            </div>
        </div>
@@ -373,13 +371,50 @@
                    }
                });
            });
            //表头信息仓管员弹窗
            form.on('submit(HKeeperList)', function () {
                //页面层-自定义
                layer.open({
                    type: 2,
                    skin: 'layui-layer-rim', //加上边框
                    title: '仓管员列表',
                    closeBtn: 1,
                    shift: 2,
                    area: ['80%', '80%'],
                    maxmin: true,
                    content: ['../../PublicPage/UserInformation.html', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
                        //按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                        if (checkStatus.data.length === 0) {
                            return layer.msg('请选择数据');
                        }
                        $("#HKeeperName").val(checkStatus.data[0].HName);
                        $("#HKeeperID").val(checkStatus.data[0].HItemID);
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
                    , btn2: function (index, layero) {
                        //按钮【按钮二】的回调
                        //return false å¼€å¯è¯¥ä»£ç å¯ç¦æ­¢ç‚¹å‡»è¯¥æŒ‰é’®å…³é—­
                    },
                    end: function () {
                    },
                    success: function (layero, index) {
                    }
                });
            });
            //表头信息验收员弹窗
            form.on('submit(HSecManagerList)', function () {
                //页面层-自定义
                layer.open({
                    type: 2,
                    skin: 'layui-layer-rim', //加上边框
                    title: '仓库列表',
                    title: '验收员列表',
                    closeBtn: 1,
                    shift: 2,
                    area: ['80%', '80%'],
@@ -410,13 +445,13 @@
                    }
                });
            });
            //表头信息保管员弹窗
            form.on('submit(HKeeperList)', function () {
            //表头信息业务员弹窗
            form.on('submit(HEmpList)', function () {
                //页面层-自定义
                layer.open({
                    type: 2,
                    skin: 'layui-layer-rim', //加上边框
                    title: '仓库列表',
                    title: '业务员列表',
                    closeBtn: 1,
                    shift: 2,
                    area: ['80%', '80%'],
@@ -431,8 +466,8 @@
                        if (checkStatus.data.length === 0) {
                            return layer.msg('请选择数据');
                        }
                        $("#HKeeperName").val(checkStatus.data[0].HName);
                        $("#HKeeperID").val(checkStatus.data[0].HItemID);
                        $("#HEmpName").val(checkStatus.data[0].HName);
                        $("#HEmpID").val(checkStatus.data[0].HItemID);
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
                    , btn2: function (index, layero) {
@@ -447,13 +482,13 @@
                    }
                });
            });
            //表头信息业务员弹窗
            form.on('submit(HEmpList)', function () {
            //表头信息负责人弹窗
            form.on('submit(HManagerList)', function () {
                //页面层-自定义
                layer.open({
                    type: 2,
                    skin: 'layui-layer-rim', //加上边框
                    title: '仓库列表',
                    title: '负责人列表',
                    closeBtn: 1,
                    shift: 2,
                    area: ['80%', '80%'],
@@ -468,8 +503,45 @@
                        if (checkStatus.data.length === 0) {
                            return layer.msg('请选择数据');
                        }
                        $("#HKeeperName").val(checkStatus.data[0].HName);
                        $("#HKeeperID").val(checkStatus.data[0].HItemID);
                        $("#HManagerName").val(checkStatus.data[0].HName);
                        $("#HManagerID").val(checkStatus.data[0].HItemID);
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
                    , btn2: function (index, layero) {
                        //按钮【按钮二】的回调
                        //return false å¼€å¯è¯¥ä»£ç å¯ç¦æ­¢ç‚¹å‡»è¯¥æŒ‰é’®å…³é—­
                    },
                    end: function () {
                    },
                    success: function (layero, index) {
                    }
                });
            });
            //表头信息维修单位弹窗
            form.on('submit(HSupList)', function () {
                //页面层-自定义
                layer.open({
                    type: 2,
                    skin: 'layui-layer-rim', //加上边框
                    title: '维修单位列表',
                    closeBtn: 1,
                    shift: 2,
                    area: ['80%', '80%'],
                    maxmin: true,
                    content: ['../../PublicPage/SupplierInformation.html', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
                        //按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                        if (checkStatus.data.length === 0) {
                            return layer.msg('请选择数据');
                        }
                        $("#HSupName").val(checkStatus.data[0].HName);
                        $("#HSupID").val(checkStatus.data[0].HItemID);
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
                    , btn2: function (index, layero) {
@@ -543,7 +615,7 @@
                $.ajax(
                    {
                        type: "POST",
                        url: GetWEBURL() + "/Sc_MouldProdInHouseBill/SaveGetMouldProdInHouseBillList", //方法所在页面和方法名
                        url: GetWEBURL() + "/Sc_MouldRepairInBill/SaveGetMouldRepairInBillList", //方法所在页面和方法名
                        async: true,
                        data: { "msg": sMainSub },
                        dataType: "json",
@@ -568,6 +640,76 @@
                            console.log("Reason" + sMainStr);
                        }
                    });
            });
            //审核
            form.on('submit(set_CheckBill)', function (data) {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var InterID = data[0].hmainid.toString();
                    var user = sessionStorage["HUserName"];
                    //逻辑删除方法
                    $.ajax({
                        type: "GET",
                        url: GetWEBURL() + "Sc_MouldRepairInBill/set_CheckBill", //方法所在页面和方法名
                        data: { "HInterID": InterID, "CurUserName": user },
                        success: function (result) {
                            if (result.count == 1) {
                                layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
                                    // å¾—到frame索引
                                    var index = layer.getFrameIndex(window.name);
                                    //关闭当前frame
                                    layer.close(index);
                                    //修改为功后刷新界面
                                    window.location.reload();
                                });
                            } else {
                                layer.alert(result.code + result.Message, { icon: 5 });
                            }
                        }, error: function () {
                            layer.alert("接口请求失败!", { icon: 5 });
                        }
                    });
                }
                else {
                    layer.msg('请选择一行数据删除!');
                }
            });
            //反审核
            form.on('submit(set_AbandonCheck)', function (data) {//
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var InterID = data[0].hmainid.toString();
                    var user = sessionStorage["HUserName"];
                    //逻辑删除方法
                    $.ajax({
                        type: "GET",
                        url: GetWEBURL() + "Sc_MouldRepairInBill/set_AbandonCheck", //方法所在页面和方法名
                        data: { "HInterID": InterID, "CurUserName": user },
                        success: function (result) {
                            if (result.count == 1) {
                                layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
                                    // å¾—到frame索引
                                    var index = layer.getFrameIndex(window.name);
                                    //关闭当前frame
                                    layer.close(index);
                                    //修改为功后刷新界面
                                    window.location.reload();
                                });
                            } else {
                                layer.alert(result.code + result.Message, { icon: 5 });
                            }
                        }, error: function () {
                            layer.alert("接口请求失败!", { icon: 5 });
                        }
                    });
                }
                else {
                    layer.msg('请选择一行数据删除!');
                }
            });
            //退出
            form.on('submit(Exit)', function (data) {//
@@ -755,10 +897,10 @@
                                , "HKeeperName": data.保管员
                                , "HSupID": data.HSupID
                                , "HSupName": data.维修单位
                                , "HSecManagerID": data.hsecmanagerid    //验收员ID
                                , "HSecManagerID": data.HSecManagerID    //验收员ID
                                , "HSecManagerName": data.验收员         //验收员名称
                                , "HMangerID": data.HMangerID
                                , "HMangerName": data.负责人
                                , "HManagerID": data.HManagerID
                                , "HManagerName": data.负责人
                                , "HDeptID": data.HDeptID                 //部门ID
                                , "HDeptName": data.部门                  //部门名称
                                , "RepairType": ""                       //维修类型