|
@@ -270,278 +270,122 @@ export default function OrderScreen({ navigation }) {
|
|
|
>
|
|
>
|
|
|
<View {...panResponder.panHandlers}>
|
|
<View {...panResponder.panHandlers}>
|
|
|
<Div pt={10} pb={10} px={15}>
|
|
<Div pt={10} pb={10} px={15}>
|
|
|
- <View style={[styles.card]}>
|
|
|
|
|
- {!cancelOrder &&
|
|
|
|
|
- (finish ? (
|
|
|
|
|
- <Text fontSize="xl">
|
|
|
|
|
- <Text
|
|
|
|
|
- fontSize="xl"
|
|
|
|
|
- color="brand500"
|
|
|
|
|
- mr={10}
|
|
|
|
|
- fontWeight="bold"
|
|
|
|
|
- >
|
|
|
|
|
- {statusInfo.name}
|
|
|
|
|
|
|
+ <Button
|
|
|
|
|
+ block
|
|
|
|
|
+ bg="hide"
|
|
|
|
|
+ p={0}
|
|
|
|
|
+ onPress={() =>
|
|
|
|
|
+ navigation.navigate('OrderDetailList', {
|
|
|
|
|
+ orderId,
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ >
|
|
|
|
|
+ <Div flex={1}>
|
|
|
|
|
+ <View style={styles.card}>
|
|
|
|
|
+ <Div row pb={10}>
|
|
|
|
|
+ <Text fontSize="xl" fontWeight="bold">
|
|
|
|
|
+ {orderInfo.merShowName}
|
|
|
</Text>
|
|
</Text>
|
|
|
- {new Time(
|
|
|
|
|
- orderInfo.userReceivedTime,
|
|
|
|
|
- 'yyyy-MM-DD HH:mm:ss'
|
|
|
|
|
- ).getFormat('HH:mm')}
|
|
|
|
|
- {t('song-da')}
|
|
|
|
|
- </Text>
|
|
|
|
|
- ) : (
|
|
|
|
|
- <Text fontSize="xl">
|
|
|
|
|
- <Text
|
|
|
|
|
- fontSize="xl"
|
|
|
|
|
- color="brand500"
|
|
|
|
|
- mr={10}
|
|
|
|
|
- fontWeight="bold"
|
|
|
|
|
|
|
+ <Button
|
|
|
|
|
+ fontSize="xs"
|
|
|
|
|
+ w={100}
|
|
|
|
|
+ bg="white"
|
|
|
|
|
+ color="gray600"
|
|
|
|
|
+ borderColor="brand500"
|
|
|
|
|
+ borderWidth={1}
|
|
|
|
|
+ rounded={3}
|
|
|
|
|
+ ml={14}
|
|
|
|
|
+ onPress={() => {
|
|
|
|
|
+ if (!orderInfo.muserId) {
|
|
|
|
|
+ warnning('商家信息有误请联系客服帮你催单');
|
|
|
|
|
+ } else {
|
|
|
|
|
+ navigation.navigate('Chat', {
|
|
|
|
|
+ toUserId: orderInfo.muserId,
|
|
|
|
|
+ toUserName: orderInfo.merShowName,
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ }}
|
|
|
>
|
|
>
|
|
|
- {statusInfo.name}
|
|
|
|
|
- </Text>
|
|
|
|
|
- {t('yu-ji')}
|
|
|
|
|
- {new Time(
|
|
|
|
|
- orderInfo.timeOfArrival,
|
|
|
|
|
- 'yyyy-MM-DD HH:mm:ss'
|
|
|
|
|
- ).getFormat('HH:mm')}
|
|
|
|
|
- {t('song-da')}
|
|
|
|
|
- </Text>
|
|
|
|
|
- ))}
|
|
|
|
|
- {cancelOrder && (
|
|
|
|
|
- <Div row>
|
|
|
|
|
- <Text
|
|
|
|
|
- fontSize="xl"
|
|
|
|
|
- color="brand500"
|
|
|
|
|
- mr={10}
|
|
|
|
|
- fontWeight="bold"
|
|
|
|
|
- >
|
|
|
|
|
- {statusInfo.name}
|
|
|
|
|
- </Text>
|
|
|
|
|
- {!!orderInfo.reason && (
|
|
|
|
|
- <Text fontSize="xl" color="red500">
|
|
|
|
|
- ({reasonMap.get(orderInfo.reason).name})
|
|
|
|
|
- </Text>
|
|
|
|
|
- )}
|
|
|
|
|
- </Div>
|
|
|
|
|
- )}
|
|
|
|
|
- <Div row mt={10}>
|
|
|
|
|
- <Button
|
|
|
|
|
- fontSize="xs"
|
|
|
|
|
- flex={1}
|
|
|
|
|
- mx={5}
|
|
|
|
|
- bg="white"
|
|
|
|
|
- color="gray600"
|
|
|
|
|
- borderColor="brand500"
|
|
|
|
|
- borderWidth={1}
|
|
|
|
|
- rounded={3}
|
|
|
|
|
- onPress={() => connectKefu(orderId)}
|
|
|
|
|
- >
|
|
|
|
|
- {t('lian-xi-ke-fu')}
|
|
|
|
|
- </Button>
|
|
|
|
|
-
|
|
|
|
|
- <Button
|
|
|
|
|
- fontSize="xs"
|
|
|
|
|
- flex={1}
|
|
|
|
|
- mx={5}
|
|
|
|
|
- bg="white"
|
|
|
|
|
- color="gray600"
|
|
|
|
|
- borderColor="brand500"
|
|
|
|
|
- borderWidth={1}
|
|
|
|
|
- rounded={3}
|
|
|
|
|
- onPress={() => connectKefu(orderId)}
|
|
|
|
|
- >
|
|
|
|
|
- 立即支付
|
|
|
|
|
- </Button>
|
|
|
|
|
-
|
|
|
|
|
- {!finish && hasRider && (
|
|
|
|
|
- <Button
|
|
|
|
|
- fontSize="xs"
|
|
|
|
|
- flex={1}
|
|
|
|
|
- mx={5}
|
|
|
|
|
- bg="white"
|
|
|
|
|
- color="gray600"
|
|
|
|
|
- borderColor="brand500"
|
|
|
|
|
- borderWidth={1}
|
|
|
|
|
- rounded={3}
|
|
|
|
|
- onPress={(e) => {
|
|
|
|
|
- if (!orderInfo.ruserId) {
|
|
|
|
|
- warnning('骑手信息有误请联系客服');
|
|
|
|
|
- } else {
|
|
|
|
|
- navigation.navigate('Chat', {
|
|
|
|
|
- toUserId: orderInfo.ruserId,
|
|
|
|
|
- toUserName: orderInfo.riderName,
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- console.log(e);
|
|
|
|
|
- }}
|
|
|
|
|
- >
|
|
|
|
|
- {t('lian-xi-qi-shou')}
|
|
|
|
|
- </Button>
|
|
|
|
|
- )}
|
|
|
|
|
- {!finish && isPay && (
|
|
|
|
|
- <Button
|
|
|
|
|
- fontSize="xs"
|
|
|
|
|
- flex={1}
|
|
|
|
|
- mx={5}
|
|
|
|
|
- bg="white"
|
|
|
|
|
- color="gray600"
|
|
|
|
|
- borderColor="brand500"
|
|
|
|
|
- borderWidth={1}
|
|
|
|
|
- rounded={3}
|
|
|
|
|
- onPress={() => {
|
|
|
|
|
- if (!orderInfo.muserId) {
|
|
|
|
|
- warnning('商家信息有误请联系客服帮你催单');
|
|
|
|
|
- } else {
|
|
|
|
|
- navigation.navigate('Chat', {
|
|
|
|
|
- toUserId: orderInfo.muserId,
|
|
|
|
|
- toUserName: orderInfo.merShowName,
|
|
|
|
|
- type: 'Reminder',
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- }}
|
|
|
|
|
- >
|
|
|
|
|
- {t('cui-dan')}
|
|
|
|
|
- </Button>
|
|
|
|
|
- )}
|
|
|
|
|
- {finish && !cancelOrder && (
|
|
|
|
|
- <Button
|
|
|
|
|
- fontSize="xs"
|
|
|
|
|
- flex={1}
|
|
|
|
|
- mx={5}
|
|
|
|
|
- bg="white"
|
|
|
|
|
- color="gray600"
|
|
|
|
|
- borderColor="brand500"
|
|
|
|
|
- borderWidth={1}
|
|
|
|
|
- rounded={3}
|
|
|
|
|
- onPress={() => {
|
|
|
|
|
- navigation.navigate('RewardRider', {
|
|
|
|
|
- orderId,
|
|
|
|
|
- });
|
|
|
|
|
- }}
|
|
|
|
|
- >
|
|
|
|
|
- {t('da-shang-qi-shou')}
|
|
|
|
|
- </Button>
|
|
|
|
|
- )}
|
|
|
|
|
- {finish && !Allfinish && !cancelOrder && (
|
|
|
|
|
- <Button
|
|
|
|
|
- fontSize="xs"
|
|
|
|
|
- flex={1}
|
|
|
|
|
- mx={5}
|
|
|
|
|
- bg="white"
|
|
|
|
|
- color="gray600"
|
|
|
|
|
- borderColor="brand500"
|
|
|
|
|
- borderWidth={1}
|
|
|
|
|
- rounded={3}
|
|
|
|
|
- onPress={() => {
|
|
|
|
|
- navigation.navigate('Evaluate', {
|
|
|
|
|
- orderId,
|
|
|
|
|
- });
|
|
|
|
|
- }}
|
|
|
|
|
- >
|
|
|
|
|
- {t('li-ji-ping-jia')}
|
|
|
|
|
- </Button>
|
|
|
|
|
- )}
|
|
|
|
|
- </Div>
|
|
|
|
|
- </View>
|
|
|
|
|
-
|
|
|
|
|
- <View style={[styles.card]}>
|
|
|
|
|
- <Div row pb={10}>
|
|
|
|
|
- <Text fontSize="xl" fontWeight="bold">
|
|
|
|
|
- {orderInfo.merShowName}
|
|
|
|
|
- </Text>
|
|
|
|
|
- <Button
|
|
|
|
|
- fontSize="xs"
|
|
|
|
|
- w={100}
|
|
|
|
|
- bg="white"
|
|
|
|
|
- color="gray600"
|
|
|
|
|
- borderColor="brand500"
|
|
|
|
|
- borderWidth={1}
|
|
|
|
|
- rounded={3}
|
|
|
|
|
- ml={14}
|
|
|
|
|
- onPress={() => {
|
|
|
|
|
- if (!orderInfo.muserId) {
|
|
|
|
|
- warnning('商家信息有误请联系客服帮你催单');
|
|
|
|
|
- } else {
|
|
|
|
|
- navigation.navigate('Chat', {
|
|
|
|
|
- toUserId: orderInfo.muserId,
|
|
|
|
|
- toUserName: orderInfo.merShowName,
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- }}
|
|
|
|
|
- >
|
|
|
|
|
- {t('lian-xi-shang-jia')}
|
|
|
|
|
- </Button>
|
|
|
|
|
- </Div>
|
|
|
|
|
- <Div>
|
|
|
|
|
- {orderGoodsSpecs.map((item) => {
|
|
|
|
|
- return (
|
|
|
|
|
- <GoodsItem info={item} goods={item.goods} key={item.id} />
|
|
|
|
|
- );
|
|
|
|
|
- })}
|
|
|
|
|
- </Div>
|
|
|
|
|
- <Flex style={styles.info}>
|
|
|
|
|
- <Flex.Item>
|
|
|
|
|
- <Flex>
|
|
|
|
|
|
|
+ {t('lian-xi-shang-jia')}
|
|
|
|
|
+ </Button>
|
|
|
|
|
+ </Div>
|
|
|
|
|
+ <Div>
|
|
|
|
|
+ {orderGoodsSpecs.map((item) => {
|
|
|
|
|
+ return (
|
|
|
|
|
+ <GoodsItem
|
|
|
|
|
+ info={item}
|
|
|
|
|
+ goods={item.goods}
|
|
|
|
|
+ key={item.id}
|
|
|
|
|
+ />
|
|
|
|
|
+ );
|
|
|
|
|
+ })}
|
|
|
|
|
+ </Div>
|
|
|
|
|
+ <Flex style={styles.info}>
|
|
|
|
|
+ <Flex.Item>
|
|
|
|
|
+ <Flex>
|
|
|
|
|
+ <Text fontSize="xs" color="gray300" textAlign="left">
|
|
|
|
|
+ {t('bao-zhuang-fei')}
|
|
|
|
|
+ </Text>
|
|
|
|
|
+ <Text fontSize="xs" color="gray300" textAlign="left">
|
|
|
|
|
+ {t('can-he')}
|
|
|
|
|
+ </Text>
|
|
|
|
|
+ </Flex>
|
|
|
|
|
+ </Flex.Item>
|
|
|
<Text fontSize="xs" color="gray300" textAlign="left">
|
|
<Text fontSize="xs" color="gray300" textAlign="left">
|
|
|
- {t('bao-zhuang-fei')}
|
|
|
|
|
|
|
+ ¥{orderInfo.packingPrice}
|
|
|
</Text>
|
|
</Text>
|
|
|
|
|
+ </Flex>
|
|
|
|
|
+ <Flex style={styles.info}>
|
|
|
|
|
+ <Flex.Item>
|
|
|
|
|
+ <Text fontSize="xs" color="gray300" textAlign="left">
|
|
|
|
|
+ {t('pei-song-fei-ding-dong-zhuan-song')}
|
|
|
|
|
+ </Text>
|
|
|
|
|
+ </Flex.Item>
|
|
|
<Text fontSize="xs" color="gray300" textAlign="left">
|
|
<Text fontSize="xs" color="gray300" textAlign="left">
|
|
|
- {t('can-he')}
|
|
|
|
|
|
|
+ ¥{orderInfo.deliveryAmount}
|
|
|
</Text>
|
|
</Text>
|
|
|
</Flex>
|
|
</Flex>
|
|
|
- </Flex.Item>
|
|
|
|
|
- <Text fontSize="xs" color="gray300" textAlign="left">
|
|
|
|
|
- ¥{orderInfo.packingPrice}
|
|
|
|
|
- </Text>
|
|
|
|
|
- </Flex>
|
|
|
|
|
- <Flex style={styles.info}>
|
|
|
|
|
- <Flex.Item>
|
|
|
|
|
- <Text fontSize="xs" color="gray300" textAlign="left">
|
|
|
|
|
- {t('pei-song-fei-ding-dong-zhuan-song')}
|
|
|
|
|
- </Text>
|
|
|
|
|
- </Flex.Item>
|
|
|
|
|
- <Text fontSize="xs" color="gray300" textAlign="left">
|
|
|
|
|
- ¥{orderInfo.deliveryAmount}
|
|
|
|
|
- </Text>
|
|
|
|
|
- </Flex>
|
|
|
|
|
- <Flex style={styles.info}>
|
|
|
|
|
- <Flex.Item>
|
|
|
|
|
- <Text fontSize="xs" color="gray300" textAlign="left">
|
|
|
|
|
- {t('man-jian')}
|
|
|
|
|
- </Text>
|
|
|
|
|
- </Flex.Item>
|
|
|
|
|
- <Text fontSize="xs" color="red500" textAlign="left">
|
|
|
|
|
- -¥{orderInfo.fullReduction}
|
|
|
|
|
- </Text>
|
|
|
|
|
- </Flex>
|
|
|
|
|
- {!!orderInfo.firstBuy && (
|
|
|
|
|
- <Flex style={styles.info}>
|
|
|
|
|
- <Flex.Item>
|
|
|
|
|
- <Text fontSize="xs" color="gray300" textAlign="left">
|
|
|
|
|
- {t('shou-dan')}
|
|
|
|
|
|
|
+ <Flex style={styles.info}>
|
|
|
|
|
+ <Flex.Item>
|
|
|
|
|
+ <Text fontSize="xs" color="gray300" textAlign="left">
|
|
|
|
|
+ {t('man-jian')}
|
|
|
|
|
+ </Text>
|
|
|
|
|
+ </Flex.Item>
|
|
|
|
|
+ <Text fontSize="xs" color="red500" textAlign="left">
|
|
|
|
|
+ -¥{orderInfo.fullReduction}
|
|
|
</Text>
|
|
</Text>
|
|
|
- </Flex.Item>
|
|
|
|
|
- <Text fontSize="xs" color="red500" textAlign="left">
|
|
|
|
|
- ¥{orderInfo.firstBuy}
|
|
|
|
|
- </Text>
|
|
|
|
|
- </Flex>
|
|
|
|
|
- )}
|
|
|
|
|
|
|
+ </Flex>
|
|
|
|
|
+ {!!orderInfo.firstBuy && (
|
|
|
|
|
+ <Flex style={styles.info}>
|
|
|
|
|
+ <Flex.Item>
|
|
|
|
|
+ <Text fontSize="xs" color="gray300" textAlign="left">
|
|
|
|
|
+ {t('shou-dan')}
|
|
|
|
|
+ </Text>
|
|
|
|
|
+ </Flex.Item>
|
|
|
|
|
+ <Text fontSize="xs" color="red500" textAlign="left">
|
|
|
|
|
+ ¥{orderInfo.firstBuy}
|
|
|
|
|
+ </Text>
|
|
|
|
|
+ </Flex>
|
|
|
|
|
+ )}
|
|
|
|
|
|
|
|
- <Flex style={styles.info}>
|
|
|
|
|
- <Flex.Item>
|
|
|
|
|
- <Text fontSize="xs" color="gray300" textAlign="left">
|
|
|
|
|
- {t('hong-bao')}
|
|
|
|
|
- </Text>
|
|
|
|
|
- </Flex.Item>
|
|
|
|
|
- <Text fontSize="xs" color="red500" textAlign="left">
|
|
|
|
|
- -¥{orderInfo.redBag || 0}
|
|
|
|
|
- </Text>
|
|
|
|
|
- </Flex>
|
|
|
|
|
- <Flex style={styles.total} justify="end">
|
|
|
|
|
- <Text size="s1">
|
|
|
|
|
- {t('xiao-ji')} ¥{orderInfo.realAmount}
|
|
|
|
|
- </Text>
|
|
|
|
|
- </Flex>
|
|
|
|
|
- </View>
|
|
|
|
|
|
|
+ <Flex style={styles.info}>
|
|
|
|
|
+ <Flex.Item>
|
|
|
|
|
+ <Text fontSize="xs" color="gray300" textAlign="left">
|
|
|
|
|
+ {t('hong-bao')}
|
|
|
|
|
+ </Text>
|
|
|
|
|
+ </Flex.Item>
|
|
|
|
|
+ <Text fontSize="xs" color="red500" textAlign="left">
|
|
|
|
|
+ -¥{orderInfo.redBag || 0}
|
|
|
|
|
+ </Text>
|
|
|
|
|
+ </Flex>
|
|
|
|
|
+ <Flex style={styles.total} justify="end">
|
|
|
|
|
+ <Text size="s1">
|
|
|
|
|
+ {t('xiao-ji')} ¥{orderInfo.realAmount}
|
|
|
|
|
+ </Text>
|
|
|
|
|
+ </Flex>
|
|
|
|
|
+ </View>
|
|
|
|
|
+ </Div>
|
|
|
|
|
+ </Button>
|
|
|
|
|
|
|
|
<View style={[styles.card]}>
|
|
<View style={[styles.card]}>
|
|
|
<Text size="c1">{t('ding-dan-xin-xi')}</Text>
|
|
<Text size="c1">{t('ding-dan-xin-xi')}</Text>
|