|
@@ -1,6 +1,6 @@
|
|
|
import React, { useState } from 'react';
|
|
import React, { useState } from 'react';
|
|
|
import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';
|
|
import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';
|
|
|
-import { format } from 'date-fns';
|
|
|
|
|
|
|
+import { format } from 'date-fns';
|
|
|
import { zhCN } from 'date-fns/locale';
|
|
import { zhCN } from 'date-fns/locale';
|
|
|
import { toast } from 'sonner';
|
|
import { toast } from 'sonner';
|
|
|
import { zodResolver } from '@hookform/resolvers/zod';
|
|
import { zodResolver } from '@hookform/resolvers/zod';
|
|
@@ -488,6 +488,20 @@ export const GoodsManagement: React.FC = () => {
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
+ <FormField
|
|
|
|
|
+ control={createForm.control}
|
|
|
|
|
+ name="sort"
|
|
|
|
|
+ render={({ field }) => (
|
|
|
|
|
+ <FormItem>
|
|
|
|
|
+ <FormLabel>排序</FormLabel>
|
|
|
|
|
+ <FormControl>
|
|
|
|
|
+ <Input type="number" {...field} />
|
|
|
|
|
+ </FormControl>
|
|
|
|
|
+ <FormMessage />
|
|
|
|
|
+ </FormItem>
|
|
|
|
|
+ )}
|
|
|
|
|
+ />
|
|
|
|
|
+
|
|
|
<FormField
|
|
<FormField
|
|
|
control={createForm.control}
|
|
control={createForm.control}
|
|
|
name="imageFileId"
|
|
name="imageFileId"
|
|
@@ -695,6 +709,20 @@ export const GoodsManagement: React.FC = () => {
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
+ <FormField
|
|
|
|
|
+ control={updateForm.control}
|
|
|
|
|
+ name="sort"
|
|
|
|
|
+ render={({ field }) => (
|
|
|
|
|
+ <FormItem>
|
|
|
|
|
+ <FormLabel>排序</FormLabel>
|
|
|
|
|
+ <FormControl>
|
|
|
|
|
+ <Input type="number" {...field} />
|
|
|
|
|
+ </FormControl>
|
|
|
|
|
+ <FormMessage />
|
|
|
|
|
+ </FormItem>
|
|
|
|
|
+ )}
|
|
|
|
|
+ />
|
|
|
|
|
+
|
|
|
<FormField
|
|
<FormField
|
|
|
control={updateForm.control}
|
|
control={updateForm.control}
|
|
|
name="imageFileId"
|
|
name="imageFileId"
|