联动组件优化

This commit is contained in:
2022-07-13 20:15:35 +08:00
parent 33016fca85
commit b8f78eea71
22 changed files with 117 additions and 48 deletions
@@ -1,5 +1,5 @@
import { goLink } from "@/common/common";
import { REFUND_STATUS_ORDER } from "@/common/enum";
import { AFTER_ORDER_STATUS, REFUND_STATUS_ORDER } from "@/common/enum";
import { formatHashTag, formatImgUrl, formatPriceDiv } from "@/common/fotmat";
import AfterOrderBtns from "@/components/afterOrderBtns";
import LabAndImg from "@/components/LabAndImg";
@@ -74,6 +74,12 @@ export default memo(({value, onClickBtn}: Param) => {
return `${value?.total_fabrics}种面料,${value?.total_colors}种颜色,共${total_number_new}${value?.sale_mode == 0? '条':'米'}`
}, [value])
//售后单状态
const {ReturnStageQualityCheckPendingRefund, ReturnStageServiceOrderPendingRefund} = AFTER_ORDER_STATUS
const stage_name = useMemo(() => {
return [ReturnStageQualityCheckPendingRefund.value, ReturnStageServiceOrderPendingRefund.value].includes(value?.stage)?'待退款':value?.stage_name
}, [value])
return (
<View className={styles.order_item}>
<View className={styles.header} onClick={() => goLink('/pages/salesAfter/index', {id: value?.id})}>
@@ -95,7 +101,7 @@ export default memo(({value, onClickBtn}: Param) => {
<View className={styles.product_title}>
<View className={styles.product_tag}>{value?.sale_mode_name}</View>
<View className={styles.product_name}>{formatHashTag(value?.product_list?.[0].code, value?.product_list?.[0].name)}</View>
<View className={styles.product_status}>{value?.stage_name}</View>
<View className={styles.product_status}>{stage_name}</View>
</View>
<View className={styles.product_list}>
<View className={styles.image}>
+2
View File
@@ -111,6 +111,8 @@ export default () => {
//显示记录
const [applyRecord, setApplyRecord] = useState(false)
return (
<View className={styles.order_list_main}>
<View className={styles.title}>