Merge branch 'devlop' of http://47.97.1.152:5880/r/wms-master into devlop
 
	
	
	
	
	
	
	
	
	
	
	
	
	
 |  |  | 
 |  |  |  | 
 |  |  | export const REFERENCE_INPUT_PAGESIZE = 1000; | 
 |  |  |  | 
 |  |  | export const OPERATE_MODE = 'undoable'; // pessimistic | optimistic(tip) | undoable | 
 |  |  | export const OPERATE_MODE = 'pessimistic'; // pessimistic | optimistic(tip) | undoable | 
 |  |  |  | 
 |  |  | export const EDIT_MODE = 'pessimistic'; // pessimistic | undoable | 
 |  |  |  | 
 
 |  |  | 
 |  |  |         sort={{ field: "create_time", order: "desc" }} | 
 |  |  |         actions={( | 
 |  |  |           <TopToolbar> | 
 |  |  |  | 
 |  |  |             <FilterButton /> | 
 |  |  |             <MyCreateButton onClick={() => { setCreateDialog(true); setmodalType(0) }} /> | 
 |  |  |             <SelectColumnsButton preferenceKey='asnOrder' /> | 
 |  |  |  | 
 |  |  |             <MyExportButton /> | 
 |  |  |           </TopToolbar> | 
 |  |  |         )} | 
 |  |  | 
 |  |  |           <TextField source="logisNo" label="table.field.asnOrder.logisNo" /> | 
 |  |  |           <DateField source="arrTime" label="table.field.asnOrder.arrTime" showTime /> | 
 |  |  |           <TextField source="rleStatus$" label="table.field.asnOrder.rleStatus" sortable={false} /> | 
 |  |  |  | 
 |  |  |           <ReferenceField source="updateBy" label="common.field.updateBy" reference="user" link={false} sortable={false}> | 
 |  |  |             <TextField source="nickname" /> | 
 |  |  |           </ReferenceField> | 
 |  |  |           <TextField source="updateBy$" label="common.field.updateBy"  /> | 
 |  |  |           <DateField source="updateTime" label="common.field.updateTime" showTime /> | 
 |  |  |           <ReferenceField source="createBy" label="common.field.createBy" reference="user" link={false} sortable={false}> | 
 |  |  |             <TextField source="nickname" /> | 
 |  |  |           </ReferenceField> | 
 |  |  |           <TextField source="createBy$" label="common.field.createBy" /> | 
 |  |  |           <DateField source="createTime" label="common.field.createTime" showTime /> | 
 |  |  |           <BillStatusField cellClassName="status" source="exceStatus" label="table.field.asnOrder.exceStatus" /> | 
 |  |  |           <TextField source="memo" label="common.field.memo" sortable={false} /> | 
 
 |  |  | 
 |  |  |                                         dictTypeCode="sys_order_type" | 
 |  |  |                                         required | 
 |  |  |                                     /> | 
 |  |  |  | 
 |  |  |  | 
 |  |  |                                 </Grid> | 
 |  |  |  | 
 |  |  |                                 <Grid item md={3}> | 
 |  |  |                                     <DictSelect | 
 |  |  |                                         label={translate("table.field.asnOrder.wkType")} | 
 |  |  | 
 |  |  |                                         required | 
 |  |  |                                     /> | 
 |  |  |                                 </Grid> | 
 |  |  |  | 
 |  |  |                                 <Grid item md={3}> | 
 |  |  |                                     <TextField | 
 |  |  |                                         label={translate("table.field.asnOrder.poCode")} | 
 |  |  | 
 |  |  |                                         onChange={(e) => handleChange(e.target.value, 'poCode')} | 
 |  |  |                                     /> | 
 |  |  |                                 </Grid> | 
 |  |  |  | 
 |  |  |                                 <Grid item md={3}> | 
 |  |  |                                     <TextField | 
 |  |  |                                         label={translate("table.field.asnOrder.logisNo")} | 
 
 |  |  | 
 |  |  | } from 'react-admin'; | 
 |  |  | import { useWatch, useFormContext } from "react-hook-form"; | 
 |  |  | import { Stack, Grid, Box, Typography, Card } from '@mui/material'; | 
 |  |  | import * as Common from '@/utils/common'; | 
 |  |  | import { EDIT_MODE, REFERENCE_INPUT_PAGESIZE } from '@/config/setting'; | 
 |  |  | import EditBaseAside from "../components/EditBaseAside"; | 
 |  |  | import CustomerTopToolBar from "../components/EditTopToolBar"; | 
 |  |  | import MemoInput from "../components/MemoInput"; | 
 |  |  | import StatusSelectInput from "../components/StatusSelectInput"; | 
 |  |  | // import AsnOrderItemLogList from "./AsnOrderItemLogList" | 
 |  |  | import AsnOrderItemLogList from "./AsnOrderItemLogList" | 
 |  |  | const FormToolbar = () => { | 
 |  |  |     const { getValues } = useFormContext(); | 
 |  |  |  | 
 |  |  |     return ( | 
 |  |  |         <Toolbar sx={{ justifyContent: 'end' }}> | 
 |  |  |             <SaveButton /> | 
 |  |  | 
 |  |  |                     {translate('common.edit.title.common')} | 
 |  |  |                 </Typography> | 
 |  |  |             </Grid> | 
 |  |  |             {/* <AsnOrderItemLogList /> */} | 
 |  |  |             <AsnOrderItemLogList /> | 
 |  |  |         </> | 
 |  |  |     ) | 
 |  |  | } | 
 
 |  |  | 
 |  |  |         const parmas = { | 
 |  |  |             locId: selectedIds, | 
 |  |  |             areaMatId: formData.areaMatId, | 
 |  |  |             groupId: formData.groupId, | 
 |  |  |             matnrId: formData.matnrId, | 
 |  |  |         } | 
 |  |  |  | 
 |  |  | 
 |  |  |                                 <ReferenceArrayInput source="matnrId" reference="matnr" filter={{ groupId: formData.groupId }}> | 
 |  |  |                                     <SelectArrayInput | 
 |  |  |                                         label="table.field.locAreaMatRela.matnrId" | 
 |  |  |                                         validate={required()} | 
 |  |  |                                         // validate={required()} | 
 |  |  |                                         value={formData.matnrId} | 
 |  |  |                                         onChange={(e) => handleChange(e.target.value, 'matnrId')} | 
 |  |  |                                     /> | 
 
 |  |  | 
 |  |  | import React, { useState, useRef, useEffect, useMemo, useCallback } from "react"; | 
 |  |  | import { useNavigate, useLocation } from 'react-router-dom'; | 
 |  |  | import { | 
 |  |  |   List, | 
 |  |  |   DatagridConfigurable, | 
 |  |  | 
 |  |  |   SelectColumnsButton, | 
 |  |  |   EditButton, | 
 |  |  |   FilterButton, | 
 |  |  |   CreateButton, | 
 |  |  |   ExportButton, | 
 |  |  |   BulkDeleteButton, | 
 |  |  |   WrapperField, | 
 |  |  |   useRecordContext, | 
 |  |  |   useTranslate, | 
 |  |  |   useNotify, | 
 |  |  |   useListContext, | 
 |  |  |   FunctionField, | 
 |  |  |   TextField, | 
 |  |  |   NumberField, | 
 |  |  |   DateField, | 
 |  |  |   BooleanField, | 
 |  |  |   ReferenceField, | 
 |  |  |   TextInput, | 
 |  |  |   DateTimeInput, | 
 |  |  |   DateInput, | 
 |  |  |   SelectInput, | 
 |  |  |   NumberInput, | 
 |  |  |   ReferenceInput, | 
 |  |  |   ReferenceArrayInput, | 
 |  |  |   AutocompleteInput, | 
 |  |  |   DeleteButton, | 
 |  |  |   useGetRecordId, | 
 |  |  | } from 'react-admin'; | 
 |  |  | 
 |  |  |  | 
 |  |  | const filters = [ | 
 |  |  |   <SearchInput source="condition" alwaysOn />, | 
 |  |  |  | 
 |  |  |   <NumberInput source="purchaseId" label="table.field.purchaseItem.purchaseId" />, | 
 |  |  |   <TextInput source="platItemId" label="table.field.purchaseItem.platItemId" />, | 
 |  |  |   <TextInput source="matnrCode" label="table.field.purchaseItem.matnrCode" />, | 
 |  |  | 
 |  |  |   <TextInput source="splrName" label="table.field.purchaseItem.splrName" />, | 
 |  |  |   <TextInput source="splrCode" label="table.field.purchaseItem.splrCode" />, | 
 |  |  |   <TextInput source="splrBatch" label="table.field.purchaseItem.splrBatch" />, | 
 |  |  |  | 
 |  |  |   <TextInput label="common.field.memo" source="memo" />, | 
 |  |  |   <SelectInput | 
 |  |  |     label="common.field.status" | 
 
 |  |  | 
 |  |  |     useRedirect, | 
 |  |  |     useEditContext, | 
 |  |  |     EditBase, | 
 |  |  |     useGetOne, | 
 |  |  | } from 'react-admin'; | 
 |  |  | import { useWatch, useFormContext } from "react-hook-form"; | 
 |  |  | import { Stack, Grid, Box, Typography, Dialog, DialogActions, DialogContent, DialogTitle } from '@mui/material'; | 
 |  |  | 
 |  |  |             setOpen(false); | 
 |  |  |         } | 
 |  |  |     }; | 
 |  |  |     const {data, isPending, } = useGetOne('dictData', {id: record?.id}); | 
 |  |  |     if (data == null || data == undefined) {return} | 
 |  |  |     return ( | 
 |  |  |         <> | 
 |  |  |             <Edit | 
 
 |  |  | 
 |  |  |                         marginRight: drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, | 
 |  |  |                     }} | 
 |  |  |                     title={"menu.dictData"} | 
 |  |  |                     empty={<EmptyData onClick={() => { setCreateDialog(true) }} />} | 
 |  |  |                     empty={false} | 
 |  |  |                     filters={filters} | 
 |  |  |                     filter={{ dictTypeId: dictId }} | 
 |  |  |                     sort={{ field: "create_time", order: "desc" }} | 
 |  |  | 
 |  |  |                         <BooleanField source="statusBool" label="common.field.status" sortable={false} /> | 
 |  |  |                         <TextField source="memo" label="common.field.memo" sortable={false} /> | 
 |  |  |                         <WrapperField cellClassName="opt" label="common.field.opt"> | 
 |  |  |                             {/* <EditButton sx={{ padding: '1px', fontSize: '.75rem' }}  type="button" redirect={"/dictType/" + dictId} onClick={()=> {                                | 
 |  |  |                                setEditDialog(true) | 
 |  |  |                             }} /> */} | 
 |  |  |                             <Button onClick={()=>{setEditDialog(true)}}>编辑</Button> | 
 |  |  |                             <DeleteButton sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode='pessimistic' redirect={"/dictType/" + dictId} /> | 
 |  |  |                         </WrapperField> | 
 |  |  |                     </StyledDatagrid> | 
 |  |  |                 </List> | 
 |  |  |                 if (!select == null) { | 
 |  |  |                 <DictDataEdit | 
 |  |  |                     open={editDialog} | 
 |  |  |                     record={select} | 
 |  |  |                     setOpen={setEditDialog} | 
 |  |  |                 /> | 
 |  |  |                 } | 
 |  |  |                 <DictDataCreate | 
 |  |  |                     open={createDialog} | 
 |  |  |                     record={dicts} | 
 
 |  |  | 
 |  |  |     const { getValues } = useFormContext(); | 
 |  |  |  | 
 |  |  |     return ( | 
 |  |  |         <Toolbar sx={{ justifyContent: 'space-between' }}> | 
 |  |  |         <Toolbar sx={{ justifyContent: 'end' }}> | 
 |  |  |             <SaveButton /> | 
 |  |  |             <DeleteButton mutationMode="optimistic" /> | 
 |  |  |         </Toolbar> | 
 |  |  | 
 |  |  |             setOpen(false); | 
 |  |  |         } | 
 |  |  |     }; | 
 |  |  |     const {data, isPending, } = useGetOne('serialRuleItem', {id: record?.id}); | 
 |  |  |     if (data == null || data == undefined) {return} | 
 |  |  |  | 
 |  |  |     return ( | 
 |  |  |         <Edit | 
 |  |  |             id={record.id} | 
 
 |  |  | 
 |  |  |                             FieldsItem item = new FieldsItem(); | 
 |  |  |                             item.setUuid(index) | 
 |  |  |                                     .setFieldsId(field.getId()) | 
 |  |  |                                     .setMatnrId(Long.parseLong(params.get("matnrId").toString())) | 
 |  |  |                                     .setMatnrId(!Objects.isNull(params.get("matnrId")) ? Long.parseLong(params.get("matnrId").toString()) : null) | 
 |  |  |                                     .setValue(params.get(field.getFields()).toString()); | 
 |  |  |                             if (!fieldsItemService.save(item)) { | 
 |  |  |                                 throw new CoolException("扩展字段修改失败!!"); |