#
luxiaotao1123
2022-04-07 4c21e56efdf3acfcd560055fca0969d4868e200c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
 
function DataShow(type, uuid) {
    this.type = type;
    this.uuid = uuid;
}
 
DataShow.prototype.showHint = function(){
    let htmlText='';
    switch (this.type) {
        case 'locNo':
            htmlText += '<p>库位编号:'+ this.uuid +'</p>';
            $.ajax({
                url: top.baseUrl + '/three/query/loc/detl/v1?locNo=' + this.uuid,
                type: "GET",
                async: false,
                success: function (res) {
                    if (res.code === 200) {
                        let data = res.data;
                        htmlText += '<p>库位状态:'+ data.locSts +'</p>';
                        if (data.locDetls) {
                            for (let locDetl of data.locDetls) {
                                htmlText += '<p>————————————————</p>';
                                htmlText += '<p>商品编号:'+ locDetl.matnr +'</p>';
                                htmlText += '<p>商品名称:'+ locDetl.maktx +'</p>';
                                if (locDetl.batch) {
                                    htmlText += '<p>批号:'+ locDetl.batch +'</p>';
                                }
                                htmlText += '<p>库存数量:'+ locDetl.anfme + "" + (locDetl.unit?locDetl.unit:"") +'</p>';
                            }
                        }
                    } else {
                        console.error(res.msg);
                    }
                }
            })
            break
        case "wrkNo":
            htmlText+='<p>任务编号:'+ this.uuid +'</p>';
            $.ajax({
                url: top.baseUrl + '/three/query/wrk/detl/v1?wrkNo=' + this.uuid,
                type: "GET",
                async: false,
                success: function (res) {
                    if (res.code === 200) {
                        let data = res.data;
                        htmlText += '<p>任务状态:'+ data.wrkSts +'</p>';
                        if (data.sourceLocNo) {
                            htmlText += '<p>源库位:'+ data.sourceLocNo +'</p>';
                        }
                        if (data.destLocNo) {
                            htmlText += '<p>目标库位:'+ data.destLocNo +'</p>';
                        }
                        if (data.wrkDetls) {
                            for (let wrkDetl of data.wrkDetls) {
                                htmlText += '<p>————————————————</p>';
                                htmlText += '<p>商品编号:'+ wrkDetl.matnr +'</p>';
                                htmlText += '<p>商品名称:'+ wrkDetl.maktx +'</p>';
                                if (wrkDetl.batch) {
                                    htmlText += '<p>批号:'+ wrkDetl.batch +'</p>';
                                }
                                htmlText += '<p>任务数量:'+ wrkDetl.anfme + "" + (wrkDetl.unit?wrkDetl.unit:"") +'</p>';
                            }
                        }
                    } else {
                        console.error(res.msg);
                    }
                }
            })
            break
        default:
            break
    }
    return htmlText;
}