自动化立体仓库 - WMS系统
whycq
2023-07-24 b7e08df5a07b3fa832a46ecc31983e16f2bccc8c
src/main/webapp/static/js/pakStore/locCheckOut.js
@@ -1,4 +1,13 @@
var pageCurr;
var tableIns;
function getCol() {
    var cols = [
        {field: 'locNo$', align: 'center',title: '库位号'}
    ];
    cols.push.apply(cols, detlCols);
    return cols;
}
layui.use(['table','laydate', 'form'], function() {
    var table = layui.table;
    var $ = layui.jquery;
@@ -13,22 +22,7 @@
        even: true,
        toolbar: '#toolbar',
        cellMinWidth: 50,
        cols: [[
            // {field: 'count', align: 'center',title: '出库数量', edit:'text', width: 130,  style:'color: blue;font-weight: bold'} // todo
            ,{field: 'anfme', align: 'center',title: '原数量'}
            ,{field: 'locNo$', align: 'center',title: '库位号'}
            ,{field: 'matnr', align: 'center',title: '物料'}
            // ,{field: 'lgnum', align: 'center',title: '仓库号', width:80}
            // ,{field: 'tbnum', align: 'center',title: '转储请求编号'}
            // ,{field: 'tbpos', align: 'center',title: '行项目'}
            // ,{field: 'zmatid', align: 'center',title: '物料标签ID', width:200}
            ,{field: 'maktx', align: 'center',title: '物料描述'}
            // ,{field: 'werks', align: 'center',title: '工厂'}
            ,{field: 'altme', align: 'center',title: '单位'}
            ,{field: 'zpallet', align: 'center',title: '托盘条码'}
            // ,{field: 'bname', align: 'center',title: '用户ID'}
            // ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:80} // todo
        ]],
        cols: [getCol()],
        done: function(res, curr, count) {
            limit();
            getOutBound();
@@ -37,7 +31,8 @@
    // 页面修改
    table.on('edit(chooseData)', function (obj) {
        updateLocDetlData(obj.data.locNo, obj.data.matnr, Number(obj.value));
        updateLocDetlData(obj.data.locNo,  obj.data.billNo,obj.data.matNo, obj.data.qty, Number(obj.value));
    });
    // 监听头工具栏事件
@@ -46,7 +41,8 @@
        switch (obj.event) {
            case 'outbound':
                if (data.length === 0){
                    layer.msg('请先添加库位物料');
                    // layer.msg('请先添加库位产品');
                } else {
                    var staNo = $("#staNoSelect").val();
                    if (staNo === "" || staNo === null){
@@ -55,12 +51,14 @@
                    }
                    var locDetls = [];
                    data.forEach(function(elem) {
                        console.log(elem)
                        // locDetls.push({locNo: elem.locNo, matnr: elem.matnr, count: elem.count}); // todo
                        locDetls.push({locNo: elem.locNo, matnr: elem.matnr});
                        locDetls.push({locNo: elem.locNo, matNo: elem.matNo, supplier:elem.supplier});
                    });
                    let param = {
                        outSite: staNo,
                        locDetls: locDetls
                    }
                    $.ajax({
                        url: baseUrl+"/locCheck/out/start",
@@ -125,7 +123,7 @@
    // 获取出库口
    function getOutBound(){
        $.ajax({
            url: baseUrl+"/available/take/site",
            url: baseUrl+"/available/take/check/site",
            headers: {'token': localStorage.getItem('token')},
            method: 'POST',
            async: false,
@@ -146,16 +144,16 @@
    }
})
// 提取物料
// 提取产品
var locDetlLayerIdx;
function getLocDetl() {
    locDetlLayerIdx = layer.open({
        type: 2,
        title: '提取物料',
        title: '提取出货内容',
        maxmin: true,
        area: [top.detailWidth, top.detailHeight],
        shadeClose: true,
        content: 'locDetlQuery.html',
        content: 'locDetlCheckQuery.html',
        success: function(layero, index){
        }
    });