zgq
2021-08-23 50177080aefbddf36d1cec10caac09d21462f9bc
WebTM/views/»ù´¡×ÊÁÏ/¹«Óûù´¡×ÊÁÏ/Gy_Currency.html
@@ -113,6 +113,7 @@
        }).extend({
            index: 'lib/index', //主入口模块
        }).use(['tree', 'index', 'form', 'table', 'element', 'laypage', 'laydate'], function () {
            //#region å…¬ç”¨å˜é‡
            var $ = layui.$
                , admin = layui.admin
                , layer = layui.layer
@@ -124,8 +125,9 @@
                , util = layui.util
                , tree = layui.tree
            var sWhere = "";
            //#endregion
            //#region åˆå§‹åŒ–表格
            $.ajax({
                url: GetWEBURL() + '/Gy_Currency/LoadTree',
                type: "GET",
@@ -144,40 +146,6 @@
                    });
                }
            });
            //$.ajax({
            //    type: "get",
            //    url: GetWEBURL() + '/Gy_Department/LoadTree',
            //    async: true,
            //    success: function (result) {
            //        //  console.log(result.data);
            //        var tree = Customerdatatree('treeDepartment', result.data, true);
            //        tree.onspread = function () {
            //            var obj = this;
            //            //模拟post后台数据,延迟2秒
            //            setTimeout(() => {
            //                var data = getTreeJson(obj.data.HParentID); //异步获取数据
            //                obj.lazytree(data);
            //            }, 2000);
            //        }
            //        tree.onclick = function () {
            //            var obj = this;
            //            console.log(obj.data); //得到当前点击的节点数据
            //            console.log(obj.state); //得到当前节点的展开状态:open、close、normal
            //            console.log(obj.elem); //得到当前节点元素
            //            console.log(obj.data.children); //当前节点下是否有子节点
            //        }
            //        tree.oncheck = function () {
            //            var obj = this;
            //            console.log(obj.data); //得到当前点击的节点数据
            //            console.log(obj.checked); //得到当前节点的展开状态:open、close、normal
            //            console.log(obj.elem); //得到当前节点元素
            //        }
            //    }
            //});
            var option = {
                elem: '#mainTable'
                , toolbar: '#toolbarDemo'
@@ -198,7 +166,9 @@
            };
            var index = layer.load(0, { shade: false });
            //进入页面显示的缓存列表
            //#endregion
            //#region è¿›å…¥é¡µé¢æ˜¾ç¤ºçš„缓存列表
            $.ajax({
                url: GetWEBURL() + '/Gy_Currency/list1',
                type: "GET",
@@ -217,8 +187,9 @@
                    layer.alert("接口请求失败!", { icon: 5 });
                }
            });
            //#endregion
            //头工具栏事件
            //#region å¤´å·¥å…·æ äº‹ä»¶
            table.on('toolbar(mainTable)', function (obj) {
                var checkStatus = table.checkStatus(obj.config.id);
                switch (obj.event) {
@@ -287,28 +258,18 @@
                        break;
                };
            });
            //#endregion
            //重置按钮
            //#region é‡ç½®æŒ‰é’®
            form.on('submit(btnReSearch)', function (data) {
                $("#HNumber").val("");
                $("#HName").val("");
                $("#btnSearch").click();
            });
            //#endregion
            //删除
            //#region åˆ é™¤
            form.on('submit(btndelete)', function (obj) {
                //var checkStatus = table.checkStatus('mainTable')
                //    , data = checkStatus.data;
                ////console.log(checkStatus.data[0].HBillStatus);
                //if (data.length == 0) {
                //    layer.msg("先选择要删除该单据吗?");
                //    return;
                //}
                //if (checkStatus.data[0].HBillStatus == '已审核') {
                //    layer.msg("该单据已审核无法删除,请先反审核!");
                //    return;
                //}
                var ModRightNameDelete = 'Gy_Department_Delete'
                var data = obj.data //获得当前行数据
@@ -334,36 +295,13 @@
                                }
                            }
                        })
                        //$.ajax({
                        //    //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
                        //    url: GetWEBURL() + '/Sc_ProcessMangement/MES_QC_NoPassProdCheckBill_Json',
                        //    type: "GET",
                        //    data: { "sWhere": sWhere },
                        //    success: function (data1) {
                        //        if (data1.count == 1) {
                        //            option.data = data1.data;
                        //            table.render(option);
                        //            layer.close(index0);
                        //        } else {
                        //            layer.close(index0);
                        //            layer.alert(data1.code + data1.Message, { icon: 5 });
                        //        }
                        //    }, error: function () {
                        //        layer.close(index0);
                        //        layer.alert("接口请求失败!", { icon: 5 });
                        //    }
                        //});
                        layer.close(index); //关闭弹层
                    }
                });
            });
            //#endregion
            //禁用
            //#region ç¦ç”¨
            form.on('submit(btnJY)', function (obj) {
                //var checkStatus = table.checkStatus('mainTable')
                //    , data = checkStatus.data;
@@ -399,33 +337,16 @@
                                }
                            }
                        })
                        //$.ajax({
                        //    //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
                        //    url: GetWEBURL() + '/Sc_ProcessMangement/MES_QC_NoPassProdCheckBill_Json',
                        //    type: "GET",
                        //    data: { "sWhere": sWhere },
                        //    success: function (data1) {
                        //        if (data1.count == 1) {
                        //            option.data = data1.data;
                        //            table.render(option);
                        //            layer.close(index0);
                        //        } else {
                        //            layer.close(index0);
                        //            layer.alert(data1.code + data1.Message, { icon: 5 });
                        //        }
                        //    }, error: function () {
                        //        layer.close(index0);
                        //        layer.alert("接口请求失败!", { icon: 5 });
                        //    }
                        //});
                        layer.close(index); //关闭弹层
                    }
                });
            });
            //#endregion
            //反禁用
            //#region åç¦ç”¨
            form.on('submit(btnFJY)', function (obj) {
                //var checkStatus = table.checkStatus('mainTable')
                //    , data = checkStatus.data;
@@ -461,33 +382,13 @@
                                }
                            }
                        })
                        //$.ajax({
                        //    //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
                        //    url: GetWEBURL() + '/Sc_ProcessMangement/MES_QC_NoPassProdCheckBill_Json',
                        //    type: "GET",
                        //    data: { "sWhere": sWhere },
                        //    success: function (data1) {
                        //        if (data1.count == 1) {
                        //            option.data = data1.data;
                        //            table.render(option);
                        //            layer.close(index0);
                        //        } else {
                        //            layer.close(index0);
                        //            layer.alert(data1.code + data1.Message, { icon: 5 });
                        //        }
                        //    }, error: function () {
                        //        layer.close(index0);
                        //        layer.alert("接口请求失败!", { icon: 5 });
                        //    }
                        //});
                        layer.close(index); //关闭弹层
                    }
                });
            });
            //#endregion
            //查询按钮
            //#region æŸ¥è¯¢æŒ‰é’®
            form.on('submit(btnSearch)', function (data) {
                var HNumber = $("#HNumber").val();
                var HName = $("#HName").val();
@@ -516,9 +417,9 @@
                });
                sWhere = "";//调用接口后清空sWhere缓存
            });
            //#endregion
            //修改按钮
            //#region ä¿®æ”¹æŒ‰é’®
            form.on('submit(btnModify)', function (data) {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
@@ -533,7 +434,7 @@
                    , resize: false
                })
            });
            //#endregion
            //laydate.render({
            //    elem: '#HDate'