| | |
| | | locDeadReport: 'Locs Dead Report', |
| | | stockStatistic: 'Stock Statistic', |
| | | statisticCount: 'Statistic Count', |
| | | preparation:"备料单", |
| | | preparation: "备料单", |
| | | }, |
| | | table: { |
| | | field: { |
| | |
| | | selectWave: 'Select Wave Rule', |
| | | |
| | | }, |
| | | placeholder: { |
| | | warehouseAreasCode: "use for warehouse areas code prefix", |
| | | }, |
| | | request: { |
| | | error: { |
| | | stock: "Insufficient inventory to deliver !!", |
| | |
| | | modiftySite: '修改库口', |
| | | selectWave: '波次规则', |
| | | }, |
| | | placeholder: { |
| | | warehouseAreasCode: "用于库位编码前缀占位符", |
| | | }, |
| | | request: { |
| | | error: { |
| | | stock: "库存不足,无法提交!!", |
| | |
| | | // </Button> : ) |
| | | record.exceStatus === 1 ? <ConfirmButton label={"toolbar.complete"} color="secondary" startIcon={<TaskIcon />} onConfirm={requestComplete} /> : <></> |
| | | ) |
| | | |
| | | |
| | | } |
| | | |
| | | const CloseButton = () => { |
| | |
| | | onClick={() => column.id === 'name' && toggleNode(row.id)} |
| | | sx={{ |
| | | opacity: column.id === 'icon' ? 0.6 : (depth > 0 ? opacity : 1), |
| | | color: depth > 0 ? `rgba(0, 0, 0, ${opacity})` : 'inherit', |
| | | fontWeight: 400, |
| | | // 使用字体大小或颜色来区分层级 |
| | | fontSize: depth === 0 ? '0.95rem' : '0.9rem', |
| | |
| | | const [editRecord, setEditRecord] = React.useState(null); |
| | | const [openNodes, setOpenNodes] = React.useState({}); |
| | | const [expandAll, setExpandAll] = React.useState(false); |
| | | const notifyState = React.useRef({ last: '', at: 0 }); |
| | | const pushNotify = React.useCallback((type, msg) => { |
| | | const text = typeof msg === 'string' ? msg : (msg || ''); |
| | | const now = Date.now(); |
| | | if (notifyState.current.last === text && now - notifyState.current.at < 1500) return; |
| | | notifyState.current = { last: text, at: now }; |
| | | notify(text, { type, messageArgs: { _: text } }); |
| | | }, [notify]); |
| | | |
| | | const http = async () => { |
| | | const res = await request.post(RESOURCE + '/tree', { |
| | |
| | | if (res?.data?.code === 200) { |
| | | setTreeData(res.data.data); |
| | | } else { |
| | | notify(res.data.msg); |
| | | const msg = translate('ra.notification.http_error', { _: res?.data?.msg || 'Request failed' }); |
| | | pushNotify('warning', msg); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | onSuccess: () => { |
| | | handleRefresh(); |
| | | notify('Department deleted successfully', { type: 'info', messageArgs: { _: 'Department deleted successfully' } }); |
| | | const msg = translate('ra.message.delete_success', { _: 'Deleted successfully' }); |
| | | pushNotify('success', msg); |
| | | }, |
| | | onError: (error) => { |
| | | notify(`Error: ${error.message}`, { type: 'warning', messageArgs: { _: `Error: ${error.message}` } }); |
| | | const msg = translate('ra.notification.http_error', { _: error?.message || 'Network error' }); |
| | | pushNotify('error', msg); |
| | | }, |
| | | } |
| | | ); |
| | |
| | | const newExpandAll = !prevExpandAll; |
| | | const newOpenNodes = {}; |
| | | const updateOpenNodes = (nodes) => { |
| | | if (!nodes) return; |
| | | nodes.forEach(node => { |
| | | newOpenNodes[node.id] = newExpandAll; |
| | | if (node.children) { |
| | |
| | | ); |
| | | }; |
| | | |
| | | export default MenuList; |
| | | export default MenuList; |
| | |
| | | source="code" |
| | | validate={[required()]} |
| | | parse={(v) => v} |
| | | placeholder={translate("placeholder.warehouseAreasCode")} |
| | | /> |
| | | <AutocompleteInput |
| | | choices={dicts} |
| | | optionText="label" |
| | | label="table.field.asnOrder.type" |
| | | label="table.field.warehouseAreas.type" |
| | | source="type" |
| | | optionValue="value" |
| | | parse={v => v} |
| | |
| | | public R update(@RequestBody Loc loc) { |
| | | loc.setUpdateBy(getLoginUserId()); |
| | | String join = StringUtils.join(loc.getTypeIds(), ","); |
| | | loc.setType(join); |
| | | if (Objects.isNull(loc.getTypeIds())) { |
| | | throw new CoolException("库位类型不能为空!!"); |
| | | if (!Objects.isNull(loc.getTypeIds())) { |
| | | loc.setType(join); |
| | | } |
| | | if (Objects.isNull(loc.getTypeIds()) && !Objects.isNull(loc.getType())) { |
| | | loc.setTypeIds(Arrays.asList(Long.valueOf(loc.getType()))); |
| | | } |
| | | |
| | | if (!locService.updateById(loc)) { |
| | | return R.error("Update Fail"); |
| | | } |
| | |
| | | |
| | | Warehouse warehouse1 = warehouseService.getById(warehouse.getId()); |
| | | if (!warehouse.getName().equals(warehouse1.getName())) { |
| | | List<Warehouse> areasList = warehouseService.list(new LambdaQueryWrapper<Warehouse>().eq(Warehouse::getName, warehouse1.getName())); |
| | | List<Warehouse> areasList = warehouseService.list(new LambdaQueryWrapper<Warehouse>().eq(Warehouse::getName, warehouse.getName())); |
| | | if (!areasList.isEmpty()) { |
| | | throw new CoolException("仓库名已存在!!"); |
| | | } |
| | | } |
| | | if (!warehouse.getCode().equals(warehouse1.getCode())) { |
| | | List<Warehouse> areasList = warehouseService.list(new LambdaQueryWrapper<Warehouse>().eq(Warehouse::getCode, warehouse1.getCode())); |
| | | List<Warehouse> areasList = warehouseService.list(new LambdaQueryWrapper<Warehouse>().eq(Warehouse::getCode, warehouse.getCode())); |
| | | if (!areasList.isEmpty()) { |
| | | throw new CoolException("仓库编码已存在!!"); |
| | | } |
| | | } |
| | | |
| | | |
| | | if (!warehouseService.updateById(warehouse)) { |
| | | return R.error("Update Fail"); |
| | |
| | | Integer chanl = 0; //默认第一巷道 |
| | | for (int r = param.getStartRow(); r <= param.getEndRow(); r++) { |
| | | try{ |
| | | Shelves shelves = new Shelves(param.getEndRow() - param.getStartRow() + 1, param.getChannel(),param.getStartRow()); |
| | | Shelves shelves = new Shelves(param.getEndRow() - param.getStartRow() + 1, param.getChannel(), param.getStartRow()); |
| | | for (List<Integer> node : shelves.nodes){ |
| | | if (node.contains(r)) { |
| | | if (!Cools.isEmpty(param.getStartChannel()) && param.getStartChannel() > 0){ |