商城测试版v7

This commit is contained in:
2022-07-23 21:20:18 +08:00
parent c4684c11b8
commit 7e12050a94
20 changed files with 129 additions and 100 deletions
+2
View File
@@ -43,8 +43,10 @@ export default memo(({value, onClick, showStatus = false}:Param) => {
setLabAndImgShow(false)
}, [])
const onShowLabAndImg = () => {
onClick?.(value)
if(!showStatus) return false
setLabAndImgShow(true)
}
return (
+7 -7
View File
@@ -63,13 +63,13 @@ export default memo(({orderInfo, onClick, fixedBottom = true}:Param) => {
return orderInfo?.is_quality_check
}
},
{
id: 5,
label: '上传物流',
validatarFunc: (orderInfo) => {
return orderInfo?.stage == ReturnStageWaitCheck.value
}
},
// {
// id: 5,
// label: '上传物流',
// validatarFunc: (orderInfo) => {
// return orderInfo?.stage == ReturnStageWaitCheck.value
// }
// },
{
id: 6,
label: '取消退款',
+6 -3
View File
@@ -1,6 +1,6 @@
import { View } from "@tarojs/components"
import classnames from "classnames";
import { useEffect, useState } from "react";
import { forwardRef, useEffect, useImperativeHandle, useState } from "react";
import styles from "./index.module.scss"
type params = {
@@ -9,7 +9,7 @@ type params = {
status?: false|true //是否选中
disabled?: false|true //是否禁用
}
export default ({onSelect, onClose, status = false, disabled = false}: params) => {
export default forwardRef(({onSelect, onClose, status = false, disabled = false}: params, ref) => {
const [selected, SetSelected] = useState(false)
const onSelectEven = () => {
if(disabled) return false
@@ -21,6 +21,9 @@ export default ({onSelect, onClose, status = false, disabled = false}: params) =
}
SetSelected(res)
}
useImperativeHandle(ref, () => ({
onSelectEven
}))
useEffect(() => {
SetSelected(status)
}, [status])
@@ -33,4 +36,4 @@ export default ({onSelect, onClose, status = false, disabled = false}: params) =
</View>
</>
)
}
})
+2
View File
@@ -45,6 +45,7 @@
color: $color_main;
background: #ecf5ff;
border: 2px solid #007aff;
box-sizing: border-box;
width: 161.75px;
height: 65.2px;
}
@@ -102,6 +103,7 @@
width: 552px;
height: 82px;
border: 2px solid #cde5ff;
box-sizing: border-box;
font-size: $font_size_big;
border-radius: 40px;
margin-bottom: 20px;
+18 -2
View File
@@ -273,6 +273,17 @@ export default ({show = false, onClose, intoStatus='shop'}: param) => {
//绑定业务员和电话号码
const [showBindSalesman, setShowBindSalesman] = useState(false)
//显示图片弹窗
const [showLabImage, setShowLabImage] = useState(false)
const [labImageValue, setLabImageValue] = useState()
const getLabAndImg = useCallback((val) => {
setShowLabImage(() => true)
setLabImageValue(val)
}, [])
const closeLabImgShow = useCallback(() => {
setShowLabImage(() => false)
}, [])
return (
<View className={styles.shop_cart_main}>
<Popup showTitle={false} show={showPopup} onClose={() => closePopup()} >
@@ -300,7 +311,7 @@ export default ({show = false, onClose, intoStatus='shop'}: param) => {
<MCheckbox disabled={selectIndex!=-1&&selectIndex!=item.sale_mode} status={!!checkboxData[item.id]} onSelect={() => selectCallBack(item)} onClose={() => colseCallBack(item)}/>
</View>
<View className={styles.img}>
<LabAndImg value={{lab:item.lab,rgb:item.rgb,texture_url:item.texture_url, title:item.product_color_code}}/>
<LabAndImg value={{lab:item.lab,rgb:item.rgb,texture_url:item.texture_url, title:item.product_color_code}} showStatus={false} onClick={getLabAndImg}/>
</View>
<View className={styles.product_item_name}>
<View className={styles.product_item_name_header}>
@@ -353,7 +364,12 @@ export default ({show = false, onClose, intoStatus='shop'}: param) => {
</View>
</View>
</Popup>
<BindSalesmanPopup show={showBindSalesman} onClose={() => setShowBindSalesman(false)}/>
<View>
<BindSalesmanPopup show={showBindSalesman} onClose={() => setShowBindSalesman(false)}/>
</View>
<View>
<LabAndImgShow value={labImageValue} show={showLabImage} onClose={closeLabImgShow}/>
</View>
</View>
)
}