|
|
@@ -1,10 +1,10 @@
|
|
|
import {Image, Text, View, Picker} from '@tarojs/components';
|
|
|
import icon from '@assets/goods/sending.svg';
|
|
|
import {Button} from '@antmjs/vantui';
|
|
|
-import {TextGroup as Item} from '@components';
|
|
|
+import {TextGroup as Item, Upload} from '@components';
|
|
|
import {useSubmit} from './hooks';
|
|
|
import dayjs from 'dayjs';
|
|
|
-import {useScanOrder} from '@hooks';
|
|
|
+import {useScanOrder, useUpload} from '@hooks';
|
|
|
import {BTN_LOADING_SIZE} from '@utils';
|
|
|
|
|
|
export default function DeliverGoods() {
|
|
|
@@ -12,11 +12,13 @@ export default function DeliverGoods() {
|
|
|
{goodsList, customerNo, truckNo, date},
|
|
|
{onScan, setDate: onDateChange},
|
|
|
] = useScanOrder();
|
|
|
+ const [files, {onAdd, onRemove}] = useUpload();
|
|
|
const [isLoading, onSubmit] = useSubmit({
|
|
|
goodsList,
|
|
|
customerNo,
|
|
|
truckNo,
|
|
|
date,
|
|
|
+ files,
|
|
|
});
|
|
|
|
|
|
return (
|
|
|
@@ -43,7 +45,7 @@ export default function DeliverGoods() {
|
|
|
</View>
|
|
|
|
|
|
{goodsList.length > 0 ? (
|
|
|
- <View className='mt-px bg-white p-4 mb-10'>
|
|
|
+ <View className='mt-px bg-white p-4'>
|
|
|
<Text className='text-lg font-semibold'>货品信息</Text>
|
|
|
|
|
|
<View className='mt-3'>
|
|
|
@@ -62,6 +64,8 @@ export default function DeliverGoods() {
|
|
|
</View>
|
|
|
) : null}
|
|
|
|
|
|
+ <Upload files={files} onAdd={onAdd} onDelete={onRemove} />
|
|
|
+
|
|
|
<View className='flex mt-auto justify-around pb-12'>
|
|
|
<Button className='w-36' onClick={onScan} round disabled={isLoading}>
|
|
|
扫码
|