懒羊羊
2023-11-14 036dcdcec6235d82b008f5c736d27a0d1f90d4a2
guns-vip-main/src/main/webapp/assets/modular/bs/materialInfo/materialInfo_edit.js
@@ -26,38 +26,28 @@
    var form = layui.form;
    var admin = layui.admin;
    //获取详情信息,填充表单
    var ajax = new $ax(Feng.ctxPath + "/materialInfo/detail?id=" + Feng.getUrlParam("id"));
    var result = ajax.start();
    form.val('materialInfoForm', result.data);
    var result1 = ajax.start();
    form.val('materialInfoForm', result1.data);
    getDictType();
    function getDictType(){
        $.ajax({
            type: "POST",
            contentType: "application/json;charset=UTF-8",
            url: Feng.ctxPath + '/dict/list?dictTypeId=1724238087352172546',
            success: function (result) {
                $.each(result.data, function (index, value) {
                    $('#typeL').append(new Option(value.name,value.code));// 下拉菜单里添加元素
                });
                $('#typeL').val(result1.data.typeL)
                layui.form.render("select");//重新渲染 固定写法
            },
        });
    }
    //表单提交事件
    form.on('submit(btnSubmit)', function (data) {