价目表 价目表页面没有”按钮设置“选项。没有导出功能,需要添加。
价目表 价目表编辑,保存时判断单价不能为0。
价目表 新增界面审核按钮有问题,按不了
编辑、删除、审核、禁用、导出权限
2个文件已修改
123 ■■■■■ 已修改文件
WebTM/views/基础资料/基础资料/Gy_MatePrice.html 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/基础资料/基础资料/Gy_MatePriceEdit.html 87 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/»ù´¡×ÊÁÏ/»ù´¡×ÊÁÏ/Gy_MatePrice.html
@@ -351,17 +351,6 @@
                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //隐藏id列
                                }
                                else {
                                    if (data[i].name === "是否禁用") {
                                        col.push({
                                            field: data[i].id,
                                            title: data[i].name,
                                            align: 'center',
                                            templet: function (d) {
                                                return d.是否禁用 === 1 ? 'Y' : '';
                                            }
                                        });
                                    }
                                    else {
                                        switch (data[i].Type) {
                                            //int
                                            case 'DateTime':
@@ -377,7 +366,7 @@
                                            default:
                                                col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
                                        }
                                    }
                                }
                            }
                            //动态显示列名
@@ -892,18 +881,23 @@
            }
            //#region å¯¼å‡ºExecel
            function btn_Export() {
                option.data.forEach((item) => {
                    for (let itemobj in item) {
                        if (item[itemobj] == null) {
                            item[itemobj] = "";
                var ModRightNameCheck = "Gy_MatePrice_ExportExcel";
                //逻辑审核方法
                $.ajax({
                    type: "GET",
                    url: GetWEBURL() + "/LMES/getReportByModRightNameCheck", //方法所在页面和方法名
                    data: { "ModRightNameCheck": ModRightNameCheck, "user": sessionStorage["HUserName"] },
                    success: function (result) {
                        if (result.count == 1) {
                            table.exportFile(ins.config.id, option.data, "xls");
                        } else {
                            layer.alert("当前模块没有导出权限!", { icon: 5 });
                        }
                        if (item[itemobj].length > 0) {  // å‡è®¾å­—段名为field
                            item[itemobj] = item[itemobj].toString().replaceAll(/[\r\n]+/g, '');  // å°†æ¢è¡Œç¬¦æ›¿æ¢ä¸ºç©ºå­—符串
                        }
                    }, error: function () {
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
                table.exportFile(ins.config.id, option.data, "xls");
            }
            //#endregion
            //读取方案
WebTM/views/»ù´¡×ÊÁÏ/»ù´¡×ÊÁÏ/Gy_MatePriceEdit.html
@@ -132,7 +132,7 @@
                                                <div class="layui-col-xs4 layui-inline">
                                                    <label class="layui-form-label">禁用标志</label>
                                                    <div class="layui-input-inline">
                                                        <input type="checkbox" name="checkboxHStopflag" id="checkboxHStopflag" lay-skin="primary" lay-filter="checkboxHStopflag" value="true" title="是否禁用">
                                                        <input type="checkbox" name="checkboxHStopflag" id="checkboxHStopflag" lay-skin="primary" lay-filter="checkboxHStopflag" value="false" title="是否禁用">
                                                        <input type="hidden" value="false" name="HStopflag" id="HStopflag">
                                                        <!--<input type="hidden" value="false" name="HStopflag" id="HStopflag">-->
                                                    </div>
@@ -275,12 +275,18 @@
        } else {
            var OperationType = params[params[0]];//操作类型//从参数中获取 æ•°æ®ç±»åž‹  1添加 ä¿å­˜  2复制  3 ç¼–辑
            var linterid = params[params[1]];//源单id
            var HSouceBillType = params[params[2]];//源单类型
            var HSouceBillType = params[params[2]];//源单类型
        }
        if ($("#HCheckEmp").val() == "") {
            $('#set_CheckBill').removeClass('layui-btn-disabled').attr('disabled', false)
        }
        else
        $('#set_CheckBill').addClass('layui-btn-disabled').attr('disabled', true);
        //判断操作类型
        if (OperationType == 1) {//无源单新增
            $("#HItemID").val(0);
            linterid = 0;
            $("#HMakeTime").val(util.toDateString(new Date(), 'yyyy-MM-dd'))
        }
        else if (OperationType == 2) {//复制
@@ -443,7 +449,11 @@
            $("#HMakeEmp").val(sessionStorage["HUserName"]);
            $("#HMakeTime").val(Format(new Date(), "yyyy-MM-dd"));
            $("#HStopEmp").val(sessionStorage["HUserName"]);
            $("#HCheckEmp").val(sessionStorage["HUserName"]);
            if ($("#HStopflag").val() != false) {
                $("#HStopTime").val(Format(new Date(), "yyyy-MM-dd"));
            }
            //$("#HCheckEmp").val(sessionStorage["HUserName"]);
            //$("#HCheckTime").val(Format(new Date(), "yyyy-MM-dd"));
            $("#HModifyEmp").val(sessionStorage["HUserName"]);
            Organ();
            Organ1();
@@ -456,6 +466,11 @@
        function set_AddNew(data) {
            var HPrice = $('#HPrice').val();
            var HStopflag_check = $('#HStopflag').val();
            if (HStopflag_check == "false") {
                $('#HStopTime').val(" ");
                console.log("1");
            }
            if (HPrice.substring(HPrice.length - 1, HPrice.length) == ".") {
                layer.msg("单价的结尾不能是.!");
                return;
@@ -465,7 +480,12 @@
                    layer.msg("单价请输正确入数字!");
                    return;
                }
                if (HPrice == 0 || HPrice == null || HPrice == "0") {
                    layer.msg("单价请不能为0!");
                    return;
                }
            }
            var HisBan = $('#HStopflag').val();
            var UseType = $('#HUseFlag').val();
            var HStopEmp = $('#HStopEmp').val();
@@ -509,12 +529,14 @@
                success: function (d) {
                    var IsHStopflag = d.data[0].是否禁用;
                    //禁用标记
                    //if (IsHStopflag=== 1) {
                    //    $("#HStopflag").attr("checked", true);
                    //}
                    if (IsHStopflag) {
                        $("input[name='checkboxHStopflag'][value='" + IsHStopflag + "']").attr("checked", true);
                    if (IsHStopflag === false) {
                        $("#checkboxHStopflag").attr("checked", false);
                    }
                    else
                        $("#checkboxHStopflag").attr("checked", true);
                    //if (IsHStopflag) {
                    //    $("input[name='checkboxHStopflag'][value='" + IsHStopflag + "']").attr("checked", false);
                    //}
                    //主表
                    form.val("component-form-group", { //formTest å³ class="layui-form" æ‰€åœ¨å…ƒç´ å±žæ€§ lay-filter="" å¯¹åº”的值
                        "HItemID": d.data[0].HItemID
@@ -572,32 +594,33 @@
            })
        }
        form.on('submit(set_CheckBill)', function () {
            var InterID = linterid
            //逻辑审核方法
            $.ajax({
                type: "GET",
                url: GetWEBURL() + "/Gy_MatePriceController/MatePriceCheck", //方法所在页面和方法名
                data: { "HInterID": InterID, "IsAudit": 0, "CurUserName": 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);
                            $('#set_CheckBill').addClass('layui-btn-disabled').attr('disabled', true);
                            $('#saver').addClass('layui-btn-disabled').attr('disabled', true);
                            //修改为功后刷新界面
                            //$("#btnSearch").trigger('click');
                        });
                //逻辑审核方法
                $.ajax({
                    type: "GET",
                    url: GetWEBURL() + "/Gy_MatePriceController/MatePriceCheck", //方法所在页面和方法名
                    data: { "HInterID": linterid, "IsAudit": 0, "CurUserName": 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);
                                $('#set_CheckBill').addClass('layui-btn-disabled').attr('disabled', true);
                                $('#saver').addClass('layui-btn-disabled').attr('disabled', true);
                                //修改为功后刷新界面
                                //$("#btnSearch").trigger('click');
                            });
                    } 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 });
                }
            });
                });
        })
        //#region èŽ·å–ç»„ç»‡
        function Organ() {