1
duhe
2024-05-06 dc28e591aa32164c957a8e401ee6c5bdebc53384
WebTM/views/²Ö´æ¹ÜÀí/²Ö¿âµ÷²¦/Kf_MoveStockBillList.html
@@ -368,6 +368,7 @@
                        , { field: 'hmainid', title: '单据ID', hide: true, sort: true }
                        , { field: '日期', title: '日期', width: 160, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true }
                        , { field: '单据号', title: '单据号', width: 160, sort: true }
                        , { field: '状态', title: '状态', width: 160, sort: true }
                        , { field: 'hsecmanagerid', title: 'hsecmanagerid', width: 200, hide: true, sort: true }
                        , { field: '验收员代码', title: '验收员代码', width: 200, sort: true }
                        , { field: '验收员', title: '验收员', width: 160, sort: true }
@@ -490,28 +491,33 @@
                    var InterID = data[0].hmainid.toString();
                    //逻辑删除方法
                    layer.confirm("确认要删除吗,删除后不能恢复", { title: "删除确认" }, function (index) {
                        $.ajax({
                            type: "GET",
                            url: GetWEBURL() + "Kf_MoveStockBill/DelteteGetMoveStockBill", //方法所在页面和方法名
                            data: { "HInterID": InterID, "user": sessionStorage["HUserName"] },
                            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();
                                    });
                        if (data[0].状态 =="创建") {
                            $.ajax({
                                type: "GET",
                                url: GetWEBURL() + "Kf_MoveStockBill/DelteteGetMoveStockBill", //方法所在页面和方法名
                                data: { "HInterID": InterID, "user": sessionStorage["HUserName"] },
                                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 });
                                    } else {
                                        layer.alert(result.code + result.Message, { icon: 5 });
                                    }
                                }, error: function () {
                                    layer.alert("接口请求失败!", { icon: 5 });
                                }
                            }, error: function () {
                                layer.alert("接口请求失败!", { icon: 5 });
                            }
                        });
                            });
                        } else {
                            layer.msg('此条数据不是创建状态,不能删除!');
                        }
                    })
                }
                else {