#
whycq
2023-10-07 e3a9edfa7a5fe7be708eaf84ea534bbde700d1e0
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
async function addMat() {
    let that = this,item = {};
    var ress = await uni.request({
        url: 'http://192.168.4.188:8089/bfwms/mat/auth',
        data: {matnr: '3CPPJ.B.GMB.LZ.QBY4-10/15P316LLZ'},
    }).then((result)=> {
        let mat = result.data.data
        item['detl'] = [
            {key: '商品码',value: mat.matnr},
            {key: '商品名称',value: mat.maktx},
            {key: '规格',value: mat.specs},
            {key: '批号',value: '',type: 'input'},
            {key: '数量',value: 0,type: 'number-box'},
        ]
    },(res)=>{
        console.log(res);
    })
    return item
}
 
function isEmpty(obj) {
    if (JSON.stringify(obj) === '{}') {
        return true
    }
    return  obj == "undefined" || obj == null || obj === "" || obj == {};
}
 
module.exports = {
    addMat: addMat,
    isEmpty: isEmpty
}