|
|
@@ -38,9 +38,8 @@ function useData(id: string) {
|
|
|
exact: false,
|
|
|
},
|
|
|
);
|
|
|
- if (!data) {
|
|
|
+ if (!data)
|
|
|
return void 0;
|
|
|
- }
|
|
|
|
|
|
return data.find(val => val.id === id);
|
|
|
},
|
|
|
@@ -91,11 +90,17 @@ export function useFormState({
|
|
|
const userId = useStore(userStore, state => String(state.id));
|
|
|
|
|
|
const onSubmit = handleSubmit(function({location, outNum}) {
|
|
|
- if (!data) {
|
|
|
+ if (!data)
|
|
|
return message.error('未获取到领料单信息');
|
|
|
- }
|
|
|
|
|
|
- const {companyNumber, wbs, materialId, askGoodsId, materialCode} = data;
|
|
|
+ const {
|
|
|
+ companyNumber,
|
|
|
+ wbs,
|
|
|
+ materialId,
|
|
|
+ askGoodsId,
|
|
|
+ materialCode,
|
|
|
+ entryNumber,
|
|
|
+ } = data;
|
|
|
|
|
|
mutate({
|
|
|
companyNumber,
|
|
|
@@ -106,6 +111,7 @@ export function useFormState({
|
|
|
wllbCode: materialCode,
|
|
|
storageLocationCode: location,
|
|
|
userId,
|
|
|
+ entryNumber,
|
|
|
});
|
|
|
});
|
|
|
|