商城测试版v5
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
.apply_record_scroll{
|
||||
height: 70vh;
|
||||
}
|
||||
|
||||
.apply_record_main{
|
||||
margin-top: 20px;
|
||||
padding: 0 30px;
|
||||
height: 70vh;
|
||||
.apply_record_scroll{
|
||||
height: 100%;
|
||||
}
|
||||
.kind_number{
|
||||
width: 100%;
|
||||
padding: 20px;
|
||||
|
||||
@@ -4,6 +4,7 @@ import LabAndImg from "@/components/LabAndImg";
|
||||
import Popup from "@/components/popup";
|
||||
import { ScrollView, Text, View } from "@tarojs/components";
|
||||
import { memo, useCallback, useEffect, useMemo, useState } from "react";
|
||||
import Taro from "@tarojs/taro";
|
||||
import styles from './index.module.scss'
|
||||
|
||||
type Param = {
|
||||
@@ -15,10 +16,12 @@ type Param = {
|
||||
export default memo(({show, onClose, onSubmit, id}:Param) => {
|
||||
useEffect(() => {
|
||||
if(show && id) getSaleOrderPreView()
|
||||
if(!show) setFormatDetailOrder(() => null)
|
||||
}, [show, id])
|
||||
|
||||
|
||||
//获取订单详情
|
||||
const [orderDetail, setOrderDetail] = useState<any>() //获取到的原始数据
|
||||
const [orderDetail, setOrderDetail] = useState<any>(null) //获取到的原始数据
|
||||
const {fetchData: saleOrderOrderDetailData} = SaleOrderOrderDetailApi()
|
||||
const getSaleOrderPreView = async () => {
|
||||
if(id) {
|
||||
@@ -77,50 +80,52 @@ export default memo(({show, onClose, onSubmit, id}:Param) => {
|
||||
return (
|
||||
<>
|
||||
<Popup show={show} title="申请记录" onClose={onClose}>
|
||||
{formatDetailOrder&&<View className={styles.apply_record_main}>
|
||||
<View className={styles.kind_number}><Text>{numText}</Text></View>
|
||||
<ScrollView scrollY className={styles.apply_record_scroll}>
|
||||
<View className={styles.orders_list_con}>
|
||||
{
|
||||
formatDetailOrder?.list?.map(item => {
|
||||
return <View key={item.product_code} className={styles.order_list}>
|
||||
<View className={styles.order_list_title}>
|
||||
<View className={styles.tag}>{formatDetailOrder.sale_mode_name}</View>
|
||||
<View className={styles.title}>{formatHashTag(item.code, item.name)}</View>
|
||||
<View className={styles.num}>共{item?.product_colors.length}种</View>
|
||||
</View>
|
||||
<View className={styles.order_list_scroll}>
|
||||
{item?.product_colors?.map(colorItem => {
|
||||
return <View key={colorItem.id} className={styles.order_list_item}>
|
||||
<View className={styles.order_list_item_img}>
|
||||
<LabAndImg value={labAndRgbAndUrl(colorItem)}/>
|
||||
</View>
|
||||
<View className={styles.order_list_item_con}>
|
||||
<View className={styles.order_list_item_des}>
|
||||
<View className={styles.order_list_item_title}>{colorItem.code + ' ' + colorItem.name}</View>
|
||||
<View className={styles.order_list_item_price}>
|
||||
<Text>¥{standardPrice(colorItem.sale_price)}</Text>
|
||||
<Text>总重{standardPrice(colorItem.estimate_weight)}</Text>
|
||||
<View className={styles.apply_record_main}>
|
||||
{formatDetailOrder&&<>
|
||||
<View className={styles.kind_number}><Text>{numText}</Text></View>
|
||||
<ScrollView scrollY className={styles.apply_record_scroll}>
|
||||
<View className={styles.orders_list_con}>
|
||||
{
|
||||
formatDetailOrder?.list?.map(item => {
|
||||
return <View key={item.product_code} className={styles.order_list}>
|
||||
<View className={styles.order_list_title}>
|
||||
<View className={styles.tag}>{formatDetailOrder.sale_mode_name}</View>
|
||||
<View className={styles.title}>{formatHashTag(item.code, item.name)}</View>
|
||||
<View className={styles.num}>共{item?.product_colors.length}种</View>
|
||||
</View>
|
||||
<View className={styles.order_list_scroll}>
|
||||
{item?.product_colors?.map(colorItem => {
|
||||
return <View key={colorItem.id} className={styles.order_list_item}>
|
||||
<View className={styles.order_list_item_img}>
|
||||
<LabAndImg value={labAndRgbAndUrl(colorItem)}/>
|
||||
</View>
|
||||
<View className={styles.order_list_item_con}>
|
||||
<View className={styles.order_list_item_des}>
|
||||
<View className={styles.order_list_item_title}>{colorItem.code + ' ' + colorItem.name}</View>
|
||||
<View className={styles.order_list_item_price}>
|
||||
<Text>¥{standardPrice(colorItem.sale_price)}</Text>
|
||||
<Text>总重{standardPrice(colorItem.estimate_weight)}</Text>
|
||||
</View>
|
||||
</View>
|
||||
<View className={styles.order_list_item_count}>
|
||||
<View className={styles.count_num}>×{formatCount(colorItem)}<text>{formatDetailOrder.unit}</text></View>
|
||||
<View className={styles.count_price}><text>¥</text>{formatPriceDiv(colorItem.estimate_amount).toLocaleString()}</View>
|
||||
</View>
|
||||
</View>
|
||||
<View className={styles.order_list_item_count}>
|
||||
<View className={styles.count_num}>×{formatCount(colorItem)}<text>{formatDetailOrder.unit}</text></View>
|
||||
<View className={styles.count_price}><text>¥</text>{formatPriceDiv(colorItem.estimate_amount).toLocaleString()}</View>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
})}
|
||||
})}
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
})
|
||||
}
|
||||
<View className={styles.order_total}>
|
||||
<Text>申请条数</Text>
|
||||
<Text>×{orderDetail?.total_number}</Text>
|
||||
})
|
||||
}
|
||||
<View className={styles.order_total}>
|
||||
<Text>申请条数</Text>
|
||||
<Text>×{orderDetail?.total_number}</Text>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
</ScrollView>
|
||||
</View>}
|
||||
</ScrollView>
|
||||
</>}
|
||||
</View>
|
||||
</Popup>
|
||||
</>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user