Helius
2022-05-17 5ff0dc65650b3ad7b94c2f289c45fc86d6d12dca
src/main/resources/templates/febs/views/modules/score/goodsAdd.html
@@ -135,7 +135,6 @@
            form = layui.form,
            laydate = layui.laydate,
            eleTree = layui.eleTree,
            member = [[${member}]],
            $view = $('#score-goods-add'),
            layedit = layui.layedit,
            upload = layui.upload,
@@ -144,34 +143,6 @@
        form.render();
        laydate.render({
            elem: '#febs-form-group-date'
        });
        formSelects.render();
        formSelects.config('user-add-goods', {
            searchUrl: ctx + 'admin/goodsCategory/categorys',
            response: {
                statusCode: 200
            },
            beforeSuccess: function (id, url, searchVal, result) {
                var data = result.data;
                var tranData = [];
                for (var i = 0; i < data.length; i++) {
                    tranData.push({
                        name: data[i].name,
                        value: data[i].id
                    })
                }
                result.data = tranData;
                return result;
            },
            success: function () {
                // formSelects.value('user-add-goods', result.id);
            },
            error: function (id, url, searchVal, err) {
                console.error(err);
                febs.alert.error('获取分类列表失败');
            }
        });
        //普通图片上传
@@ -252,11 +223,6 @@
        form.on('submit(score-goods-add-form-submit)', function (data) {
            data.field.goodsType = 2;
            // febs.post(ctx + 'admin/goods/addMallGoods', data.field, function () {
            //     layer.closeAll();
            //     febs.alert.success('新增成功');
            //     $('#febs-score-goods').find('#query').click();
            // });
            $.ajax({
                'url':ctx + 'admin/goods/addMallGoods',
@@ -266,7 +232,7 @@
                'traditional': true,//ajax传递数组必须添加属性
                'data':JSON.stringify(data.field),
                'success':function (data) {
                    if(data.code==0){
                    if(data.code==200){
                        layer.closeAll();
                        febs.alert.success('新增成功');
                        $('#febs-score-goods').find('#query').click();