商城测试版v7

This commit is contained in:
2022-07-22 20:46:40 +08:00
parent c646bac0a4
commit c4684c11b8
19 changed files with 142 additions and 130 deletions
@@ -31,6 +31,7 @@ type Param = {
type: number //2 退货 1 预收退款 3 销售
return_apply_order_id: number //退款申请单
refund_amount: number // 退款金额
is_quality_check: true|false
},
onClickBtn?: (val:{status:number, orderInfo:Param['value']}) => void
}
@@ -52,13 +53,7 @@ export default memo(({value, onClickBtn}: Param) => {
//按钮所需数据
const orderInfo = useMemo(() => {
return {
stage: value?.stage, //订单状态
orderId: value?.id,
sale_mode: value?.sale_mode, //订单类型
type: value?.type, //退货or退款
return_apply_order_id: value?.return_apply_order_id //退款申请单
}
return value
}, [value])
//整理颜色
@@ -110,11 +105,11 @@ export default memo(({value, onClickBtn}: Param) => {
<View className={styles.color_num}>{value?.product_list?.[0].product_colors?.[0].code}</View>
</View>
<View className={styles.color_list}>
{value?.product_list?.[0].product_colors.map((itemColor, index) => {
{value?.product_list?.[0].product_colors?.map((itemColor, index) => {
return (
(index <= 1)&&<View className={styles.color_item}>
<View className={styles.color_title}>{formatHashTag(itemColor.code, itemColor.name)}</View>
<View className={styles.color_price}>{standardPrice(itemColor.sale_price, value.sale_mode)}</View>
<View className={styles.color_price}>¥{standardPrice(itemColor.sale_price, value.sale_mode)}</View>
<View className={styles.color_num}>×{formatCount(itemColor, value.sale_mode)}</View>
</View>
)
@@ -129,7 +124,7 @@ export default memo(({value, onClickBtn}: Param) => {
</View>
<View className={styles.color_count_num}>
<Text>{numText}</Text>
{ReturnStageReturned.value == value?.stage && <Text className={styles.refund_amount}><Text>¥</Text>{formatPriceDiv(value?.refund_amount, 100, true)}</Text>}
{/* {ReturnStageReturned.value == value?.stage && <Text className={styles.refund_amount}><Text>¥</Text>{formatPriceDiv(value?.refund_amount, 100, true)}</Text>} */}
</View>
<View className={styles.order_number}>
<Text>{value?.type == ReturnApplyOrderTypeReturnForRefund.value?'已申请退货':'已申请退款'}</Text>