1
cp
2025-03-27 a3bea567c554c2c57809ceed2a040baf473aa95f
zy-asrs-wms/src/main/webapp/static/js/mat/mat.js
@@ -16,8 +16,8 @@
layui.config({
    base: baseUrl + "/static/layui/lay/modules/"
}).extend({
    dropdown: 'dropdown/dropdown',
}).use(['table','laydate', 'form', 'treeTable', 'admin', 'xmSelect', 'dropdown', 'element'], function(){
    dropdown: 'dropdown/dropdown',notice: 'notice/notice',
}).use(['table','laydate', 'form', 'treeTable','notice', 'admin', 'xmSelect', 'dropdown', 'element'], function(){
    var table = layui.table;
    var $ = layui.jquery;
    var layer = layui.layer;
@@ -26,7 +26,7 @@
    admin = layui.admin;
    var treeTable = layui.treeTable;
    var xmSelect = layui.xmSelect;
    var notice = layui.notice;
    // 商品分类数据
    var insTb = treeTable.render({
        elem: '#tag',
@@ -52,7 +52,7 @@
        url: baseUrl+'/mat/page/auth',
        page: true,
        limit: 16,
        limits: [16, 30, 50, 100, 200, 500],
        limits: [16, 30, 50, 100, 200, 500,1000,2000,10000,100000],
        toolbar: '#toolbar',
        cellMinWidth: 50,
        height: 'full-105',
@@ -364,6 +364,32 @@
        tableReload(false);
    });
    // 同步庫存
    form.on('submit(synchronous)', function (data) {
        layer.confirm('确认同步庫存?', function(){
            notice.msg('正在同步庫存......', {icon: 4});
            $.ajax({
                url: baseUrl+"/mat/synchronous",
                headers: {'token': localStorage.getItem('token')},
                method: 'GET',
                success: function (res) {
                    notice.destroy();
                    // layer.close(loadIndex);
                    if (res.code === 200){
                        layer.close(dIndex);
                        layer.msg(res.msg, {icon: 1});
                        $(".layui-laypage-btn")[0].click();
                    } else if (res.code === 403){
                        top.location.href = baseUrl+"/";
                    }else {
                        layer.msg(res.msg, {icon: 2});
                    }
                }
            })
        });
    });
    // 时间选择器
    layDate.render({
        elem: '#createTime\\$',