zhang
7 小时以前 70930071a49190f414c8d8bc9c9e9795a4096739
zy-acs-flow/src/map/http.js
@@ -151,8 +151,8 @@
export const getLocGroup = async (row, bay, callback) => {
    await request.post('/map/shelf/group', {
        row: row,
        bay: bay
        rowNo: row,
        bayNo: bay
    }, {
        headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
    }).then((res) => {
@@ -201,6 +201,78 @@
    }).catch((error) => {
        notify.error(error.message);
        console.error(error.message);
    })
}
export const getCodeInfo = async (codeData, callback, errCallBack) => {
    await request.post('/code/info', {
        codeData,
    }, {
        headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
    }).then((res) => {
        const { code, msg, data } = res.data;
        if (code === 200) {
            callback(data);
        } else {
            notify?.error(msg);
            if (errCallBack) {
                errCallBack();
            }
        }
    }).catch((error) => {
        notify?.error(error.message);
        console.error(error.message);
        if (errCallBack) {
            errCallBack();
        }
    })
}
export const getCodeRouteList = async (codeData, callback, errCallBack) => {
    await request.post('/code/route/list', {
        codeData,
    }, {
        headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
    }).then((res) => {
        const { code, msg, data } = res.data;
        if (code === 200) {
            callback(Array.isArray(data) ? data : []);
        } else {
            notify?.error(msg);
            if (errCallBack) {
                errCallBack();
            }
        }
    }).catch((error) => {
        notify?.error(error.message);
        console.error(error.message);
        if (errCallBack) {
            errCallBack();
        }
    })
}
export const getCodeFuncStaList = async (codeData, callback, errCallBack) => {
    await request.post('/code/funcSta/list', {
        codeData,
    }, {
        headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
    }).then((res) => {
        const { code, msg, data } = res.data;
        if (code === 200) {
            callback(Array.isArray(data) ? data : []);
        } else {
            notify?.error(msg);
            if (errCallBack) {
                errCallBack();
            }
        }
    }).catch((error) => {
        notify?.error(error.message);
        console.error(error.message);
        if (errCallBack) {
            errCallBack();
        }
    })
}
@@ -511,4 +583,4 @@
        console.error(error.message);
    }
    return null;
}
}