订单列表对接
This commit is contained in:
parent
b5c4500866
commit
d05ad47b8d
@ -5,10 +5,10 @@
|
|||||||
// export const BASE_URL = `http://192.168.0.89:40001/lymarket`
|
// export const BASE_URL = `http://192.168.0.89:40001/lymarket`
|
||||||
// export const BASE_URL = `http://192.168.1.165:40001/lymarket` // 王霞
|
// export const BASE_URL = `http://192.168.1.165:40001/lymarket` // 王霞
|
||||||
// export const BASE_URL = `https://test.zzfzyc.com/lymarket` // 测试环境
|
// export const BASE_URL = `https://test.zzfzyc.com/lymarket` // 测试环境
|
||||||
// export const BASE_URL = `http://192.168.1.30:40001/lymarket` // 发
|
export const BASE_URL = `http://192.168.1.30:40001/lymarket` // 发
|
||||||
// export const BASE_URL = `https://dev.zzfzyc.com/lymarket` // 开发环境
|
// export const BASE_URL = `https://dev.zzfzyc.com/lymarket` // 开发环境
|
||||||
// export const BASE_URL = `https://www.zzfzyc.com/lymarket` // 正式环境
|
// export const BASE_URL = `https://www.zzfzyc.com/lymarket` // 正式环境
|
||||||
export const BASE_URL = `http://192.168.1.4:40001/lymarket` // 王霞
|
// export const BASE_URL = `http://192.168.1.4:40001/lymarket` // 王霞
|
||||||
// export const BASE_URL = `http://192.168.1.224:50002/lymarket` // 添
|
// export const BASE_URL = `http://192.168.1.224:50002/lymarket` // 添
|
||||||
// export const BASE_URL = `http://192.168.1.15:50001/lymarket` // 杰
|
// export const BASE_URL = `http://192.168.1.15:50001/lymarket` // 杰
|
||||||
|
|
||||||
|
@ -1,7 +1,14 @@
|
|||||||
|
|
||||||
|
//订单状态枚举
|
||||||
export const ORDER_STATUS = {
|
export const ORDER_STATUS = {
|
||||||
0:{value:0, label:'申请中'},
|
SaleOrderStatusBooking : {value:0, label:'待接单'}, // 待接单
|
||||||
1:{value:1, label:'配布中'},
|
SaleOrderStatusArranging : {value:1, label:'配布中'}, // 配布中
|
||||||
2:{value:2, label:'待发货'},
|
SaleOrderStatusArranged : {value:2, label:'已配布'}, // 已配布
|
||||||
3:{value:3, label:'已发货'},
|
SaleOrderStatusWaitingPayment : {value:7, label:'待付款'}, // 待付款
|
||||||
4:{value:4, label:'已完成'}
|
SaleOrderStatusWaitingDelivery : {value:3, label:'待发货'}, // 待发货
|
||||||
|
SaleOrderStatusWaitingReceipt : {value:8, label:'待收货'}, // 待收货
|
||||||
|
SaleOrderStatusAlreadyReceipt : {value:9, label:'已收货'}, // 已收货
|
||||||
|
SaleOrderStatusComplete : {value:4, label:'已完成'}, // 已完成
|
||||||
|
SaleOrderStatusRefund : {value:6, label:'已退款'}, // 已退款
|
||||||
|
SaleOrderStatusCancel : {value:5, label:'已取消'}, // 已取消
|
||||||
}
|
}
|
@ -1,5 +1,6 @@
|
|||||||
import { CancelOrderApi } from "@/api/order"
|
import { CancelOrderApi } from "@/api/order"
|
||||||
import { alert } from "@/common/common"
|
import { alert } from "@/common/common"
|
||||||
|
import { ORDER_STATUS } from "@/common/enum"
|
||||||
import { View } from "@tarojs/components"
|
import { View } from "@tarojs/components"
|
||||||
import Taro from "@tarojs/taro"
|
import Taro from "@tarojs/taro"
|
||||||
import { useCallback, useRef, memo } from "react"
|
import { useCallback, useRef, memo } from "react"
|
||||||
@ -7,63 +8,83 @@ import styles from './index.module.scss'
|
|||||||
|
|
||||||
type Param = {
|
type Param = {
|
||||||
orderInfo: {
|
orderInfo: {
|
||||||
status?: number, //订单状态
|
status: number, //订单状态
|
||||||
orderId: number, //订单id
|
orderId: number, //订单id
|
||||||
payModel: number, //支付方式
|
settle_mode: number, //支付方式
|
||||||
realPayPrice: number, //实付金额
|
actual_amount: number, //实付金额
|
||||||
pendingPayPrice: number, //待付金额
|
wait_pay_amount: number, //待付金额
|
||||||
},
|
}|null,
|
||||||
onClick?: (val: number) => void //点击后触发的事件,返回订单状态
|
onClick?: (val: number) => void //点击后触发的事件,返回订单状态
|
||||||
}
|
}
|
||||||
export default memo(({orderInfo, onClick}:Param) => {
|
export default memo(({orderInfo, onClick}:Param) => {
|
||||||
|
const {
|
||||||
|
SaleOrderStatusBooking,
|
||||||
|
SaleOrderStatusArranging,
|
||||||
|
SaleOrderStatusArranged,
|
||||||
|
SaleOrderStatusWaitingDelivery,
|
||||||
|
SaleOrderStatusComplete,
|
||||||
|
SaleOrderStatusCancel,
|
||||||
|
SaleOrderStatusRefund,
|
||||||
|
SaleOrderStatusWaitingPayment,
|
||||||
|
SaleOrderStatusWaitingReceipt,
|
||||||
|
SaleOrderStatusAlreadyReceipt
|
||||||
|
} = ORDER_STATUS
|
||||||
//订单按钮按订单状态归类
|
//订单按钮按订单状态归类
|
||||||
const orderBtnsList = useRef([
|
const orderBtnsList = useRef([
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
value: [0, 1, 2, 3, 4], //取消订单按钮对应: 待接单,待配布,已配布, 待付款, 待发货
|
value: [SaleOrderStatusBooking.value, SaleOrderStatusArranging.value, SaleOrderStatusArranged.value, SaleOrderStatusWaitingPayment.value, SaleOrderStatusWaitingDelivery.value], //取消订单按钮对应: 待接单,配布中,已配布, 待付款, 待发货
|
||||||
label: '取消订单'
|
label: '取消订单'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
value: [3, 4], //去付款按钮对应:待付款, 待发货
|
value: [SaleOrderStatusWaitingPayment.value, SaleOrderStatusWaitingDelivery.value, SaleOrderStatusWaitingReceipt.value, SaleOrderStatusAlreadyReceipt.value, SaleOrderStatusComplete.value], //去付款按钮对应:待付款, 待发货, 待收货, 已收货, 已完成
|
||||||
label: '去付款'
|
label: '去付款'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 3,
|
id: 3,
|
||||||
value: [4], //取消订单按钮对应: 待发货
|
value: [SaleOrderStatusWaitingDelivery.value], //取消订单按钮对应: 待发货
|
||||||
label: '申请退款'
|
label: '申请退款'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 4,
|
id: 4,
|
||||||
value: [5, 6, 7, 8], //取消订单按钮对应: 待收货, 已收货, 已完成, 已退款
|
value: [SaleOrderStatusWaitingReceipt.value, SaleOrderStatusAlreadyReceipt.value, SaleOrderStatusComplete.value, SaleOrderStatusRefund.value], //取消订单按钮对应: 待收货, 已收货, 已完成, 已退款
|
||||||
label: '查看物流'
|
label: '查看物流'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 5,
|
id: 5,
|
||||||
value: [5, 6, 8], //取消订单按钮对应: 待收货, 已收货, 已退款
|
value: [SaleOrderStatusWaitingReceipt.value, SaleOrderStatusAlreadyReceipt.value, SaleOrderStatusRefund.value], //取消订单按钮对应: 待收货, 已收货, 已退款
|
||||||
label: '申请退货'
|
label: '申请退货'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 6,
|
id: 6,
|
||||||
value: [5], //取消订单按钮对应: 待收货
|
value: [SaleOrderStatusWaitingReceipt.value], //取消订单按钮对应: 待收货
|
||||||
label: '确认收货'
|
label: '确认收货'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 7,
|
id: 7,
|
||||||
value: [5,6,7,8], //取消订单按钮对应: 待收货,已收货,已完成, 已退款
|
value: [SaleOrderStatusWaitingReceipt.value,SaleOrderStatusAlreadyReceipt.value,SaleOrderStatusComplete.value,SaleOrderStatusRefund.value], //取消订单按钮对应: 待收货,已收货,已完成, 已退款
|
||||||
label: '再次购买'
|
label: '再次购买'
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
//判断是否显示该按钮
|
//判断是否显示该按钮
|
||||||
const orderBtnsShow = useCallback((item, status) => {
|
const orderBtnsShow = useCallback((item) => {
|
||||||
if(item.id == 1) {
|
if(orderInfo) {
|
||||||
return( orderInfo.realPayPrice == 0 && status <= 4) //在代发货之前没有付过款
|
// console.log('orderInfo::',item.value.includes(orderInfo.status))
|
||||||
}
|
if(item.id == 1) {
|
||||||
if(item.id == 2) {
|
//取消订单按钮
|
||||||
return( orderInfo.pendingPayPrice != 0 && status <= 4) //在代发货之前没有付完款
|
return( orderInfo.actual_amount == 0 && item.value.includes(orderInfo.status)) //在代发货之前没有付过款
|
||||||
|
} else if (item.id == 2) {
|
||||||
|
//去付款按钮
|
||||||
|
return( orderInfo.wait_pay_amount != 0 && item.value.includes(orderInfo.status)) //只要没有付完款就显示
|
||||||
|
} else if(item.id == 3) {
|
||||||
|
//申请退款
|
||||||
|
return (orderInfo.actual_amount != 0 && item.value.includes(orderInfo.status)) //在代发货之前付过款
|
||||||
|
} else {
|
||||||
|
return item.value.includes(orderInfo.status)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return item.value.includes(status)
|
},[orderInfo])
|
||||||
},[])
|
|
||||||
|
|
||||||
//点击按钮操作
|
//点击按钮操作
|
||||||
const submitBtns = (val) => {
|
const submitBtns = (val) => {
|
||||||
@ -73,12 +94,12 @@ export default memo(({orderInfo, onClick}:Param) => {
|
|||||||
|
|
||||||
//取消订单
|
//取消订单
|
||||||
const {fetchData: cancelFetchData} = CancelOrderApi()
|
const {fetchData: cancelFetchData} = CancelOrderApi()
|
||||||
const cancelOrder = () => {
|
const cancelOrder = () => {
|
||||||
Taro.showModal({
|
Taro.showModal({
|
||||||
title: '要取消该订单吗?',
|
title: '要取消该订单吗?',
|
||||||
success: async function (res) {
|
success: async function (res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
let res = await cancelFetchData({id: orderInfo.orderId})
|
let res = await cancelFetchData({id: orderInfo?.orderId})
|
||||||
if(res.success) {
|
if(res.success) {
|
||||||
alert.success('取消成功')
|
alert.success('取消成功')
|
||||||
onClick?.(1)
|
onClick?.(1)
|
||||||
@ -94,8 +115,8 @@ export default memo(({orderInfo, onClick}:Param) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<View className={styles.btns_list}>
|
<View className={styles.btns_list}>
|
||||||
{orderBtnsList.current.map((item, index) =>
|
{orderBtnsList.current.map((item) =>
|
||||||
orderBtnsShow(item, status)&&<View className={styles.btns_item} onClick={() => submitBtns(item.id)}>{item.label}</View>
|
orderBtnsShow(item)&&<View key={item.id} className={styles.btns_item} onClick={() => submitBtns(item.id)}>{item.label}</View>
|
||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import { ORDER_STATUS } from "@/common/enum"
|
||||||
import { formatHashTag, formatPriceDiv } from "@/common/fotmat"
|
import { formatHashTag, formatPriceDiv } from "@/common/fotmat"
|
||||||
import { View } from "@tarojs/components"
|
import { View } from "@tarojs/components"
|
||||||
import { memo, useCallback, useMemo } from "react"
|
import { memo, useCallback, useMemo } from "react"
|
||||||
@ -17,10 +18,11 @@ type OrderParam = {
|
|||||||
total_sale_price: number, //销售金额
|
total_sale_price: number, //销售金额
|
||||||
total_should_collect_money: number, //应收金额
|
total_should_collect_money: number, //应收金额
|
||||||
total_weight_error_discount: number, //空差优惠
|
total_weight_error_discount: number, //空差优惠
|
||||||
|
the_previous_status: number, //取消订单时的订单状态
|
||||||
|
actual_amount: number //实付金额
|
||||||
}
|
}
|
||||||
|
|
||||||
export default memo(({value}:{value?:OrderParam}) => {
|
export default memo(({value}:{value:OrderParam}) => {
|
||||||
//对应数量
|
//对应数量
|
||||||
const formatCount = useCallback((item) => {
|
const formatCount = useCallback((item) => {
|
||||||
return value?.sale_mode == 0? item.roll : Number(item.length / 100)
|
return value?.sale_mode == 0? item.roll : Number(item.length / 100)
|
||||||
@ -36,15 +38,75 @@ export default memo(({value}:{value?:OrderParam}) => {
|
|||||||
return `${value?.total_fabrics}种面料,${value?.total_colors}种颜色,共${value?.total_number}${value?.unit}`
|
return `${value?.total_fabrics}种面料,${value?.total_colors}种颜色,共${value?.total_number}${value?.unit}`
|
||||||
}, [value])
|
}, [value])
|
||||||
|
|
||||||
|
const {
|
||||||
|
SaleOrderStatusBooking, // 待接单
|
||||||
|
SaleOrderStatusArranging, // 配布中
|
||||||
|
SaleOrderStatusArranged, // 已配布
|
||||||
|
SaleOrderStatusWaitingPayment, // 待付款
|
||||||
|
SaleOrderStatusWaitingDelivery, // 待发货
|
||||||
|
SaleOrderStatusWaitingReceipt, // 待收货
|
||||||
|
SaleOrderStatusAlreadyReceipt, // 已收货
|
||||||
|
SaleOrderStatusComplete, // 已完成
|
||||||
|
SaleOrderStatusRefund, // 已退款
|
||||||
|
SaleOrderStatusCancel, // 已取消
|
||||||
|
} = ORDER_STATUS
|
||||||
|
|
||||||
|
//金额列表枚举
|
||||||
|
const priceList = [
|
||||||
|
{
|
||||||
|
id:1,
|
||||||
|
value:[SaleOrderStatusBooking.value, SaleOrderStatusArranging.value],
|
||||||
|
label:'预估金额'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id:2,
|
||||||
|
value:[SaleOrderStatusArranged.value, SaleOrderStatusWaitingPayment.value, SaleOrderStatusWaitingDelivery.value, SaleOrderStatusWaitingReceipt.value, SaleOrderStatusAlreadyReceipt.value, SaleOrderStatusComplete.value, SaleOrderStatusRefund.value, SaleOrderStatusCancel.value],
|
||||||
|
label:'合计金额'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id:3,
|
||||||
|
value:[SaleOrderStatusArranged.value, SaleOrderStatusWaitingPayment.value, SaleOrderStatusWaitingDelivery.value, SaleOrderStatusWaitingReceipt.value, SaleOrderStatusAlreadyReceipt.value, SaleOrderStatusComplete.value, SaleOrderStatusRefund.value, SaleOrderStatusCancel.value],
|
||||||
|
label:'空差优惠'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id:4,
|
||||||
|
value:[ SaleOrderStatusWaitingPayment.value],
|
||||||
|
label:'应付金额'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id:5,
|
||||||
|
value:[SaleOrderStatusWaitingDelivery.value, SaleOrderStatusWaitingReceipt.value, SaleOrderStatusAlreadyReceipt.value, SaleOrderStatusComplete.value, SaleOrderStatusRefund.value, SaleOrderStatusCancel.value],
|
||||||
|
label:'实付金额'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
const priceConDom = useMemo(() => {
|
const priceConDom = useMemo(() => {
|
||||||
return (
|
if(!value) return
|
||||||
<>
|
console.log('value:::', value)
|
||||||
{(value&&value.status < 3)&&<EstimatedAmount number={formatPriceDiv(value?.estimate_amount)} title="预估金额" />}
|
//订单为取消订单状态
|
||||||
{(value&&value.status >= 3)&&<EstimatedAmount number={formatPriceDiv(value?.total_sale_price)} titleStatus={false} numberStatus={0} title="合计金额" />}
|
if(value?.status == 9) {
|
||||||
{(value&&value.status >= 3)&&<EstimatedAmount number={formatPriceDiv(value?.total_weight_error_discount)} titleStatus={false} numberStatus={0} title="空差优惠" />}
|
return (
|
||||||
{(value&&value.status >= 3)&&<EstimatedAmount number={formatPriceDiv(value?.total_should_collect_money)} title="应付金额" />}
|
<>
|
||||||
</>
|
{(priceList[1].value.includes(value?.the_previous_status))&&<EstimatedAmount number={formatPriceDiv(value?.estimate_amount)} title="预估金额" />}
|
||||||
)
|
{(priceList[2].value.includes(value?.the_previous_status))&&<EstimatedAmount number={formatPriceDiv(value?.total_sale_price)} titleStatus={false} numberStatus={0} title="合计金额" />}
|
||||||
|
{(priceList[3].value.includes(value?.the_previous_status))&&<EstimatedAmount number={formatPriceDiv(value?.total_weight_error_discount)} titleStatus={false} numberStatus={0} title="空差优惠" />}
|
||||||
|
{(priceList[4].value.includes(value?.the_previous_status))&&<EstimatedAmount number={formatPriceDiv(value?.total_should_collect_money)} title="应付金额" />}
|
||||||
|
{/* {(priceList[5].value.includes(value?.the_previous_status))&&<EstimatedAmount number={formatPriceDiv(value?.actual_amount)} title="实付金额" />} */}
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
{(priceList[1].value.includes(value?.status))&&<EstimatedAmount number={formatPriceDiv(value?.estimate_amount)} title="预估金额" />}
|
||||||
|
{(priceList[2].value.includes(value?.status))&&<EstimatedAmount number={formatPriceDiv(value?.total_sale_price)} titleStatus={false} numberStatus={0} title="合计金额" />}
|
||||||
|
{(priceList[3].value.includes(value?.status))&&<EstimatedAmount number={formatPriceDiv(value?.total_weight_error_discount)} titleStatus={false} numberStatus={0} title="空差优惠" />}
|
||||||
|
{(priceList[4].value.includes(value?.status))&&<EstimatedAmount number={formatPriceDiv(value?.total_should_collect_money)} title="应付金额" />}
|
||||||
|
{/* {(priceList[5].value.includes(value?.status))&&<EstimatedAmount number={formatPriceDiv(value?.actual_amount)} title="实付金额" />} */}
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}, [value])
|
}, [value])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -4,12 +4,16 @@ import styles from './index.module.scss'
|
|||||||
import classnames from "classnames";
|
import classnames from "classnames";
|
||||||
import { formatDateTime, formatImgUrl } from "@/common/fotmat";
|
import { formatDateTime, formatImgUrl } from "@/common/fotmat";
|
||||||
type Param = {
|
type Param = {
|
||||||
status: string,
|
list: {
|
||||||
time: string,
|
status: string,
|
||||||
tag: string,
|
time: string,
|
||||||
desc: string
|
tag: string,
|
||||||
|
desc: string
|
||||||
|
}[],
|
||||||
|
settle_mode: -1|0|1|2, //-1:没选支付方式,0:全额现结,1:定期付款,2:货到付款
|
||||||
|
|
||||||
}
|
}
|
||||||
export default memo(({list = []}:{list?:Param[]}) => {
|
export default memo(({list = [], settle_mode = -1}:Param) => {
|
||||||
const [showMore, setShowMore] = useState(false)
|
const [showMore, setShowMore] = useState(false)
|
||||||
const changeMore = () => {
|
const changeMore = () => {
|
||||||
setShowMore(() => !showMore)
|
setShowMore(() => !showMore)
|
||||||
@ -38,7 +42,8 @@ export default memo(({list = []}:{list?:Param[]}) => {
|
|||||||
<Text className={classnames('iconfont icon-a-moreback', styles.miconfonts, showMore&&styles.open_miconfonts)}></Text>
|
<Text className={classnames('iconfont icon-a-moreback', styles.miconfonts, showMore&&styles.open_miconfonts)}></Text>
|
||||||
</View>}
|
</View>}
|
||||||
<View className={styles.image_tag}>
|
<View className={styles.image_tag}>
|
||||||
{/* <Image mode="aspectFit" src={formatImgUrl('/mall/order_pay_status.png')} className={styles.image}/> */}
|
{(settle_mode == 2)&&<Image mode="aspectFit" src={formatImgUrl('/mall/order_pay_status.png')} className={styles.image}/>}
|
||||||
|
{(settle_mode == 1)&&<Image mode="aspectFit" src={formatImgUrl('/mall/order_pay_status_7day.png')} className={styles.image}/>}
|
||||||
</View>
|
</View>
|
||||||
</View>}
|
</View>}
|
||||||
</>
|
</>
|
||||||
|
@ -23,7 +23,7 @@ type PayInfo = {
|
|||||||
amount: string
|
amount: string
|
||||||
}
|
}
|
||||||
|
|
||||||
type PayStatus = 0|1|2|3|4|null //0:预存款, 1:账期,2:线下汇款, 3:扫码支付, 4:货到付款
|
type PayStatus = 1|2|3|4|5|null //1:预存款, 2:账期,3:线下汇款, 4:扫码支付, 5:货到付款
|
||||||
export default memo(({show = false, onClose, orderId = 0, onSubmitSuccess}:Param) => {
|
export default memo(({show = false, onClose, orderId = 0, onSubmitSuccess}:Param) => {
|
||||||
|
|
||||||
//提交参数
|
//提交参数
|
||||||
@ -54,9 +54,10 @@ export default memo(({show = false, onClose, orderId = 0, onSubmitSuccess}:Param
|
|||||||
setPayInfo(() => data)
|
setPayInfo(() => data)
|
||||||
}
|
}
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if(show&&orderId)
|
if(show&&orderId) {
|
||||||
setSubmitData((val) => ({...val, id:orderId}))
|
setSubmitData((val) => ({...val, id:orderId}))
|
||||||
getOrderPay()
|
getOrderPay()
|
||||||
|
}
|
||||||
}, [show, orderId])
|
}, [show, orderId])
|
||||||
|
|
||||||
//预存款选择
|
//预存款选择
|
||||||
@ -125,7 +126,7 @@ export default memo(({show = false, onClose, orderId = 0, onSubmitSuccess}:Param
|
|||||||
</View>
|
</View>
|
||||||
{advance_payment}
|
{advance_payment}
|
||||||
</View>
|
</View>
|
||||||
<MCheckbox status={submitData.payment_method == 0} onSelect={() => advanceSelectData(0)} onClose={() => advanceSelectData(null)}/>
|
<MCheckbox status={submitData.payment_method == 1} onSelect={() => advanceSelectData(0)} onClose={() => advanceSelectData(null)}/>
|
||||||
</View>
|
</View>
|
||||||
<View className={styles.payment_list_item}>
|
<View className={styles.payment_list_item}>
|
||||||
<View className={styles.payment_list_item_left}>
|
<View className={styles.payment_list_item_left}>
|
||||||
@ -135,7 +136,7 @@ export default memo(({show = false, onClose, orderId = 0, onSubmitSuccess}:Param
|
|||||||
</View>
|
</View>
|
||||||
<View className={styles.payment_list_item_left_price}>可用额度 ¥{payInfo?.account_period_credit_available_line}</View>
|
<View className={styles.payment_list_item_left_price}>可用额度 ¥{payInfo?.account_period_credit_available_line}</View>
|
||||||
</View>
|
</View>
|
||||||
<MCheckbox status={submitData.payment_method == 1} onSelect={() => periodSelectData(1)} onClose={() => periodSelectData(null)}/>
|
<MCheckbox status={submitData.payment_method == 2} onSelect={() => periodSelectData(1)} onClose={() => periodSelectData(null)}/>
|
||||||
</View>
|
</View>
|
||||||
<View className={styles.payment_list_item} onClick={onShowOfflinePay}>
|
<View className={styles.payment_list_item} onClick={onShowOfflinePay}>
|
||||||
<View className={styles.payment_list_item_left}>
|
<View className={styles.payment_list_item_left}>
|
||||||
|
@ -16,7 +16,6 @@ import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|||||||
import order from "../orderList/components/order";
|
import order from "../orderList/components/order";
|
||||||
import AddressInfoDetail from "./components/addressInfoDetail";
|
import AddressInfoDetail from "./components/addressInfoDetail";
|
||||||
import KindList from "./components/kindList";
|
import KindList from "./components/kindList";
|
||||||
import orderState from "./components/orderState";
|
|
||||||
import OrderState from "./components/orderState";
|
import OrderState from "./components/orderState";
|
||||||
import Payment from "./components/payment";
|
import Payment from "./components/payment";
|
||||||
import Remark from "./components/remark";
|
import Remark from "./components/remark";
|
||||||
@ -66,6 +65,9 @@ import styles from './index.module.scss'
|
|||||||
total_sale_price: orderDetail.total_sale_price, //销售金额
|
total_sale_price: orderDetail.total_sale_price, //销售金额
|
||||||
total_should_collect_money: orderDetail.total_should_collect_money, //应收金额
|
total_should_collect_money: orderDetail.total_should_collect_money, //应收金额
|
||||||
total_weight_error_discount: orderDetail.total_weight_error_discount, //空差优惠
|
total_weight_error_discount: orderDetail.total_weight_error_discount, //空差优惠
|
||||||
|
actual_amount: orderDetail.actual_amount, //实付金额
|
||||||
|
the_previous_status: orderDetail.the_previous_status, //取消订单时的订单状态
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const formatPreViewOrderMemo = useMemo(() => {
|
const formatPreViewOrderMemo = useMemo(() => {
|
||||||
@ -165,11 +167,11 @@ import styles from './index.module.scss'
|
|||||||
//按钮所需数据
|
//按钮所需数据
|
||||||
const orderInfo = useMemo(() => {
|
const orderInfo = useMemo(() => {
|
||||||
return {
|
return {
|
||||||
status: orderDetail?.status,
|
status: orderDetail?.status, //订单状态
|
||||||
orderId: orderDetail?.id,
|
orderId: orderDetail?.id,
|
||||||
payModel: orderDetail?.id, //支付方式
|
settle_mode: orderDetail?.settle_mode, //支付方式 -1 还没支付 0:全额现结,1:定期付款,2:货到付款
|
||||||
realPayPrice: orderDetail?.id, //实付金额
|
actual_amount: orderDetail?.actual_amount, //实付金额
|
||||||
pendingPayPrice: orderDetail?.id, //待付金额
|
wait_pay_amount: orderDetail?.wait_pay_amount, //待付金额
|
||||||
}
|
}
|
||||||
}, [orderDetail])
|
}, [orderDetail])
|
||||||
|
|
||||||
@ -206,10 +208,9 @@ import styles from './index.module.scss'
|
|||||||
}
|
}
|
||||||
<View className={classnames(styles.miconfont, 'iconfont icon-a-moreback')}></View>
|
<View className={classnames(styles.miconfont, 'iconfont icon-a-moreback')}></View>
|
||||||
</View>
|
</View>
|
||||||
<View className={styles.submit_order}>
|
{(orderDetail?.status)&&<View className={styles.submit_order}>
|
||||||
<OrderBtns orderInfo={orderInfo} onClick={orderStateClick}/>
|
<OrderBtns orderInfo={orderInfo} onClick={orderStateClick}/>
|
||||||
{/* <View className={styles.order_btn} onClick={() => toPay()}>去支付</View> */}
|
</View> }
|
||||||
</View>
|
|
||||||
<Popup show={showDesc} showTitle={false} onClose={() => setShowDesc(false)} >
|
<Popup show={showDesc} showTitle={false} onClose={() => setShowDesc(false)} >
|
||||||
<Remark onSave={(e) => getRemark(e)}/>
|
<Remark onSave={(e) => getRemark(e)}/>
|
||||||
</Popup>
|
</Popup>
|
||||||
|
@ -8,7 +8,7 @@ import { memo, useCallback, useMemo, useRef } from "react";
|
|||||||
import styles from './index.module.scss'
|
import styles from './index.module.scss'
|
||||||
|
|
||||||
type Param = {
|
type Param = {
|
||||||
value?: {
|
value: {
|
||||||
order_no: string,
|
order_no: string,
|
||||||
sale_mode: number,
|
sale_mode: number,
|
||||||
sale_mode_name: string,
|
sale_mode_name: string,
|
||||||
@ -19,7 +19,10 @@ type Param = {
|
|||||||
total_colors: number,
|
total_colors: number,
|
||||||
total_number: number,
|
total_number: number,
|
||||||
status: 0,
|
status: 0,
|
||||||
id: number
|
id: number,
|
||||||
|
settle_mode: number, //支付方式
|
||||||
|
actual_amount: number, //实付金额
|
||||||
|
wait_pay_amount: number //待付金额
|
||||||
},
|
},
|
||||||
onClickBtn?: (val:number) => void
|
onClickBtn?: (val:number) => void
|
||||||
}
|
}
|
||||||
@ -39,6 +42,17 @@ export default memo(({value, onClickBtn}: Param) => {
|
|||||||
onClickBtn?.(status)
|
onClickBtn?.(status)
|
||||||
}, [value])
|
}, [value])
|
||||||
|
|
||||||
|
//按钮所需数据
|
||||||
|
const orderInfo = useMemo(() => {
|
||||||
|
return {
|
||||||
|
status: value?.status, //订单状态
|
||||||
|
orderId: value?.id,
|
||||||
|
settle_mode: value?.settle_mode, //支付方式 -1 还没支付 0:全额现结,1:定期付款,2:货到付款
|
||||||
|
actual_amount: value?.actual_amount, //实付金额
|
||||||
|
wait_pay_amount: value?.wait_pay_amount, //待付金额
|
||||||
|
}
|
||||||
|
}, [value])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View className={styles.order_item}>
|
<View className={styles.order_item}>
|
||||||
<View className={styles.header} onClick={() => goLink('/pages/order/index', {id: value?.id})}>
|
<View className={styles.header} onClick={() => goLink('/pages/order/index', {id: value?.id})}>
|
||||||
@ -83,7 +97,7 @@ export default memo(({value, onClickBtn}: Param) => {
|
|||||||
</View>
|
</View>
|
||||||
<View className={styles.color_count_num}>{`${value?.total_fabrics}种面料,${value?.total_colors}种颜色,共${value?.total_number}条`}</View>
|
<View className={styles.color_count_num}>{`${value?.total_fabrics}种面料,${value?.total_colors}种颜色,共${value?.total_number}条`}</View>
|
||||||
</View>
|
</View>
|
||||||
<OrderBtns status={value?.status} onClick={orderBtnsClick} orderId={value?.id as number}/>
|
<OrderBtns orderInfo={orderInfo} onClick={orderBtnsClick}/>
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user