| | |
| | | batch: "batch", |
| | | anfme: "anfme", |
| | | checkQty: "checkQty", |
| | | diffQty: 'Diff Qty', |
| | | exceStatus: "exceStatus", |
| | | reason: "reason", |
| | | }, |
| | |
| | | batch: "批次", |
| | | anfme: "库存数量", |
| | | checkQty: "实盘数量", |
| | | diffQty: '差异数量', |
| | | exceStatus: "执行状态", |
| | | reason: "差异原因", |
| | | }, |
New file |
| | |
| | | import React, { useState, useRef, useEffect, useMemo, useCallback } from "react"; |
| | | import { |
| | | useRecordContext, |
| | | } from 'react-admin'; |
| | | import { Box, Typography, Card, Stack } from '@mui/material'; |
| | | import { useTheme } from '@mui/material/styles'; |
| | | import CircleIcon from '@mui/icons-material/Circle'; |
| | | |
| | | const CheckDiffField = () => { |
| | | const record = useRecordContext(); |
| | | const theme = useTheme(); |
| | | const color = { |
| | | 2: '#52C41A', |
| | | 4: '#FF4D4F', |
| | | |
| | | } |
| | | return ( |
| | | <Typography variant="body2" sx={{ display: 'flex', alignItems: 'center', justifyContent:'center', color: record?.diffQty > 0 ? color[2] : color[4]}} > |
| | | {record.diffQty} |
| | | </Typography > |
| | | ) |
| | | |
| | | } |
| | | |
| | | export default CheckDiffField; |
| | |
| | | <TextField source="splrBatch" label="table.field.outStockItem.splrBatch" /> |
| | | <TextField source="splrCode" label="table.field.outStockItem.splrCode" /> |
| | | <TextField source="splrName" label="table.field.outStockItem.splrName" /> |
| | | <BillStatusField cellClassName="status" source="exceStatus" label="table.field.checkOrder.exceStatus" /> |
| | | <TextField source="packName" label="table.field.outStockItem.packName" /> |
| | | <DateField source="updateTime" label="common.field.updateTime" showTime /> |
| | | <ReferenceField source="updateBy" label="common.field.updateBy" reference="user" link={false} sortable={false}> |
| | | <TextField source="nickname" /> |
| | | </ReferenceField>, |
| | | <ReferenceField source="createBy" label="common.field.createBy" reference="user" link={false} sortable={false}> |
| | | <TextField source="nickname" /> |
| | | </ReferenceField>, |
| | | <TextField source="updateBy$" label="common.field.updateBy" /> |
| | | <TextField source="createBy$" label="common.field.createBy" /> |
| | | <DateField source="createTime" label="common.field.createTime" showTime /> |
| | | <TextField source="memo" label="common.field.memo" sortable={false} /> |
| | | </StyledDatagrid> |
| | |
| | | import EmptyData from "../../../components/EmptyData"; |
| | | import MyCreateButton from "../../../components/MyCreateButton"; |
| | | import MyExportButton from '../../../components/MyExportButton'; |
| | | import BillStatusField from '../../../components/BillStatusField'; |
| | | import PageDrawer from "../../../components/PageDrawer"; |
| | | import MyField from "../../../components/MyField"; |
| | | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting'; |
| | | import * as Common from '@/utils/common'; |
| | | import CheckDiffField from "../../../components/CheckDiffField"; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | |
| | | <TextField source="batch" label="table.field.checkDiffItem.batch" /> |
| | | <NumberField source="anfme" label="table.field.checkDiffItem.anfme" /> |
| | | <NumberField source="checkQty" label="table.field.checkDiffItem.checkQty" /> |
| | | <CheckDiffField source="diffQty" label="table.field.checkDiffItem.diffQty"/> |
| | | <TextField source="reason" label="table.field.checkDiffItem.reason" /> |
| | | <BillStatusField cellClassName="status" source="exceStatus" label="table.field.checkOrder.exceStatus" /> |
| | | <TextField source="updateBy$" label="common.field.updateBy" /> |
| | | <DateField source="updateTime" label="common.field.updateTime" showTime /> |
| | | <TextField source="createBy$" label="common.field.createBy" /> |
| | |
| | | package com.vincent.rsf.server.manager.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | this.memo = memo; |
| | | } |
| | | |
| | | // CheckDiffItem checkDiffItem = new CheckDiffItem( |
| | | // null, // 盘点ID |
| | | // null, // 盘点单 |
| | | // null, // 物料名称 |
| | | // null, // 物料编码 |
| | | // null, // 规格 |
| | | // null, // 型号 |
| | | // null, // 托盘码 |
| | | // null, // 批次 |
| | | // null, // 帐面库存 |
| | | // null, // 盘点库存 |
| | | // null, // 执行状态 |
| | | // null, // 差异原因 |
| | | // null, // 状态[非空] |
| | | // null, // 是否删除[非空] |
| | | // null, // 租户 |
| | | // null, // 添加人员 |
| | | // null, // 添加时间[非空] |
| | | // null, // 修改人员 |
| | | // null, // 修改时间[非空] |
| | | // null // 备注 |
| | | // ); |
| | | |
| | | public String getStatus$(){ |
| | | if (null == this.status){ return null; } |
| | |
| | | return dictData.getLabel(); |
| | | } |
| | | |
| | | public Double getDiffQty() { |
| | | Double diffQty = Math.round((this.checkQty - this.anfme) * 1000) / 1000.0; |
| | | return diffQty; |
| | | } |
| | | |
| | | public String getCreateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |