skyouc
2 天以前 6883e31331af4633d1b7d74ea7deb5f972afa05d
rsf-admin/src/page/work/stockTransfer/stockTransferList.jsx
@@ -186,7 +186,7 @@
    const redirect = useRedirect();
    const refresh = useRefresh();
    const { orgLoc, tarLoc } = props;
    const check = () => {
    const move = () => {
        console.log(orgLoc, tarLoc);
        if (orgLoc === "" || orgLoc === undefined || orgLoc === null) {
            notify("请选择站点");
@@ -196,21 +196,13 @@
            notify("请选择站点");
            return;
        }        
        http(orgLoc, tarLoc?.id)
    }
    const http = async (sta, items) => {
        console.log(items);
        const filter = items.filter(item => (item.outQty + item.workQty) > item.anfme);
        if (filter.length > 0) {
            notify(translate('toolbar.request.error.out_stock_qty'))
            return
        }
        const { data: { code, data, msg } } = await request.post(`/locItem/generate/task`, { siteNo: sta, items: items });
    const http = async (orgLoc, tarLoc) => {
        const { data: { code, data, msg } } = await request.post(`/locItem/move/task`, { orgLoc, tarLoc });
        if (code === 200) {
            notify(msg);
            refresh()
            setTableData([])
            redirect("/task")
        } else {
            notify(msg);
@@ -220,7 +212,7 @@
        <ConfirmButton
            variant="contained"
            color="primary"
            onConfirm={check}
            onConfirm={move}
            label={"table.field.outBound.createTask"}
        >
        </ConfirmButton>