商城测试版v6
This commit is contained in:
@@ -131,7 +131,7 @@ import { throttle } from "@/common/util";
|
||||
const numText = useMemo(() => {
|
||||
if(formatPreViewOrder) {
|
||||
let total_number = formatPreViewOrder?.sale_mode == 0?formatPreViewOrder?.total_number:(formatPreViewOrder?.total_number/100)
|
||||
return `${formatPreViewOrder?.total_fabrics} 种面料,${formatPreViewOrder?.total_colors} 种颜色,共 ${total_number}${formatPreViewOrder?.unit}`
|
||||
return `${formatPreViewOrder?.total_fabrics} 种面料,${formatPreViewOrder?.total_colors} 种颜色,共 ${total_number} ${formatPreViewOrder?.unit}`
|
||||
}
|
||||
}, [formatPreViewOrder])
|
||||
|
||||
@@ -178,7 +178,7 @@ import { throttle } from "@/common/util";
|
||||
</View>
|
||||
<View className={styles.submit_order}>
|
||||
<View className={styles.submit_order_number}>
|
||||
<SubmitOrderBtn style={{color:'#007AFF'}} number={formatPriceDiv(preViewOrder?.sale_mode == 1?formatPreViewOrder?.total_should_collect_money:formatPreViewOrder?.estimate_amount) as number} priceTitle={preViewOrder?.sale_mode == 1?'合计金额':'预估金额'}/>
|
||||
<SubmitOrderBtn style={{color:'#007AFF'}} number={(preViewOrder?.sale_mode == 1?formatPreViewOrder?.total_should_collect_money:formatPreViewOrder?.estimate_amount)/100} priceTitle={preViewOrder?.sale_mode == 1?'合计金额':'预估金额'}/>
|
||||
<View className={styles.order_number_desc}>{numText}</View>
|
||||
</View>
|
||||
<View className={classnames(styles.order_btn, btnStatus&&styles.ok_order_btn)} onClick={() => submitOrderEven()}>提交订单</View>
|
||||
|
||||
@@ -109,7 +109,7 @@ export default memo(({order, comfirm = false}:Param) => {
|
||||
<>
|
||||
{
|
||||
priceList.map(item => {
|
||||
return <>{item.validatarFunc(order)&&<EstimatedAmount key={item.id} number={formatPriceDiv(order[item.field]) as number} title={item.label} messageTitle={item.message} />}</>
|
||||
return <>{item.validatarFunc(order)&&<EstimatedAmount key={item.id} number={order[item.field]/100} title={item.label} messageTitle={item.message} />}</>
|
||||
})
|
||||
}
|
||||
</>
|
||||
@@ -122,14 +122,14 @@ export default memo(({order, comfirm = false}:Param) => {
|
||||
}, [order])
|
||||
//对应单价
|
||||
const standardPrice = useCallback(price => {
|
||||
return formatPriceDiv(price).toLocaleString() + '/' + (order?.sale_mode == 1?'m':'kg')
|
||||
return formatPriceDiv(price, 100, true) + '/' + (order?.sale_mode == 1?'m':'kg')
|
||||
}, [order])
|
||||
|
||||
//数量格式
|
||||
const numText = useMemo(() => {
|
||||
if(order) {
|
||||
let total_number = order?.sale_mode == 0?order?.total_number:(order?.total_number/100)
|
||||
return `${order?.total_fabrics} 种面料,${order?.total_colors} 种颜色,共 ${total_number}${order?.unit}`
|
||||
return `${order?.total_fabrics} 种面料,${order?.total_colors} 种颜色,共 ${total_number} ${order?.unit}`
|
||||
}
|
||||
}, [order])
|
||||
|
||||
@@ -137,7 +137,7 @@ export default memo(({order, comfirm = false}:Param) => {
|
||||
const comfirmPriceConDom = useMemo(() => {
|
||||
if(!order) return
|
||||
let item = order.sale_mode == 1?priceList[1]:priceList[0]
|
||||
return<EstimatedAmount key={item.id} number={formatPriceDiv(order[item.field]) as number} title={item.label} />
|
||||
return<EstimatedAmount key={item.id} number={order[item.field]/100} title={item.label} messageTitle={item.message}/>
|
||||
}, [order])
|
||||
|
||||
//确认金额展示
|
||||
@@ -148,7 +148,7 @@ export default memo(({order, comfirm = false}:Param) => {
|
||||
//颜色金额小计
|
||||
const colorPrice = useCallback((item) => {
|
||||
let res = item.total_sale_price||item.estimate_amount
|
||||
return formatPriceDiv(res).toLocaleString('en', {minimumFractionDigits: 2})
|
||||
return formatPriceDiv(res, 100, true)
|
||||
},[order])
|
||||
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ import {
|
||||
import { AddShoppingCartApi } from "@/api/shopCart";
|
||||
import { SubscriptionMessageApi } from "@/api/user";
|
||||
import { alert, goLink } from "@/common/common";
|
||||
import { ORDER_STATUS, SUBSCRIPTION_MESSAGE_SCENE } from "@/common/enum";
|
||||
import { formatDateTime, formatImgUrl, formatPriceDiv } from "@/common/fotmat";
|
||||
import { ORDER_STATUS } from "@/common/enum";
|
||||
import { formatDateTime, formatImgUrl } from "@/common/fotmat";
|
||||
import OrderBtns from "@/components/orderBtns";
|
||||
import Popup from "@/components/popup";
|
||||
import SearchInput from "@/components/searchInput";
|
||||
|
||||
@@ -127,7 +127,7 @@ export default memo(({value, onClickBtn}: Param) => {
|
||||
</View>
|
||||
<View className={styles.color_count_num}>
|
||||
<Text>{numText}</Text>
|
||||
{(value.total_sale_price/100||value.estimate_amount/100)&& <Text className={styles.price}><Text>¥</Text>{formatPriceDiv(value.total_sale_price, 100, true)||formatPriceDiv(value.estimate_amount, 100, true)}</Text>}
|
||||
<Text className={styles.price}><Text>¥</Text>{value.total_sale_price?formatPriceDiv(value.total_sale_price, 100, true):formatPriceDiv(value.estimate_amount, 100, true)}</Text>
|
||||
</View>
|
||||
</View>
|
||||
<OrderBtns orderInfo={orderInfo} onClick={orderBtnsClick}/>
|
||||
|
||||
@@ -159,7 +159,7 @@ export default memo(({order, comfirm = false}:Param) => {
|
||||
<>
|
||||
{
|
||||
priceList.map(item => {
|
||||
return <>{showPrice(item)&&<EstimatedAmount messageTitle={item.message} key={item.id} number={formatPriceDiv(order[item.field])} title={item.label} />}</>
|
||||
return <>{showPrice(item)&&<EstimatedAmount messageTitle={item.message} key={item.id} number={order[item.field]} title={item.label} />}</>
|
||||
})
|
||||
}
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user