自动化立体仓库 - WMS系统
zjj
2023-09-12 3e29b0363ad4571183fc856fdbb893dcfe74a022
src/main/webapp/static/js/nodeLoc/nodeLoc.js
@@ -8,6 +8,7 @@
    ];
    cols.push.apply(cols, matCols);
    cols.push(
        {fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:150}
    )
    return cols;
@@ -62,6 +63,7 @@
            {field: 'parentName', align: 'center',title: '库区', hide: false},
            {field: 'createBy$', align: 'center',title: '创建人', hide: false},
            {field: 'createTime$', align: 'center',title: '创建时间', hide: false},
            // {field: 'status', align: 'center',title: '库位冻结', templet: '#stockFreezeTpl'},
            {field: 'type$', align: 'center',title: '类型', templet: '#tagTpl', hide: false}
        ]],
        request: {
@@ -83,6 +85,7 @@
            if (res.code === 403) {
                top.location.href = baseUrl+"/";
            }
            tableData = table.cache.mat;
            pageCurr=curr;
            limit();
            form.on('checkbox(tableCheckbox)', function (data) {
@@ -381,6 +384,20 @@
        elem: '#updateTime\\$',
        type: 'datetime'
    });
    //库位冻结
    form.on('switch(stockFreezeSwitch)', function (obj) {
        let index  = obj.othis.parents('tr').attr("data-index");
        console.log(index);
        let data = tableData[index];
        data[this.stockFreeze] = obj.elem.checked?1:0;
        http.post(baseUrl + "/node/updateStatus", {
            name: data.name,
            status: data[this.stockFreeze]
        }, function (res) {
            layer.msg(res.msg, {icon: 1});
            tableIns.reload();
        });
    })
});