✨ feat:状态按钮重新对接完成进度20%
This commit is contained in:
@@ -6,7 +6,8 @@ interface prosObj {
|
||||
sale_mode?: Number,
|
||||
collect_status?: Number | string,
|
||||
status?: Number,
|
||||
payment_method?: Number
|
||||
payment_method?: Number,
|
||||
settle_mode?: Number | string,
|
||||
}
|
||||
cancle?: (any) => void,
|
||||
nextBuy?: (any) => void,
|
||||
@@ -20,22 +21,27 @@ export default memo((props: prosObj) => {
|
||||
collect_status: '',
|
||||
status: '',
|
||||
payment_method: 0,
|
||||
settle_mode: ''
|
||||
},
|
||||
cancle,
|
||||
nextBuy,
|
||||
toPay
|
||||
} = props
|
||||
//判断显示取消订单
|
||||
|
||||
const showCancel = useMemo(() => {
|
||||
if (
|
||||
(obj.sale_mode === 0 && obj.status === 0) ||
|
||||
(obj.sale_mode === 0 && obj.status === 1) ||
|
||||
(obj.sale_mode === 0 && obj.status === 2) ||
|
||||
(obj.sale_mode === 0 && obj.status === 11 && obj.collect_status == 0) ||
|
||||
(obj.sale_mode === 0 && obj.status === 2 && obj.collect_status == 0) ||
|
||||
(obj.sale_mode === 0 && obj.status === 7 && obj.collect_status == 0) ||
|
||||
(obj.sale_mode === 0 && obj.status === 3 && (obj.payment_method == 3 || obj.payment_method == 5)) ||
|
||||
(obj.sale_mode === 0 && obj.status === 11 && obj.collect_status == 0) ||
|
||||
(obj.sale_mode === 0 && obj.status === 11 && obj.settle_mode == 3) ||
|
||||
(obj.sale_mode === 0 && obj.status === 3 && obj.settle_mode == 3) ||
|
||||
(obj.sale_mode === 1 && obj.status === 10) ||
|
||||
(obj.sale_mode === 2 && obj.status === 10)
|
||||
(obj.sale_mode === 2 && obj.status === 10) ||
|
||||
(obj.sale_mode === 2 && obj.status === 0 && (obj.collect_status == 1 || obj.collect_status == 2)) ||
|
||||
(obj.sale_mode === 2 && obj.status === 0 && obj.collect_status == 0)
|
||||
) {
|
||||
return true
|
||||
} else return false
|
||||
@@ -58,6 +64,7 @@ export default memo((props: prosObj) => {
|
||||
(obj.sale_mode === 0 && obj.status === 3 && (obj.payment_method == 3 || obj.payment_method == 5)) ||
|
||||
(obj.sale_mode === 0 && obj.status === 8 && (obj.payment_method == 3 || obj.payment_method == 5 || obj.collect_status == 1)) ||
|
||||
(obj.sale_mode === 0 && obj.status === 9 && (obj.payment_method == 3 || obj.payment_method == 5 || obj.collect_status == 1)) ||
|
||||
(obj.sale_mode === 0 && obj.status === 7 && obj.collect_status == 0) ||
|
||||
(obj.sale_mode === 2 && obj.status === 7)
|
||||
) {
|
||||
return true
|
||||
|
||||
@@ -32,11 +32,17 @@ export default memo((props: props) => {
|
||||
|
||||
const onInputEven = (e) => {
|
||||
let res = e.detail.value
|
||||
if (props.modeFont !== 2) {
|
||||
if (Number(res) == 0 || Number(res) < 1) {
|
||||
if (props.modeFont == 0) {
|
||||
if (Number(res) < 0) {
|
||||
setValue({ count: 1 })
|
||||
}
|
||||
} else {
|
||||
}
|
||||
if (props.modeFont == 1) {
|
||||
if (Number(res) < 0) {
|
||||
setValue({ count: 0.5 })
|
||||
}
|
||||
}
|
||||
if (props.modeFont == 2) {
|
||||
if (Number(res) == 0 || Number(res) < 3) {
|
||||
setValue({ count: 3 })
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { View } from '@tarojs/components'
|
||||
import style from './index.module.scss'
|
||||
import classnames from 'classnames'
|
||||
import { memo, ReactNode, useEffect, useMemo, useRef } from 'react'
|
||||
import { memo, ReactNode, useEffect, useMemo, useRef, useState } from 'react'
|
||||
import CloseBtnIcon from '@/components/closeBtn'
|
||||
|
||||
export interface Params {
|
||||
@@ -13,10 +13,11 @@ export interface Params {
|
||||
// IconButton?: ReactNode, //
|
||||
showIconButton?: false | true //是否显示关闭按钮
|
||||
position?: 'bottom' | 'top' | 'right' //弹出位置
|
||||
animationEnd?: () => void //弹出动画结束
|
||||
animationEnd?: () => void, //弹出动画结束
|
||||
isFixed?: boolean //二次弹窗触发
|
||||
}
|
||||
export default memo(
|
||||
({ title = '标题', show = false, showTitle = true, onClose, showIconButton = false, children, position = 'bottom', animationEnd }: Params) => {
|
||||
({ title = '标题', show = false, showTitle = true, isFixed = false, onClose, showIconButton = false, children, position = 'bottom', animationEnd }: Params) => {
|
||||
const animationTime = useRef<any>(null)
|
||||
useEffect(() => {
|
||||
if (show) {
|
||||
@@ -30,16 +31,19 @@ export default memo(
|
||||
|
||||
useEffect(() => {
|
||||
return () => {
|
||||
|
||||
clearTimeout(animationTime.current)
|
||||
}
|
||||
}, [])
|
||||
|
||||
const [ShowContext, setShowContext] = useState(false)
|
||||
return (
|
||||
<>
|
||||
<View className={style.drawer_main}>
|
||||
<View catchMove={true} className={`${style.drawer} ${show ? style.drawer_active : ''}`}>
|
||||
<View className={classnames(style.drawer_mask, { [style.drawer_mask_active]: show })} onClick={() => onClose?.()}>
|
||||
<View
|
||||
style={{ position: `${isFixed == true ? 'fixed' : 'absolute'}`, }}
|
||||
className={classnames(style.drawer_container, style['drawer_container_' + position], { [style.drawer_container_active]: show })}
|
||||
onClick={(e) => e.stopPropagation()}>
|
||||
{showTitle && <View className={style.drawer_container_title}>{title}</View>}
|
||||
@@ -48,7 +52,6 @@ export default memo(
|
||||
<CloseBtnIcon onClose={() => onClose?.()} />
|
||||
</View>
|
||||
)}
|
||||
|
||||
<View className={style.drawer_container_context}>{children}</View>
|
||||
<View className='common_safe_area_y'></View>
|
||||
</View>
|
||||
|
||||
@@ -141,7 +141,7 @@ export default memo(forwardRef((props: prosObj, ref) => {
|
||||
<View className={styles.danwei}>{modeFont == 0 ? '大货' : modeFont == 1 ? '剪版' : '散剪'}单位:{showModefont}</View>
|
||||
</View>
|
||||
<View className={styles.searchBox}>
|
||||
<Search placeholder='请输入搜索布料' showBtn={false} changeOnSearch={getSearchData} debounceTime={300} />
|
||||
<Search placeholder='请输入搜索布料' showBtn={false} changeOnSearch={getSearchData} debounceTime={300} adjustPosition={true} />
|
||||
</View>
|
||||
{
|
||||
goodList.length > 0 && <>
|
||||
|
||||
@@ -65,6 +65,18 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
.bigBoxThree {
|
||||
width: 100%;
|
||||
// position: fixed;
|
||||
// bottom: 0px;
|
||||
// z-index: 999;
|
||||
height: 150px;
|
||||
|
||||
.itemBox {
|
||||
width: 100%;
|
||||
height: 88px;
|
||||
|
||||
@@ -84,30 +84,35 @@ const PictureItem = memo<ImageParam>(({ onChange, defaultList, onlyRead = false
|
||||
}
|
||||
|
||||
return (
|
||||
<View className={styles.image_main}>
|
||||
{imageList?.map((item, index) => (
|
||||
<View className={styles.ImgItem}>
|
||||
<Image mode='aspectFill' src={formatImgUrl(item)} onClick={showImage}></Image>
|
||||
{!onlyRead && <View onClick={() => delImage(index)} className={classnames(styles.miconfont_close, 'iconfont icon-guanbi')}></View>}
|
||||
<>
|
||||
<View className={styles.image_main}>
|
||||
{imageList?.map((item, index) => (
|
||||
<View className={styles.ImgItem}>
|
||||
<Image mode='aspectFill' src={formatImgUrl(item)} onClick={showImage}></Image>
|
||||
{!onlyRead && <View onClick={() => delImage(index)} className={classnames(styles.miconfont_close, 'iconfont icon-guanbi')}></View>}
|
||||
</View>
|
||||
))}
|
||||
{!onlyRead && (
|
||||
<View className={styles.uploadImg} onClick={uploadImage}>
|
||||
<Text className={classnames(styles.miconfont, 'iconfont icon-xinzeng')}></Text>
|
||||
{/* <Text className={styles.uploadText}>上传照片</Text> */}
|
||||
</View>
|
||||
)}
|
||||
|
||||
</View>
|
||||
<Popup title={'选择方式'} show={showPopup} onClose={() => setshowPopup(false)} isFixed={true}>
|
||||
<View className={styles.bigBoxThree}>
|
||||
{
|
||||
List.map((item, index) => {
|
||||
return (
|
||||
<View className={styles.itemBox} key={index} onClick={() => handItem(item)}>{item.name}</View>
|
||||
)
|
||||
})
|
||||
}
|
||||
</View>
|
||||
))}
|
||||
{!onlyRead && (
|
||||
<View className={styles.uploadImg} onClick={uploadImage}>
|
||||
<Text className={classnames(styles.miconfont, 'iconfont icon-xinzeng')}></Text>
|
||||
{/* <Text className={styles.uploadText}>上传照片</Text> */}
|
||||
</View>
|
||||
)}
|
||||
<Popup title={'选择方式'} show={showPopup} onClose={() => setshowPopup(false)}>
|
||||
{
|
||||
List.map((item, index) => {
|
||||
return (
|
||||
<View className={styles.itemBox} key={index} onClick={() => handItem(item)}>{item.name}</View>
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
</Popup>
|
||||
</View>
|
||||
</>
|
||||
)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user