|
|
@@ -4,6 +4,7 @@ import {NoticeListData} from '@models';
|
|
|
import {userStore} from '@stores';
|
|
|
import {useMutation, useQueryClient} from '@tanstack/react-query';
|
|
|
import {message} from 'antd';
|
|
|
+import dayjs from 'dayjs';
|
|
|
import {useEffect, useMemo} from 'react';
|
|
|
import {useForm} from 'react-hook-form';
|
|
|
import {object, string} from 'yup';
|
|
|
@@ -79,12 +80,22 @@ export function useFormState({
|
|
|
});
|
|
|
|
|
|
const userId = useStore(userStore, state => String(state.id));
|
|
|
+ const userName = useStore(userStore, state => state.realName);
|
|
|
|
|
|
const onSubmit = handleSubmit(function({location}) {
|
|
|
if (!data)
|
|
|
return message.error('未获取到报工单信息');
|
|
|
|
|
|
- const {companyNumber, materialId, noticeId, wbs, wllbClass, wllbCode, num}
|
|
|
+ const {
|
|
|
+ companyNumber,
|
|
|
+ materialId,
|
|
|
+ noticeId,
|
|
|
+ wbs,
|
|
|
+ wllbClass,
|
|
|
+ wllbCode,
|
|
|
+ num,
|
|
|
+ entryNumber,
|
|
|
+ }
|
|
|
= data;
|
|
|
|
|
|
mutate({
|
|
|
@@ -97,6 +108,9 @@ export function useFormState({
|
|
|
userId,
|
|
|
warehousingNum: num,
|
|
|
storageLocationCode: location,
|
|
|
+ entryNumber,
|
|
|
+ userName,
|
|
|
+ producBatch: dayjs().format('YYYYMMDD'),
|
|
|
});
|
|
|
});
|
|
|
|