✨ feat(订单模块):提交订单对接
This commit is contained in:
@@ -2,7 +2,7 @@ import { Image, Text, View } from "@tarojs/components";
|
||||
import { memo, useEffect, useMemo, useRef, useState } from "react";
|
||||
import classnames from "classnames";
|
||||
import styles from './index.module.scss'
|
||||
|
||||
import IconFont from '@/components/iconfont/iconfont'
|
||||
interface propsObj {
|
||||
receivingStatus: Number | null,
|
||||
onReceivingStatus?: (any, Number) => void,
|
||||
@@ -45,11 +45,14 @@ export default memo((props: propsObj) => {
|
||||
<View className={styles.addressBox}>
|
||||
<View className={styles.topBox} onClick={() => navSelect?.(obj)}>
|
||||
<View className={styles.cirle}>
|
||||
<View className={classnames('iconfont', 'icon-dingwei', styles.dingwei)}></View>
|
||||
<IconFont name={'icon-dingwei'} size={26} color={'#ffffff'}></IconFont>
|
||||
{/* <View className={classnames('iconfont', 'icon-dingwei', styles.dingwei)}></View> */}
|
||||
</View>
|
||||
<View className={styles.address}>{addressInfo}</View>
|
||||
{
|
||||
receivingStatus !== 1 && <View className={classnames('iconfont', 'icon-chakanquanbukehu', styles.icon_more)}></View>
|
||||
receivingStatus !== 1 &&
|
||||
<IconFont name={'icon-chakanquanbukehu'} size={50} ></IconFont>
|
||||
// <View className={classnames('iconfont', 'icon-chakanquanbukehu', styles.icon_more)}></View>
|
||||
}
|
||||
</View>
|
||||
<View className={styles.line}></View>
|
||||
|
||||
@@ -23,12 +23,13 @@ import {
|
||||
mpsaleOrdercancel,
|
||||
GetPayCode,
|
||||
mpsaleOrderaddress,
|
||||
mpsaleOrdershipmentMode,
|
||||
mpsaleOrderreceive
|
||||
} from '@/api/order'
|
||||
import { alert, goLink } from '@/common/common'
|
||||
import { formatPriceDiv, formatDateTime, formatWeightDiv } from '@/common/format'
|
||||
import PayPopup from '../order/components/PayPopup'
|
||||
|
||||
import IconFont from '@/components/iconfont/iconfont'
|
||||
export default () => {
|
||||
const router = useRouter()
|
||||
// useEffect(() => {
|
||||
@@ -46,7 +47,7 @@ export default () => {
|
||||
//收货方法,1:自提,2物流
|
||||
const [receivingStatus, setReceivingStatus] = useState(null)
|
||||
//切换自提或者物流
|
||||
const { fetchData: selectFetch } = mpsaleOrderaddress()
|
||||
const { fetchData: selectFetch } = mpsaleOrdershipmentMode()
|
||||
const onReceivingStatus = debounce(async (e, value) => {
|
||||
if (infoObj.status === 8 || infoObj.status === 9 || infoObj.status === 4 || infoObj.status === 5) {
|
||||
alert.error('不允许更改')
|
||||
@@ -69,10 +70,11 @@ export default () => {
|
||||
icon: 'success'
|
||||
})
|
||||
setReceivingStatus(value)
|
||||
getDetail()
|
||||
} else {
|
||||
Taro.hideLoading()
|
||||
Taro.showToast({
|
||||
title: res.msg,
|
||||
title: '请先去新增地址',
|
||||
icon: 'error'
|
||||
})
|
||||
}
|
||||
@@ -595,21 +597,22 @@ export default () => {
|
||||
<View className={styles.flexMoney}>
|
||||
<View className={styles.flexTotalBox}>
|
||||
<View className={styles.totalFont}>合计金额</View>
|
||||
<View className={classnames('iconfont', 'icon-tishi', styles.tishi)}></View>
|
||||
<IconFont name={'icon-tishi'} size={28} ></IconFont>
|
||||
</View>
|
||||
<View className={styles.shoudPay}>{formatPriceDiv(infoObj.total_should_collect_money)}</View>
|
||||
</View>
|
||||
<View className={styles.flexMoney}>
|
||||
<View className={styles.flexTotalBox}>
|
||||
<View className={styles.totalFont}>实付金额</View>
|
||||
<View className={classnames('iconfont', 'icon-tishi', styles.tishi)}></View>
|
||||
<IconFont name={'icon-tishi'} size={28} ></IconFont>
|
||||
</View>
|
||||
<View className={styles.shoudPay}>{formatPriceDiv(infoObj.actual_amount)}</View>
|
||||
</View>
|
||||
<View className={styles.flexMoney}>
|
||||
<View className={styles.flexTotalBox}>
|
||||
<View className={styles.totalFont}>待付金额</View>
|
||||
<View className={classnames('iconfont', 'icon-tishi', styles.tishi)}></View>
|
||||
{/* <View className={classnames('iconfont', 'icon-tishi', styles.tishi)}></View> */}
|
||||
<IconFont name={'icon-tishi'} size={28} ></IconFont>
|
||||
</View>
|
||||
<View className={styles.shoudPay}>{formatPriceDiv(infoObj.wait_pay_amount)}</View>
|
||||
</View>
|
||||
|
||||
Reference in New Issue
Block a user