🐞 fix(售后):配合后端根据相应的状态显示内容
This commit is contained in:
parent
5b21921a21
commit
3abe542ec7
@ -1,5 +1,4 @@
|
|||||||
export const BASE_URL = CURRENT_BASE_URL
|
export const BASE_URL = CURRENT_BASE_URL
|
||||||
// export const BASE_URL = 'https://pre.zzfzyc.com/lymarket'
|
|
||||||
// export const BASE_URL = `http://192.168.0.75:50001/lymarket`
|
// export const BASE_URL = `http://192.168.0.75:50001/lymarket`
|
||||||
// export const BASE_URL = `http://192.168.0.89:50001/lymarket`
|
// export const BASE_URL = `http://192.168.0.89:50001/lymarket`
|
||||||
// export const BASE_URL = `http://10.0.0.5:50001/lymarket`
|
// export const BASE_URL = `http://10.0.0.5:50001/lymarket`
|
||||||
@ -14,7 +13,7 @@ export const BASE_URL = CURRENT_BASE_URL
|
|||||||
// 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.5:40001/lymarket` // 王霞
|
// export const BASE_URL = `http://192.168.1.5:40001/lymarket` // 王霞
|
||||||
// export const BASE_URL = `http://192.168.1.7:50002/lymarket` // 添
|
// export const BASE_URL = `http://192.168.1.7:50002/lymarket` // 添
|
||||||
// export const BASE_URL = `http://192.168.1.42:50002/lymarket` // 杰
|
// export const BASE_URL = 'http://192.168.1.42:50002/lymarket' // 杰
|
||||||
// export const BASE_URL = `http://192.168.1.95:40001/lymarket` // 华
|
// export const BASE_URL = `http://192.168.1.95:40001/lymarket` // 华
|
||||||
// export const BASE_URL = 'http://192.168.1.28:50002/lymarket' // 婷
|
// export const BASE_URL = 'http://192.168.1.28:50002/lymarket' // 婷
|
||||||
|
|
||||||
|
|||||||
@ -20,6 +20,16 @@ import { alert } from '@/common/common'
|
|||||||
import RefundCodelist from '@/components/RefundCodelist'
|
import RefundCodelist from '@/components/RefundCodelist'
|
||||||
import LabAndImg from '@/components/LabAndImg'
|
import LabAndImg from '@/components/LabAndImg'
|
||||||
|
|
||||||
|
enum ReturnEnum {
|
||||||
|
Refunded = 3, // 已退款
|
||||||
|
RefundedBefore = 5, // 待退款-确认单
|
||||||
|
RefundedAfter = 6, // 待退款
|
||||||
|
}
|
||||||
|
|
||||||
|
enum ReturnType {
|
||||||
|
TypeOne = 2, // 预收退款
|
||||||
|
}
|
||||||
|
|
||||||
interface Obs {
|
interface Obs {
|
||||||
title?: string
|
title?: string
|
||||||
modeName?: string
|
modeName?: string
|
||||||
@ -90,7 +100,7 @@ const GoodsItem = (porps: PropGoods) => {
|
|||||||
<View className={styles.clear}> </View>
|
<View className={styles.clear}> </View>
|
||||||
<View className={styles.itemRight}>
|
<View className={styles.itemRight}>
|
||||||
<View className={styles.item_right_top}>
|
<View className={styles.item_right_top}>
|
||||||
<View className={styles.itemName}>{it.code}# {it.name}</View>
|
<View className={styles.itemName}>{it.code}{it.name}</View>
|
||||||
{/* <View className={styles.itemNums}>x{obj?.sale_mode === 0 ? it.roll : it.length / 100}{obj?.sale_mode === 0 ? '条' : 'm'}</View> */}
|
{/* <View className={styles.itemNums}>x{obj?.sale_mode === 0 ? it.roll : it.length / 100}{obj?.sale_mode === 0 ? '条' : 'm'}</View> */}
|
||||||
{
|
{
|
||||||
obj.sale_mode == 0 && <View className={styles.itemNums}>x{obj.stage == 0 || obj.stage == 1 || obj.stage == 2
|
obj.sale_mode == 0 && <View className={styles.itemNums}>x{obj.stage == 0 || obj.stage == 1 || obj.stage == 2
|
||||||
@ -335,6 +345,50 @@ const RefundDetail = () => {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
getDetail()
|
getDetail()
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
|
// 待退款和已退款需要变更字段
|
||||||
|
const totalGoods = useMemo(() => {
|
||||||
|
if ((DeatailObj.stage == ReturnEnum.Refunded || DeatailObj.stage == ReturnEnum.RefundedBefore || DeatailObj.stage == ReturnEnum.RefundedAfter) && DeatailObj.type != ReturnType.TypeOne) {
|
||||||
|
return DeatailObj.quality_check_pass_fabrics
|
||||||
|
}
|
||||||
|
if ((DeatailObj.stage != ReturnEnum.Refunded || DeatailObj.stage != ReturnEnum.RefundedBefore || DeatailObj.stage != ReturnEnum.RefundedAfter) && DeatailObj.type != ReturnType.TypeOne) {
|
||||||
|
return DeatailObj.total_fabrics
|
||||||
|
}
|
||||||
|
if (DeatailObj.type == ReturnType.TypeOne) {
|
||||||
|
return DeatailObj.total_fabrics
|
||||||
|
}
|
||||||
|
}, [DeatailObj])
|
||||||
|
// 待退款和已退款需要变更字段
|
||||||
|
const totalColors = useMemo(() => {
|
||||||
|
if ((DeatailObj.stage == ReturnEnum.Refunded || DeatailObj.stage == ReturnEnum.RefundedBefore || DeatailObj.stage == ReturnEnum.RefundedAfter) && DeatailObj.type != ReturnType.TypeOne) {
|
||||||
|
return DeatailObj.quality_check_pass_colors
|
||||||
|
}
|
||||||
|
if ((DeatailObj.stage != ReturnEnum.Refunded || DeatailObj.stage != ReturnEnum.RefundedBefore || DeatailObj.stage != ReturnEnum.RefundedAfter) && DeatailObj.type != ReturnType.TypeOne) {
|
||||||
|
return DeatailObj.total_colors
|
||||||
|
}
|
||||||
|
if (DeatailObj.type == ReturnType.TypeOne) {
|
||||||
|
return DeatailObj.total_colors
|
||||||
|
}
|
||||||
|
}, [DeatailObj])
|
||||||
|
// 待退款和已退款需要变更字段
|
||||||
|
const totalNums = useMemo(() => {
|
||||||
|
if ((DeatailObj.stage == ReturnEnum.Refunded || DeatailObj.stage == ReturnEnum.RefundedBefore || DeatailObj.stage == ReturnEnum.RefundedAfter) && DeatailObj.sale_mode == 0 && DeatailObj.sale_mode == 0 && DeatailObj.type != ReturnType.TypeOne) {
|
||||||
|
return DeatailObj.quality_check_pass_number
|
||||||
|
}
|
||||||
|
if ((DeatailObj.stage == ReturnEnum.Refunded || DeatailObj.stage == ReturnEnum.RefundedBefore || DeatailObj.stage == ReturnEnum.RefundedAfter) && DeatailObj.sale_mode != 0 && DeatailObj.sale_mode == 0 && DeatailObj.type != ReturnType.TypeOne) {
|
||||||
|
return DeatailObj.quality_check_pass_number / 100
|
||||||
|
}
|
||||||
|
if ((DeatailObj.stage != ReturnEnum.Refunded || DeatailObj.stage != ReturnEnum.RefundedBefore || DeatailObj.stage != ReturnEnum.RefundedAfter) && DeatailObj.sale_mode == 0 && DeatailObj.sale_mode == 0 && DeatailObj.type != ReturnType.TypeOne) {
|
||||||
|
return DeatailObj.return_roll
|
||||||
|
}
|
||||||
|
if ((DeatailObj.stage != ReturnEnum.Refunded || DeatailObj.stage != ReturnEnum.RefundedBefore || DeatailObj.stage != ReturnEnum.RefundedAfter) && DeatailObj.sale_mode != 0 && DeatailObj.sale_mode == 0 && DeatailObj.type != ReturnType.TypeOne) {
|
||||||
|
return DeatailObj.total_number / 100
|
||||||
|
}
|
||||||
|
if (DeatailObj.type == ReturnType.TypeOne) {
|
||||||
|
return DeatailObj.total_number / 100
|
||||||
|
}
|
||||||
|
}, [DeatailObj])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View className={styles.main}>
|
<View className={styles.main}>
|
||||||
<OrderState orderInfo={DeatailObj} />
|
<OrderState orderInfo={DeatailObj} />
|
||||||
@ -356,9 +410,7 @@ const RefundDetail = () => {
|
|||||||
<GoodsItemWithMemo list={productList} obj={DeatailObj}></GoodsItemWithMemo>
|
<GoodsItemWithMemo list={productList} obj={DeatailObj}></GoodsItemWithMemo>
|
||||||
<View className={styles.totalBox}>
|
<View className={styles.totalBox}>
|
||||||
<View className={styles.totalLeft}>总计</View>
|
<View className={styles.totalLeft}>总计</View>
|
||||||
<View className={styles.totalRight}>{DeatailObj.total_fabrics} 种面料,{DeatailObj?.total_colors} 种颜色,共 {
|
<View className={styles.totalRight}>{totalGoods} 种面料,{totalColors} 种颜色,共 { totalNums} {DeatailObj?.sale_mode == 0 ? '条' : '米'}</View>
|
||||||
DeatailObj?.sale_mode == 0 ? DeatailObj?.return_roll : DeatailObj?.total_number / 100
|
|
||||||
} {DeatailObj?.sale_mode == 0 ? '条' : '米'}</View>
|
|
||||||
</View>
|
</View>
|
||||||
{
|
{
|
||||||
(DeatailObj.stage == 3)
|
(DeatailObj.stage == 3)
|
||||||
|
|||||||
@ -17,6 +17,16 @@ import { IMG_CND_Prefix } from '@/common/constant'
|
|||||||
import RefundCodelist from '@/components/RefundCodelist'
|
import RefundCodelist from '@/components/RefundCodelist'
|
||||||
import LabAndImg from '@/components/LabAndImg'
|
import LabAndImg from '@/components/LabAndImg'
|
||||||
|
|
||||||
|
enum ReturnEnum {
|
||||||
|
Refunded = 3, // 已退款
|
||||||
|
RefundedBefore = 5, // 待退款-确认单
|
||||||
|
RefundedAfter = 6, // 待退款
|
||||||
|
}
|
||||||
|
|
||||||
|
enum ReturnType {
|
||||||
|
TypeOne = 2, // 预收退款
|
||||||
|
}
|
||||||
|
|
||||||
interface Obs {
|
interface Obs {
|
||||||
title?: string
|
title?: string
|
||||||
modeName?: string
|
modeName?: string
|
||||||
@ -293,6 +303,50 @@ const RefundMoneyDetail = () => {
|
|||||||
usePullDownRefresh(() => {
|
usePullDownRefresh(() => {
|
||||||
getDetail()
|
getDetail()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 待退款和已退款需要变更字段
|
||||||
|
const totalGoods = useMemo(() => {
|
||||||
|
if ((DeatailObj.stage == ReturnEnum.Refunded || DeatailObj.stage == ReturnEnum.RefundedBefore || DeatailObj.stage == ReturnEnum.RefundedAfter) && DeatailObj.type != ReturnType.TypeOne) {
|
||||||
|
return DeatailObj.quality_check_pass_fabrics
|
||||||
|
}
|
||||||
|
if ((DeatailObj.stage != ReturnEnum.Refunded || DeatailObj.stage != ReturnEnum.RefundedBefore || DeatailObj.stage != ReturnEnum.RefundedAfter) && DeatailObj.type != ReturnType.TypeOne) {
|
||||||
|
return DeatailObj.total_fabrics
|
||||||
|
}
|
||||||
|
if (DeatailObj.type == ReturnType.TypeOne) {
|
||||||
|
return DeatailObj.total_fabrics
|
||||||
|
}
|
||||||
|
}, [DeatailObj])
|
||||||
|
// 待退款和已退款需要变更字段
|
||||||
|
const totalColors = useMemo(() => {
|
||||||
|
if ((DeatailObj.stage == ReturnEnum.Refunded || DeatailObj.stage == ReturnEnum.RefundedBefore || DeatailObj.stage == ReturnEnum.RefundedAfter) && DeatailObj.type != ReturnType.TypeOne) {
|
||||||
|
return DeatailObj.quality_check_pass_colors
|
||||||
|
}
|
||||||
|
if ((DeatailObj.stage != ReturnEnum.Refunded || DeatailObj.stage != ReturnEnum.RefundedBefore || DeatailObj.stage != ReturnEnum.RefundedAfter) && DeatailObj.type != ReturnType.TypeOne) {
|
||||||
|
return DeatailObj.total_colors
|
||||||
|
}
|
||||||
|
if (DeatailObj.type == ReturnType.TypeOne) {
|
||||||
|
return DeatailObj.total_colors
|
||||||
|
}
|
||||||
|
}, [DeatailObj])
|
||||||
|
// 待退款和已退款需要变更字段
|
||||||
|
const totalNums = useMemo(() => {
|
||||||
|
if ((DeatailObj.stage == ReturnEnum.Refunded || DeatailObj.stage == ReturnEnum.RefundedBefore || DeatailObj.stage == ReturnEnum.RefundedAfter) && DeatailObj.sale_mode == 0 && DeatailObj.sale_mode == 0 && DeatailObj.type != ReturnType.TypeOne) {
|
||||||
|
return DeatailObj.quality_check_pass_number
|
||||||
|
}
|
||||||
|
if ((DeatailObj.stage == ReturnEnum.Refunded || DeatailObj.stage == ReturnEnum.RefundedBefore || DeatailObj.stage == ReturnEnum.RefundedAfter) && DeatailObj.sale_mode != 0 && DeatailObj.sale_mode == 0 && DeatailObj.type != ReturnType.TypeOne) {
|
||||||
|
return DeatailObj.quality_check_pass_number / 100
|
||||||
|
}
|
||||||
|
if ((DeatailObj.stage != ReturnEnum.Refunded || DeatailObj.stage != ReturnEnum.RefundedBefore || DeatailObj.stage != ReturnEnum.RefundedAfter) && DeatailObj.sale_mode == 0 && DeatailObj.sale_mode == 0 && DeatailObj.type != ReturnType.TypeOne) {
|
||||||
|
return DeatailObj.return_roll
|
||||||
|
}
|
||||||
|
if ((DeatailObj.stage != ReturnEnum.Refunded || DeatailObj.stage != ReturnEnum.RefundedBefore || DeatailObj.stage != ReturnEnum.RefundedAfter) && DeatailObj.sale_mode != 0 && DeatailObj.sale_mode == 0 && DeatailObj.type != ReturnType.TypeOne) {
|
||||||
|
return DeatailObj.total_number / 100
|
||||||
|
}
|
||||||
|
if (DeatailObj.type == ReturnType.TypeOne) {
|
||||||
|
return DeatailObj.total_number / 100
|
||||||
|
}
|
||||||
|
}, [DeatailObj])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View className={styles.main}>
|
<View className={styles.main}>
|
||||||
<OrderState orderInfo={DeatailObj} />
|
<OrderState orderInfo={DeatailObj} />
|
||||||
@ -314,9 +368,7 @@ const RefundMoneyDetail = () => {
|
|||||||
<GoodsItemWithMemo list={productList} obj={DeatailObj}></GoodsItemWithMemo>
|
<GoodsItemWithMemo list={productList} obj={DeatailObj}></GoodsItemWithMemo>
|
||||||
<View className={styles.totalBox}>
|
<View className={styles.totalBox}>
|
||||||
<View className={styles.totalLeft}>总计</View>
|
<View className={styles.totalLeft}>总计</View>
|
||||||
<View className={styles.totalRight}>{DeatailObj.total_fabrics} 种面料,{DeatailObj?.total_colors} 种颜色,共 {
|
<View className={styles.totalRight}>{totalGoods} 种面料,{totalColors} 种颜色,共 { totalNums} {DeatailObj?.sale_mode == 0 ? '条' : '米'}</View>
|
||||||
DeatailObj?.sale_mode == 0 ? DeatailObj?.return_roll : DeatailObj?.total_number / 100
|
|
||||||
} {DeatailObj?.sale_mode == 0 ? '条' : '米'}</View>
|
|
||||||
</View>
|
</View>
|
||||||
{
|
{
|
||||||
DeatailObj.stage == 0 && <View className={styles.totalBox}>
|
DeatailObj.stage == 0 && <View className={styles.totalBox}>
|
||||||
|
|||||||
@ -7,6 +7,15 @@ import styles from './index.module.scss'
|
|||||||
import { formatPriceDiv } from '@/common/format'
|
import { formatPriceDiv } from '@/common/format'
|
||||||
import LabAndImg from '@/components/LabAndImg'
|
import LabAndImg from '@/components/LabAndImg'
|
||||||
|
|
||||||
|
enum ReturnEnum {
|
||||||
|
Refunded = 3, // 已退款
|
||||||
|
RefundedBefore = 5, // 待退款-确认单
|
||||||
|
RefundedAfter = 6, // 待退款
|
||||||
|
}
|
||||||
|
|
||||||
|
enum ReturnType {
|
||||||
|
TypeOne = 2, // 预收退款
|
||||||
|
}
|
||||||
interface propsObj {
|
interface propsObj {
|
||||||
obj: any
|
obj: any
|
||||||
cancle?: (arg: any, obj: any) => void
|
cancle?: (arg: any, obj: any) => void
|
||||||
@ -32,6 +41,88 @@ const ItemList = (props: propsObj) => {
|
|||||||
return { lab: item.lab, rgb: item.rgb, texture_url: item.texture_url }
|
return { lab: item.lab, rgb: item.rgb, texture_url: item.texture_url }
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
|
// 待退款和已退款需要变更字段
|
||||||
|
const totalGoods = useMemo(() => {
|
||||||
|
if ((props?.obj.stage == ReturnEnum.Refunded || props?.obj.stage == ReturnEnum.RefundedBefore || props?.obj.stage == ReturnEnum.RefundedAfter) && props?.obj.type != ReturnType.TypeOne) {
|
||||||
|
return props?.obj.quality_check_pass_fabrics
|
||||||
|
}
|
||||||
|
if ((props?.obj.stage != ReturnEnum.Refunded || props?.obj.stage != ReturnEnum.RefundedBefore || props?.obj.stage != ReturnEnum.RefundedAfter) && props?.obj.type != ReturnType.TypeOne) {
|
||||||
|
return props?.obj.total_fabrics
|
||||||
|
}
|
||||||
|
if (props?.obj.type == ReturnType.TypeOne) {
|
||||||
|
return props?.obj.total_fabrics
|
||||||
|
}
|
||||||
|
}, [props?.obj])
|
||||||
|
// 待退款和已退款需要变更字段
|
||||||
|
const totalColors = useMemo(() => {
|
||||||
|
if ((props?.obj.stage == ReturnEnum.Refunded || props?.obj.stage == ReturnEnum.RefundedBefore || props?.obj.stage == ReturnEnum.RefundedAfter) && props?.obj.type != ReturnType.TypeOne) {
|
||||||
|
return props?.obj.quality_check_pass_colors
|
||||||
|
}
|
||||||
|
if ((props?.obj.stage != ReturnEnum.Refunded || props?.obj.stage != ReturnEnum.RefundedBefore || props?.obj.stage != ReturnEnum.RefundedAfter) && props?.obj.type != ReturnType.TypeOne) {
|
||||||
|
return props?.obj.total_colors
|
||||||
|
}
|
||||||
|
if (props?.obj.type == ReturnType.TypeOne) {
|
||||||
|
return props?.obj.total_colors
|
||||||
|
}
|
||||||
|
}, [props?.obj])
|
||||||
|
// 待退款和已退款需要变更字段
|
||||||
|
const totalNums = useMemo(() => {
|
||||||
|
if ((props?.obj.stage == ReturnEnum.Refunded || props?.obj.stage == ReturnEnum.RefundedBefore || props?.obj.stage == ReturnEnum.RefundedAfter) && props?.obj.sale_mode == 0 && props?.obj.type != ReturnType.TypeOne) {
|
||||||
|
return props?.obj.quality_check_pass_number
|
||||||
|
}
|
||||||
|
if ((props?.obj.stage == ReturnEnum.Refunded || props?.obj.stage == ReturnEnum.RefundedBefore || props?.obj.stage == ReturnEnum.RefundedAfter) && props?.obj.sale_mode != 0 && props?.obj.type != ReturnType.TypeOne) {
|
||||||
|
return props?.obj.quality_check_pass_number / 100
|
||||||
|
}
|
||||||
|
if ((props?.obj.stage != ReturnEnum.Refunded || props?.obj.stage != ReturnEnum.RefundedBefore || props?.obj.stage != ReturnEnum.RefundedAfter) && props?.obj.sale_mode == 0 && props?.obj.type != ReturnType.TypeOne) {
|
||||||
|
return props?.obj.total_number
|
||||||
|
}
|
||||||
|
if ((props?.obj.stage != ReturnEnum.Refunded || props?.obj.stage != ReturnEnum.RefundedBefore || props?.obj.stage != ReturnEnum.RefundedAfter) && props?.obj.sale_mode != 0 && props?.obj.type != ReturnType.TypeOne) {
|
||||||
|
return props?.obj.total_number / 100
|
||||||
|
}
|
||||||
|
if (props?.obj.type == ReturnType.TypeOne) {
|
||||||
|
return props?.obj.total_number / 100
|
||||||
|
}
|
||||||
|
}, [props?.obj])
|
||||||
|
|
||||||
|
// 注意这些判断都是要配合后端一起判断的恶心代码
|
||||||
|
// 证明不是前端的问题
|
||||||
|
// 列表条数
|
||||||
|
const itemOneNums = useMemo(() => {
|
||||||
|
if ((props?.obj.stage == ReturnEnum.Refunded || props?.obj.stage == ReturnEnum.RefundedBefore || props?.obj.stage == ReturnEnum.RefundedAfter) && props?.obj.sale_mode == 0 && props?.obj.type != ReturnType.TypeOne) {
|
||||||
|
return props?.obj?.quality_check_pass_product[0]?.product_colors[0]?.return_roll
|
||||||
|
}
|
||||||
|
if ((props?.obj.stage != ReturnEnum.Refunded || props?.obj.stage != ReturnEnum.RefundedBefore || props?.obj.stage != ReturnEnum.RefundedAfter) && props?.obj.sale_mode == 0 && props?.obj.type != ReturnType.TypeOne) {
|
||||||
|
return props?.obj?.product_list[0]?.product_colors[0]?.roll
|
||||||
|
}
|
||||||
|
if ((props?.obj.stage == ReturnEnum.Refunded || props?.obj.stage == ReturnEnum.RefundedBefore || props?.obj.stage == ReturnEnum.RefundedAfter) && props?.obj.sale_mode != 0 && props?.obj.type != ReturnType.TypeOne) {
|
||||||
|
return props?.obj?.quality_check_pass_product[0]?.product_colors[0]?.length / 100
|
||||||
|
}
|
||||||
|
if ((props?.obj.stage != ReturnEnum.Refunded || props?.obj.stage != ReturnEnum.RefundedBefore || props?.obj.stage != ReturnEnum.RefundedAfter) && props?.obj.sale_mode != 0 && props?.obj.type != ReturnType.TypeOne) {
|
||||||
|
return props?.obj?.product_list[0]?.product_colors[0]?.length / 100
|
||||||
|
}
|
||||||
|
if (props?.obj.type == ReturnType.TypeOne) {
|
||||||
|
return props?.obj?.product_list[0]?.product_colors[0]?.length / 100
|
||||||
|
}
|
||||||
|
}, [props?.obj])
|
||||||
|
|
||||||
|
const itemTwoNums = useMemo(() => {
|
||||||
|
if ((props?.obj.stage == ReturnEnum.Refunded || props?.obj.stage == ReturnEnum.RefundedBefore || props?.obj.stage == ReturnEnum.RefundedAfter) && props?.obj.sale_mode == 0 && props?.obj.type != ReturnType.TypeOne) {
|
||||||
|
return props?.obj?.quality_check_pass_product[0]?.product_colors[1]?.return_roll
|
||||||
|
}
|
||||||
|
if ((props?.obj.stage != ReturnEnum.Refunded || props?.obj.stage != ReturnEnum.RefundedBefore || props?.obj.stage != ReturnEnum.RefundedAfter) && props?.obj.sale_mode == 0 && props?.obj.type != ReturnType.TypeOne) {
|
||||||
|
return props?.obj?.product_list[0]?.product_colors[1]?.roll
|
||||||
|
}
|
||||||
|
if ((props?.obj.stage == ReturnEnum.Refunded || props?.obj.stage == ReturnEnum.RefundedBefore || props?.obj.stage == ReturnEnum.RefundedAfter) && props?.obj.sale_mode != 0 && props?.obj.type != ReturnType.TypeOne) {
|
||||||
|
return props?.obj?.quality_check_pass_product[0]?.product_colors[1]?.length / 100
|
||||||
|
}
|
||||||
|
if ((props?.obj.stage != ReturnEnum.Refunded || props?.obj.stage != ReturnEnum.RefundedBefore || props?.obj.stage != ReturnEnum.RefundedAfter) && props?.obj.sale_mode != 0 && props?.obj.type != ReturnType.TypeOne) {
|
||||||
|
return props?.obj?.product_list[0]?.product_colors[1]?.length / 100
|
||||||
|
}
|
||||||
|
if (props?.obj.type == ReturnType.TypeOne) {
|
||||||
|
return props?.obj?.product_list[0]?.product_colors[1]?.length / 100
|
||||||
|
}
|
||||||
|
}, [props?.obj])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View className={styles.itemBox} onClick={() => navTo(props.obj)}>
|
<View className={styles.itemBox} onClick={() => navTo(props.obj)}>
|
||||||
<View className={styles.topItem}>
|
<View className={styles.topItem}>
|
||||||
@ -66,36 +157,14 @@ const ItemList = (props: propsObj) => {
|
|||||||
</View>
|
</View>
|
||||||
<View className={styles.colorsBox}>
|
<View className={styles.colorsBox}>
|
||||||
<View className={styles.colorNameOne}>{props?.obj?.product_list[0]?.product_colors[0]?.code} {props?.obj?.product_list[0]?.product_colors[0]?.name}</View>
|
<View className={styles.colorNameOne}>{props?.obj?.product_list[0]?.product_colors[0]?.code} {props?.obj?.product_list[0]?.product_colors[0]?.name}</View>
|
||||||
<View className={styles.colorName}>x{
|
<View className={styles.colorName}>x{ itemOneNums } {props?.obj?.sale_mode === 0 ? '条' : 'm'}</View>
|
||||||
props?.obj?.product_list && props?.obj.sale_mode === 0
|
|
||||||
? (props?.obj?.product_list && props?.obj.stage == 0)
|
|
||||||
|| props?.obj.stage == 1
|
|
||||||
|| props?.obj.stage == 2
|
|
||||||
? props?.obj?.product_list[0]?.product_colors[0]?.roll
|
|
||||||
: props?.obj.stage == 5 || props?.obj.stage == 6 || props?.obj.stage == 3
|
|
||||||
? props?.obj?.product_list[0]?.product_colors[0]?.return_roll
|
|
||||||
: props?.obj?.product_list[0]?.product_colors[0]?.roll
|
|
||||||
: props?.obj?.product_list
|
|
||||||
&& props?.obj?.product_list[0]?.product_colors[0]?.length / 100
|
|
||||||
} {props?.obj?.sale_mode === 0 ? '条' : 'm'}</View>
|
|
||||||
<View className={styles.colorNameTwo}>¥ {props?.obj?.product_list[0]?.product_colors[0]?.sale_price / 100}/kg</View>
|
<View className={styles.colorNameTwo}>¥ {props?.obj?.product_list[0]?.product_colors[0]?.sale_price / 100}/kg</View>
|
||||||
</View>
|
</View>
|
||||||
{
|
{
|
||||||
props?.obj?.product_list[0]?.product_colors?.length > 1 && <>
|
props?.obj?.product_list[0]?.product_colors?.length > 1 && <>
|
||||||
<View className={styles.colorsBox}>
|
<View className={styles.colorsBox}>
|
||||||
<View className={styles.colorNameOne}>{props?.obj?.product_list[0]?.product_colors[1]?.code} {props?.obj?.product_list[0]?.product_colors[1]?.name}</View>
|
<View className={styles.colorNameOne}>{props?.obj?.product_list[0]?.product_colors[1]?.code} {props?.obj?.product_list[0]?.product_colors[1]?.name}</View>
|
||||||
<View className={styles.colorName}>x{
|
<View className={styles.colorName}>x{ itemTwoNums } {props?.obj?.sale_mode === 0 ? '条' : 'm'}</View>
|
||||||
props?.obj?.product_list && props?.obj.sale_mode === 0
|
|
||||||
? (props?.obj?.product_list && props?.obj.stage == 0)
|
|
||||||
|| props?.obj.stage == 1
|
|
||||||
|| props?.obj.stage == 2
|
|
||||||
? props?.obj?.product_list[0]?.product_colors[1]?.roll
|
|
||||||
: props?.obj.stage == 5 || props?.obj.stage == 6 || props?.obj.stage == 3
|
|
||||||
? props?.obj?.product_list[0]?.product_colors[1]?.return_roll
|
|
||||||
: props?.obj?.product_list[0]?.product_colors[1]?.roll
|
|
||||||
: props?.obj?.product_list
|
|
||||||
&& props?.obj?.product_list[0]?.product_colors[1]?.length / 100
|
|
||||||
} {props?.obj?.sale_mode === 0 ? '条' : 'm'}</View>
|
|
||||||
<View className={styles.colorNameTwo}>¥ {props?.obj?.product_list[0]?.product_colors[1]?.sale_price / 100}/kg</View>
|
<View className={styles.colorNameTwo}>¥ {props?.obj?.product_list[0]?.product_colors[1]?.sale_price / 100}/kg</View>
|
||||||
</View>
|
</View>
|
||||||
</>
|
</>
|
||||||
@ -105,9 +174,7 @@ const ItemList = (props: propsObj) => {
|
|||||||
<View className={styles.lineOne}></View>
|
<View className={styles.lineOne}></View>
|
||||||
<View className={styles.bottomMsg}>
|
<View className={styles.bottomMsg}>
|
||||||
<View className={styles.msgLeft}>布料信息:</View>
|
<View className={styles.msgLeft}>布料信息:</View>
|
||||||
<View className={styles.msgRight}>{props?.obj?.total_fabrics} 种面料,{
|
<View className={styles.msgRight}>{totalGoods} 种面料,{totalColors} 种颜色,共 {totalNums} {props?.obj?.sale_mode === 0 ? '条' : 'm'}</View>
|
||||||
props?.obj?.total_colors
|
|
||||||
} 种颜色,共 {props?.obj?.sale_mode === 0 ? props?.obj?.total_number : props?.obj?.total_number / 100} {props?.obj?.sale_mode === 0 ? '条' : 'm'}</View>
|
|
||||||
</View>
|
</View>
|
||||||
{
|
{
|
||||||
(props?.obj.stage == 3) && <View className={styles.bottomMsg}>
|
(props?.obj.stage == 3) && <View className={styles.bottomMsg}>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user