| | |
| | | ntyStatus: "上报状态", |
| | | exceStatus: '单据状态' |
| | | }, |
| | | checkOrderItem: { |
| | | orderId: "ID", |
| | | orderCode: "Out Code", |
| | | matnrId: "matnrId", |
| | | maktx: "maktx", |
| | | workQty: 'Work Qty', |
| | | anfme: "Anfme", |
| | | platOrderCode: 'Customer Code', |
| | | stockUnit: "stockUnit", |
| | | purQty: "purQty", |
| | | purUnit: "purUnit", |
| | | qty: "qty", |
| | | splrCode: "splrCode", |
| | | splrName: "splrName", |
| | | qrcode: "qrcode", |
| | | barcode: "barcode", |
| | | packName: "packName", |
| | | ntyStatus: "ntyStatus", |
| | | platItemId: 'platItemId' |
| | | }, |
| | | outStockItem: { |
| | | asnId: "ID", |
| | | asnCode: "Out Code", |
| | |
| | | ntyStatus: "上报状态", |
| | | exceStatus: '执行状态' |
| | | }, |
| | | checkOrderItem: { |
| | | orderId: "主单标识", |
| | | orderCode: "单号", |
| | | matnrId: "物料标识", |
| | | platOrderCode: '客户单号', |
| | | platWorkCode: '工单号', |
| | | projectCode: '项目号', |
| | | maktx: "物料名称", |
| | | spec: "规格", |
| | | model: "型号", |
| | | matnrCode: "物料编码", |
| | | anfme: "计划盘点数", |
| | | stockUnit: "单位", |
| | | unit: '单位', |
| | | workQty: '已盘点数', |
| | | qty: "已盘点数", |
| | | splrBatch: "批次", |
| | | splrCode: "供应商编码", |
| | | splrName: "供应商", |
| | | qrcode: "二维码", |
| | | barcode: "序列码", |
| | | }, |
| | | asnOrderItem: { |
| | | orderId: "主单标识", |
| | | orderCode: "单号", |
| | |
| | | groupQty: '品类数', |
| | | qty: "完成数量", |
| | | orderNum: "单据数", |
| | | progress:"进度" |
| | | progress: "进度" |
| | | }, |
| | | waveItem: { |
| | | waveId: "波次ID", |
| | |
| | | setRows(fetchRows) |
| | | } else { |
| | | const mas = fetchRows.filter(item => selectedMatnr.includes(item.matnrCode)); |
| | | console.log(mas); |
| | | let ids = mas.map(item => item.matnrCode); |
| | | console.log(ids); |
| | | const { data: { code, data, msg } } = request.get('/check/order/items/' + ids ); |
| | | if (code === 200) { |
| | | setFetchRows(data) |
| | | } else { |
| | | notify(msg); |
| | | } |
| | | // setRows(mas) |
| | | let ids = mas.map(item => item.matnrCode); |
| | | getLocs(ids) |
| | | } |
| | | }, [selectedMatnr]) |
| | | |
| | | |
| | | const getLocs = async (ids) => { |
| | | const { data: { code, data, msg } } = await request.post('/check/locs/' + ids); |
| | | if (code === 200) { |
| | | setRows(data) |
| | | } else { |
| | | notify(msg); |
| | | } |
| | | } |
| | | |
| | | const ComfirmButton = () => { |
| | | const { selectedIds, data } = useListContext(); |
| | | const { selectedIds, data, onUnselectItems } = useListContext(); |
| | | const handleRowClick = () => { |
| | | const ids = data.filter(item => selectedIds.includes(item.id)).map(item => item.id); |
| | | setRowSelectedIds(ids); |
| | | const mas = data.filter(item => selectedIds.includes(item.id)).map(item => item.matnrCode); |
| | | //设置库位信息筛选条件 |
| | | setSelectedMatnr(mas); |
| | | onUnselectItems() |
| | | } |
| | | |
| | | return ( |
| | |
| | | omit={['id', 'splrName', 'qty',]} |
| | | > |
| | | <NumberField source="id" /> |
| | | <TextField source="orderCode" label="table.field.outStockItem.orderCode" /> |
| | | <TextField source="matnrCode" label="table.field.outStockItem.matnrCode" /> |
| | | <TextField source="maktx" label="table.field.outStockItem.maktx" /> |
| | | <NumberField source="anfme" label="table.field.outStockItem.anfme" /> |
| | | <NumberField source="workQty" label="table.field.outStockItem.workQty" /> |
| | | <NumberField source="qty" label="table.field.outStockItem.qty" /> |
| | | <TextField source="stockUnit" label="table.field.outStockItem.stockUnit" /> |
| | | <TextField source="splrName" label="table.field.outStockItem.splrName" /> |
| | | <TextField source="orderCode" label="table.field.checkOrderItem.orderCode" /> |
| | | <TextField source="matnrCode" label="table.field.checkOrderItem.matnrCode" /> |
| | | <TextField source="maktx" label="table.field.checkOrderItem.maktx" /> |
| | | <NumberField source="anfme" label="table.field.checkOrderItem.anfme" /> |
| | | <NumberField source="workQty" label="table.field.checkOrderItem.workQty" /> |
| | | <NumberField source="qty" label="table.field.checkOrderItem.qty" /> |
| | | <TextField source="stockUnit" label="table.field.checkOrderItem.stockUnit" /> |
| | | <TextField source="splrName" label="table.field.checkOrderItem.splrName" /> |
| | | </StyledDatagrid> |
| | | </List> |
| | | </Card> |
| | |
| | | }, [selectedIds]) |
| | | |
| | | const baseColumns = [ |
| | | // { field: 'id', headerName: 'ID', width: 40 }, |
| | | { field: 'locCode', headerName: '库位', width: 110 }, |
| | | { field: 'barcode', headerName: '容器', width: 120 }, |
| | | { field: 'matnrCode', headerName: '物料编码', width: 120 }, |
| | | { field: 'batch', headerName: '批次', width: 90 }, |
| | | { field: 'unit', headerName: '单位', width: 60 }, |
| | | { field: 'outQty', headerName: '出库数量', width: 110, }, |
| | | { |
| | | field: 'anfme', headerName: '库存数量', width: 110, |
| | | renderCell: (params) => ( |
| | |
| | | |
| | | |
| | | @ApiOperation("获取在库物料列表") |
| | | @GetMapping("/check/order/locs/{matnr}") |
| | | @PostMapping("/check/locs/{matnrs}") |
| | | @PreAuthorize("hasAuthority('manager:check:list')") |
| | | public R getAllLocByMatnr(@PathVariable String[] matnrs) { |
| | | if (Objects.isNull(matnrs)) { |
| | |
| | | @TableField(exist = false) |
| | | private String sourceCode; |
| | | |
| | | @ApiModelProperty("出站口") |
| | | @TableField(exist = false) |
| | | private String siteNo; |
| | | |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public R getAllLocByMatnr(List<String> matnrs) { |
| | | List<LocItem> locItems = locItemService.listByMatnr(matnrs); |
| | | if (locItems.isEmpty()) { |
| | | return R.ok(); |
| | | if (!locItems.isEmpty()) { |
| | | List<Integer> list = Arrays.asList(TaskType.TASK_TYPE_CHECK_OUT.type, TaskType.TASK_TYPE_CHECK_IN.type); |
| | | DeviceSite deviceSite = deviceSiteService.getOne(new LambdaQueryWrapper<DeviceSite>() |
| | | .in(DeviceSite::getType, list) |
| | | .groupBy(DeviceSite::getSite) |
| | | .last("limit 1")); |
| | | if (Objects.isNull(deviceSite)) { |
| | | throw new CoolException("库口不为空!!"); |
| | | } |
| | | locItems.forEach(locItem -> { |
| | | locItem.setSiteNo(deviceSite.getSite()); |
| | | }); |
| | | } |
| | | |
| | | |
| | | return null; |
| | | return R.ok().add(locItems); |
| | | } |
| | | |
| | | /** |
| | |
| | | li.matnr_code, |
| | | li.maktx, |
| | | li.batch, |
| | | li.unit, |
| | | SUM( li.anfme ) anfme, |
| | | li.fields_index |
| | | FROM |