| | |
| | | main: 'Main', |
| | | common: 'Common', |
| | | changePwd: 'Change Password', |
| | | insuffInventory: 'Insufficient inventory' |
| | | }, |
| | | side: { |
| | | title: 'More Info' |
| | |
| | | main: '主要', |
| | | common: '通用', |
| | | changePwd: '重置密码', |
| | | insuffInventory: '库存不足' |
| | | }, |
| | | side: { |
| | | title: '更多' |
| | |
| | | const SelectMatnrs = () => { |
| | | const { selectedIds, data, isPending, onUnselectItems } = useListContext(); |
| | | const clickMatnrs = () => { |
| | | console.log(selectedIds); |
| | | onUnselectItems() |
| | | } |
| | | |
| | |
| | | ]); |
| | | |
| | | const handleInput = (value) => { |
| | | console.log(value); |
| | | setSearchVal(value); |
| | | }; |
| | | |
| | |
| | | }; |
| | | |
| | | useEffect(() => { |
| | | console.log(selAll); |
| | | |
| | | const setAllChecked = (nodes, checked) => { |
| | | nodes.forEach((node) => { |
| | | node.checked = !checked; |
| | |
| | | const ImportButton = (props) => { |
| | | const [modalOpen, setModalOpen] = useState(false); |
| | | const { selectedIds } = useListContext(); |
| | | console.log(selectedIds) |
| | | const handleOpenModal = () => { |
| | | setModalOpen(true); |
| | | }; |
| | |
| | | ...prevData, |
| | | [name]: value |
| | | })); |
| | | console.log(formData); |
| | | }; |
| | | |
| | | const resetData = () => { |
| | |
| | | } = await request.post("companys/page", parmas); |
| | | if (code === 200) { |
| | | setFormData(data.records) |
| | | console.log(data.records) |
| | | } else { |
| | | notify(msg); |
| | | } |
| | |
| | | } = await request.post("companys/page", parmas); |
| | | if (code === 200) { |
| | | setFormData(data.records) |
| | | console.log(data.records) |
| | | } else { |
| | | notify(msg); |
| | | } |
| | |
| | | }; |
| | | |
| | | |
| | | const handleSelectionChange = (ids) => { |
| | | console.log(ids); |
| | | |
| | | const handleSelectionChange = (ids) => { |
| | | setSelectedRows(ids) |
| | | |
| | | }; |
| | |
| | | import ConfirmButton from '../../components/ConfirmButton'; |
| | | import { Delete, Edit, Add } from '@mui/icons-material'; |
| | | import OutStockSiteDialog from "./OutStockSiteDialog"; |
| | | import { color } from "framer-motion"; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | |
| | | |
| | | const PreviewTable = ({ rows, gridRef, setRows, record, selectedIds, setSelectedIds, setDialog }) => { |
| | | gridRef.current = useGridApiRef(); |
| | | const translate = useTranslate(); |
| | | |
| | | const columns = [ |
| | | // { field: 'id', headerName: 'ID', width: 40 }, |
| | |
| | | { field: 'matnrCode', headerName: '物料编码', width: 120 }, |
| | | { field: 'batch', headerName: '批次', width: 90 }, |
| | | { field: 'unit', headerName: '单位', width: 60 }, |
| | | { field: 'outQty', headerName: '出库数量', width: 110 ,valueFormatter: (val) => val <= 0 ? '库存不足' : val,}, |
| | | { field: 'outQty', headerName: '出库数量', width: 110, }, |
| | | { |
| | | field: 'anfme', headerName: '库存数量', width: 110, |
| | | renderCell: (params) => ( |
| | | <OutStockAnfme value={params.value} /> |
| | | ) |
| | | }, |
| | | { |
| | | field: 'siteNo', |
| | | headerName: '出库口', |
| | |
| | | }) |
| | | setRows(outRows) |
| | | } |
| | | |
| | | const OutStockAnfme = React.memo(function OutStockAnfme(props) { |
| | | const { value } = props; |
| | | return ( |
| | | value > 0 ? |
| | | <Box |
| | | sx={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }} |
| | | > |
| | | <span>{value}</span> |
| | | </Box> : |
| | | <Box |
| | | sx={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }} |
| | | > |
| | | <span style={{color: 'red'}}>{translate('common.edit.title.insuffInventory')}</span> |
| | | </Box> |
| | | ); |
| | | }); |
| | | |
| | | const OutStockSiteNo = React.memo(function OutStockSiteNo(props) { |
| | | const { value } = props; |
| | |
| | | const refresh = useRefresh(); |
| | | const redirect = useRedirect(); |
| | | const submit = async () => { |
| | | console.log(record); |
| | | const items = gridRef.current?.getSortedRows(); |
| | | const { data: { code, data, msg } } = await request.post('/outStock/generate/tasks', { items, outId: record?.id }); |
| | | if (code == 200) { |
| | |
| | | ...prevData, |
| | | [name]: value |
| | | })); |
| | | console.log(formData); |
| | | }; |
| | | |
| | | const resetData = () => { |
| | |
| | | } = await request.post("companys/page", parmas); |
| | | if (code === 200) { |
| | | setFormData(data.records) |
| | | console.log(data.records) |
| | | } else { |
| | | notify(msg); |
| | | } |
| | |
| | | } = await request.post("companys/page", parmas); |
| | | if (code === 200) { |
| | | setFormData(data.records) |
| | | console.log(data.records) |
| | | } else { |
| | | notify(msg); |
| | | } |
| | |
| | | const { open, setOpen } = props; |
| | | const dicts = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_in_stock_type')) || []; |
| | | const business = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_business_type'))?.filter(data => (data.group == '1')) || []; |
| | | console.log(business); |
| | | |
| | | const translate = useTranslate(); |
| | | const notify = useNotify(); |
| | | |
| | |
| | | const DetailButton = (setEditDialog) => { |
| | | const record = useRecordContext(); |
| | | const editClick = (event) => { |
| | | console.log('--========--->'); |
| | | event.stopPropagation() |
| | | setEditDialog(true) |
| | | } |
| | |
| | | }; |
| | | //取消任务 |
| | | const cancleTask = async (row) => { |
| | | console.log(row); |
| | | const { data: { code, data, msg } } = await request.post(`/task/remove/` + row.id); |
| | | if (code === 200) { |
| | | notify(msg); |
| | |
| | | setOpen(false); |
| | | } |
| | | }; |
| | | console.log(source); |
| | | return ( |
| | | <Box> |
| | | <Dialog |
| | |
| | | label={translate("table.field.outBound.checkSta")} |
| | | onChange={(e) => { |
| | | setSta(e.target.value); |
| | | console.log("站点已选择:", e.target.value); |
| | | }} |
| | | size="small" |
| | | type="[107]" |
| | |
| | | label={translate("table.field.outBound.outSta")} |
| | | onChange={(e) => { |
| | | setSta(e.target.value); |
| | | console.log("站点已选择:", e.target.value); |
| | | }} |
| | | size="small" |
| | | type="[101,103]" |
| | |
| | | http(sta, data); |
| | | } |
| | | const http = async (sta, items) => { |
| | | console.log(items); |
| | | // const filZores = items.filter(item => item.outQty <= 0.0); |
| | | // const filter = items.filter(item => (item.outQty + item.workQty) > item.anfme); |
| | | // if (filter.length > 0 || filZores.length > 0) { |
| | |
| | | } |
| | | |
| | | }) |
| | | console.log(newData); |
| | | setTarLocList(newData); |
| | | } |
| | | |
| | |
| | | const refresh = useRefresh(); |
| | | const { orgLoc, tarLoc, tabelData } = props; |
| | | const move = () => { |
| | | console.log(orgLoc, tarLoc); |
| | | if (orgLoc === "" || orgLoc === undefined || orgLoc === null) { |
| | | notify("请输入源库位"); |
| | | return; |
| | |
| | | .setMatnrCode(asnOrderItem.getMatnrCode()) |
| | | .setMaktx(asnOrderItem.getMaktx()) |
| | | .setAnfme(0.00) |
| | | .setOutQty(0.00) |
| | | .setWorkQty(0.00) |
| | | .setWorkQty(issued.doubleValue()) |
| | | .setOutQty(issued.doubleValue()) |
| | | .setUnit(asnOrderItem.getStockUnit()) |
| | | .setBatch(asnOrderItem.getSplrBatch()); |
| | | OrderOutItemDto orderOutItemDto = new OrderOutItemDto(); |