|
|
@@ -0,0 +1,62 @@
|
|
|
+import {View, Image, Text} from '@tarojs/components';
|
|
|
+import icon from '@assets/goods/complate.svg';
|
|
|
+import {TextGroup} from '@components';
|
|
|
+import {useScanOrder} from '@hooks';
|
|
|
+import {Button} from '@nutui/nutui-react-taro';
|
|
|
+import {useUpload} from './hooks';
|
|
|
+import Upload from './upload';
|
|
|
+
|
|
|
+export default function Receive() {
|
|
|
+ const [{goodsList, customerNo, truckNo}, onScan] = useScanOrder();
|
|
|
+ const [files, {onRemove, onAdd}] = useUpload();
|
|
|
+
|
|
|
+ return (
|
|
|
+ <View className='h-screen overflow-auto bg-gray-100 flex flex-col'>
|
|
|
+ <View className='py-4 bg-white'>
|
|
|
+ <Image src={icon} mode='widthFix' className='w-14 mx-auto' />
|
|
|
+
|
|
|
+ <Text className='px-3 text-center mt-2 block text-lg font-semibold text-[#333]'>
|
|
|
+ 确认收货单
|
|
|
+ </Text>
|
|
|
+ </View>
|
|
|
+
|
|
|
+ <View className='mt-px bg-white px-4 py-2'>
|
|
|
+ <TextGroup title='卡车号' content={truckNo} />
|
|
|
+ <TextGroup title='客户号' content={customerNo} />
|
|
|
+ </View>
|
|
|
+
|
|
|
+ {goodsList.length > 0 ? (
|
|
|
+ <View className='mt-px bg-white p-4'>
|
|
|
+ <Text className='text-lg font-semibold'>货品信息</Text>
|
|
|
+
|
|
|
+ <View className='mt-3'>
|
|
|
+ {goodsList.map(function ({no, num}) {
|
|
|
+ return (
|
|
|
+ <View
|
|
|
+ key={no}
|
|
|
+ className='border-0 border-b border-dashed border-gray-100 last:border-none'
|
|
|
+ >
|
|
|
+ <TextGroup title='品号' content={no} />
|
|
|
+ <TextGroup title='数量' content={Number(num)} />
|
|
|
+ </View>
|
|
|
+ );
|
|
|
+ })}
|
|
|
+ </View>
|
|
|
+ </View>
|
|
|
+ ) : null}
|
|
|
+
|
|
|
+ <View className='mt-3 bg-white px-4 py-2 mb-10'>
|
|
|
+ <Upload files={files} onDelete={onRemove} onAdd={onAdd} />
|
|
|
+ </View>
|
|
|
+
|
|
|
+ <View className='flex mt-auto justify-around pb-12'>
|
|
|
+ <Button className='w-36' onClick={onScan}>
|
|
|
+ 扫码
|
|
|
+ </Button>
|
|
|
+ <Button type='primary' className='w-36' color='#58C6EA'>
|
|
|
+ 确认收货
|
|
|
+ </Button>
|
|
|
+ </View>
|
|
|
+ </View>
|
|
|
+ );
|
|
|
+}
|