🐞 fix:【ID1000610】
新版内部商城测试bug-2
This commit is contained in:
parent
ffa2cf377d
commit
498d8515cb
@ -45,7 +45,9 @@ export default memo((props: prosObj) => {
|
||||
(obj.sale_mode === 1 && 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)
|
||||
(obj.sale_mode === 2 && obj.status === 0 && obj.collect_status == 0) ||
|
||||
(obj.sale_mode === 1 && obj.status === 10) ||
|
||||
(obj.sale_mode === 2 && obj.status === 10)
|
||||
) {
|
||||
return true
|
||||
} else return false
|
||||
@ -73,7 +75,9 @@ export default memo((props: prosObj) => {
|
||||
(obj.sale_mode === 0 && obj.status === 9 && obj.collect_status == 1) ||
|
||||
(obj.sale_mode === 0 && obj.status === 9 && obj.collect_status == 0) ||
|
||||
(obj.sale_mode === 2 && obj.status === 2) ||
|
||||
(obj.sale_mode === 2 && obj.status === 7)
|
||||
(obj.sale_mode === 2 && obj.status === 7) ||
|
||||
(obj.sale_mode === 1 && obj.status === 10) ||
|
||||
(obj.sale_mode === 2 && obj.status === 10)
|
||||
) {
|
||||
return true
|
||||
} else return false
|
||||
|
||||
@ -43,8 +43,8 @@ export default memo((props: props) => {
|
||||
}
|
||||
}
|
||||
if (props.modeFont == 2) {
|
||||
if (Number(res) == 0 || Number(res) < 3) {
|
||||
setValue({ count: 3 })
|
||||
if (Number(res) < 3) {
|
||||
setValue({ count: '' })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,277 @@
|
||||
.main {}
|
||||
|
||||
.bgBox {
|
||||
margin: 24px;
|
||||
background: #FFFFFF;
|
||||
border-radius: 16px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.goodsBox {
|
||||
margin-top: 24px;
|
||||
overflow: hidden;
|
||||
border-bottom: 8px solid #F7F7F7;
|
||||
|
||||
.goodsProduct {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #000000;
|
||||
margin-left: 32px;
|
||||
}
|
||||
|
||||
.goodsLine {
|
||||
width: 638px;
|
||||
height: 1px;
|
||||
background: #000000;
|
||||
opacity: 0.1;
|
||||
margin-left: 32px;
|
||||
margin-top: 24px;
|
||||
}
|
||||
|
||||
.itemGoods {
|
||||
margin-top: 24px;
|
||||
display: flex;
|
||||
|
||||
.itemPic {
|
||||
margin-left: 32px;
|
||||
margin-right: 42px;
|
||||
width: 108px;
|
||||
height: 108px;
|
||||
background: #322F2F;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.itemRight {
|
||||
padding-bottom: 24px;
|
||||
width: 495px;
|
||||
border-bottom: 1px solid #f7f7f7;
|
||||
|
||||
.item_right_top {
|
||||
margin-bottom: 41px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.itemName {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.itemNums {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
|
||||
.item_right_Bottom {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.itemMoney {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.itemMoneyOne {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.btn {
|
||||
width: 120px;
|
||||
height: 64px;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #337FFF;
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
color: #337FFF;
|
||||
text-align: center;
|
||||
line-height: 64px;
|
||||
}
|
||||
|
||||
.btnOne {
|
||||
width: 204px;
|
||||
height: 64px;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #337FFF;
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
color: #337FFF;
|
||||
text-align: center;
|
||||
line-height: 64px;
|
||||
}
|
||||
|
||||
.inputBox {
|
||||
width: 189px;
|
||||
height: 64px;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #337FFF;
|
||||
display: flex;
|
||||
|
||||
.redceBox {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
border-radius: 8px 0px 0px 8px;
|
||||
border-right: 1px solid #337FFF;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.reduce {
|
||||
width: 20px;
|
||||
height: 2px;
|
||||
background: #337FFF;
|
||||
}
|
||||
}
|
||||
|
||||
.inputBig {
|
||||
width: 61px;
|
||||
height: 64px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
font-size: 24px;
|
||||
font-weight: 400;
|
||||
color: #337FFF;
|
||||
}
|
||||
|
||||
.addBox {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
border-left: 1px solid #337FFF;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 40px;
|
||||
color: #337FFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
.itemGoods:last-child {
|
||||
margin-top: 24px;
|
||||
display: flex;
|
||||
|
||||
.itemPic {
|
||||
margin-left: 32px;
|
||||
margin-right: 42px;
|
||||
width: 108px;
|
||||
height: 108px;
|
||||
background: #322F2F;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.itemRight {
|
||||
padding-bottom: 24px;
|
||||
width: 495px;
|
||||
border-bottom: none;
|
||||
|
||||
.item_right_top {
|
||||
margin-bottom: 41px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.itemName {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.itemNums {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
|
||||
.item_right_Bottom {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.itemMoney {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.itemMoneyOne {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.btn {
|
||||
width: 120px;
|
||||
height: 64px;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #337FFF;
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
color: #337FFF;
|
||||
text-align: center;
|
||||
line-height: 64px;
|
||||
}
|
||||
|
||||
.btnOne {
|
||||
width: 204px;
|
||||
height: 64px;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #337FFF;
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
color: #337FFF;
|
||||
text-align: center;
|
||||
line-height: 64px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.goodsBox {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.hasSelect {
|
||||
margin-left: 32px;
|
||||
margin-right: 32px;
|
||||
height: 54px;
|
||||
background: #FEF9F4;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 24px;
|
||||
font-weight: 600;
|
||||
color: #F79B31;
|
||||
padding-left: 20px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.resonBig {
|
||||
overflow: hidden;
|
||||
margin: 24px;
|
||||
|
||||
@ -5,6 +5,7 @@ import classnames from "classnames";
|
||||
import Taro, { faceVerifyForPay, useDidShow, useRouter } from '@tarojs/taro'
|
||||
import { formatDateTime, formatHashTag, formatImgUrl, formatPriceDiv, formatWeightDiv } from '@/common/format'
|
||||
import {
|
||||
mpsaleOrder,
|
||||
mpreturnApplyOrder,
|
||||
mpenumrefundExplainone,
|
||||
} from "@/api/order"
|
||||
@ -14,9 +15,116 @@ import Popup from '@/components/popup'
|
||||
export default () => {
|
||||
|
||||
useEffect(() => {
|
||||
getDetail()
|
||||
getEnum()
|
||||
}, [])
|
||||
const Router = useRouter()
|
||||
const { fetchData: infoFetch } = mpsaleOrder()
|
||||
const [ListArr, setListArr] = useState<any[]>([])
|
||||
const [infoObj, setInfoObj] = useState<any>({})
|
||||
|
||||
//获取订单详情
|
||||
const getDetail = async () => {
|
||||
Taro.showLoading({
|
||||
title: '请稍等...',
|
||||
mask: true
|
||||
})
|
||||
const res = await infoFetch({ id: Router.params.orderId })
|
||||
if (res.data) {
|
||||
res.data.av_return_product.forEach(item => {
|
||||
item.av_product_color.map(it => {
|
||||
it.isTui = false
|
||||
it.nums = 1
|
||||
})
|
||||
return item
|
||||
})
|
||||
setInfoObj(res.data)
|
||||
setListArr(res.data.av_return_product)
|
||||
Taro.hideLoading()
|
||||
}
|
||||
}
|
||||
|
||||
//点击退货
|
||||
const handTui = (val) => {
|
||||
let res = ListArr
|
||||
res.forEach(item => {
|
||||
item.av_product_color?.map(it => {
|
||||
if (it.sale_order_detail_id == val.sale_order_detail_id) {
|
||||
it.isTui = true
|
||||
}
|
||||
return it
|
||||
})
|
||||
|
||||
})
|
||||
setListArr([...res])
|
||||
|
||||
}
|
||||
//点击取消退货
|
||||
const handCancel = (val) => {
|
||||
ListArr.forEach(item => {
|
||||
item.av_product_color.map(it => {
|
||||
if (it.sale_order_detail_id === val.sale_order_detail_id) {
|
||||
it.isTui = false
|
||||
}
|
||||
return it
|
||||
})
|
||||
})
|
||||
setListArr([...ListArr])
|
||||
}
|
||||
|
||||
//点击减
|
||||
const handReduce = (val) => {
|
||||
ListArr.forEach(item => {
|
||||
item.av_product_color.map(it => {
|
||||
if (it.sale_order_detail_id === val.sale_order_detail_id) {
|
||||
if (val.nums === 1) {
|
||||
it.isTui = false
|
||||
it.nums = 1
|
||||
} else {
|
||||
it.nums--
|
||||
}
|
||||
}
|
||||
return it
|
||||
})
|
||||
})
|
||||
setListArr([...ListArr])
|
||||
}
|
||||
|
||||
const onInputEven = (e, val) => {
|
||||
ListArr.forEach(item => {
|
||||
item.av_product_color.map(it => {
|
||||
if (it.sale_order_detail_id === val.sale_order_detail_id) {
|
||||
if (Number(e.detail.value) < 1) {
|
||||
it.nums = 1
|
||||
} else {
|
||||
it.nums = Number(e.detail.value)
|
||||
}
|
||||
if (Number(e.detail.value) > it.roll) {
|
||||
it.nums = 1
|
||||
}
|
||||
}
|
||||
return it
|
||||
})
|
||||
})
|
||||
setListArr([...ListArr])
|
||||
}
|
||||
|
||||
//点击加
|
||||
const handAdd = (val) => {
|
||||
ListArr.forEach(item => {
|
||||
item.av_product_color.map(it => {
|
||||
if (it.sale_order_detail_id === val.sale_order_detail_id) {
|
||||
if (it.nums < it.roll) {
|
||||
it.nums++
|
||||
} else {
|
||||
return
|
||||
}
|
||||
}
|
||||
return it
|
||||
})
|
||||
})
|
||||
setListArr([...ListArr])
|
||||
}
|
||||
|
||||
//获取枚举
|
||||
const [List, setList] = useState<any[]>([])
|
||||
@ -74,6 +182,18 @@ export default () => {
|
||||
setshowPopup(false)
|
||||
}
|
||||
|
||||
const totalNums = useMemo(() => {
|
||||
const arr: any[] = []
|
||||
ListArr.forEach(item => {
|
||||
item.av_product_color.forEach(it => {
|
||||
if (it.isTui) {
|
||||
arr.push(it)
|
||||
}
|
||||
})
|
||||
})
|
||||
return arr.length
|
||||
}, [ListArr])
|
||||
|
||||
//重置
|
||||
const handReset = () => {
|
||||
setQuery(({ reasonId: '', reasonName: '请选择' }))
|
||||
@ -91,6 +211,26 @@ export default () => {
|
||||
}
|
||||
}, [Query])
|
||||
|
||||
//判断是否允许提交
|
||||
const canTui = useMemo(() => {
|
||||
if (totalNums > 0 && Query.reasonId !== '') {
|
||||
return false
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
|
||||
}, [Query, totalNums])
|
||||
|
||||
const noGoods = useMemo(() => {
|
||||
if (Query.reasonId !== '') {
|
||||
return false
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
|
||||
}, [Query])
|
||||
|
||||
|
||||
//数组重置
|
||||
const resetArr = (arr) => {
|
||||
arr.map(it => {
|
||||
@ -102,15 +242,47 @@ export default () => {
|
||||
//确认退款
|
||||
const { fetchData: sureFetch } = mpreturnApplyOrder()
|
||||
const handSure = () => {
|
||||
let arr: any = [];
|
||||
if (infoObj.sale_mode == 0 && infoObj.status == 9) {
|
||||
ListArr.forEach((item) => {
|
||||
item.av_product_color.forEach((it) => {
|
||||
if (it.isTui) {
|
||||
arr.push({
|
||||
product_color_id: it.sale_mode == 0 ? it.product_color_id : '',
|
||||
product_id: it.sale_mode == 0 ? it.product_id : '',
|
||||
product_roll: it.sale_mode == 0 ? it.nums : 0,
|
||||
sale_order_detail_id: it.sale_order_detail_id,
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
if ((infoObj.sale_mode == 1 && infoObj.status == 9) || (infoObj.sale_mode == 2 && infoObj.status == 9)) {
|
||||
ListArr.forEach((item) => {
|
||||
item.av_product_color.forEach((it) => {
|
||||
if (it.isTui) {
|
||||
arr.push({
|
||||
product_color_id: it.product_color_id,
|
||||
product_id: it.product_id,
|
||||
product_roll: 0,
|
||||
sale_order_detail_id: it.sale_order_detail_id,
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
const query = {
|
||||
reason_describe: TextareaValue,
|
||||
fabric_piece_accessory_url: [],
|
||||
goods_status: 100,
|
||||
return_explain: Query.reasonId,
|
||||
roll: 0,
|
||||
roll_list: [],
|
||||
roll_list: arr,
|
||||
sale_order_id: Number(Router.params.orderId),
|
||||
};
|
||||
console.log(query, 888)
|
||||
Taro.showModal({
|
||||
content: "确认退款吗?",
|
||||
confirmText: "确认",
|
||||
@ -141,12 +313,38 @@ export default () => {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
const showItem = useMemo(() => {
|
||||
if ((infoObj.sale_mode == 0 && infoObj.status == 9) || (infoObj.sale_mode == 1 && infoObj.status == 9) || (infoObj.sale_mode == 2 && infoObj.status == 9)) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
|
||||
}, [infoObj])
|
||||
|
||||
return (
|
||||
<View className={styles.main}>
|
||||
{
|
||||
showItem && <View className={styles.bgBox}>
|
||||
<GoodsItem
|
||||
list={ListArr}
|
||||
obj={infoObj}
|
||||
handTui={(item) => handTui(item)}
|
||||
handCancel={(item) => handCancel(item)}
|
||||
// onBlur={(e, item) => onBlur(e, item)}
|
||||
handReduce={(item) => handReduce(item)}
|
||||
handAdd={(item) => handAdd(item)}
|
||||
onInputEven={(e, item) => onInputEven(e, item)}
|
||||
></GoodsItem>
|
||||
<View className={styles.hasSelect}>汇总:已选{totalNums}种商品</View>
|
||||
</View>
|
||||
}
|
||||
<View className={styles.resonBig}>
|
||||
<View className={styles.reasonItem} onClick={() => { setshowPopup(true) }}>
|
||||
<View className={styles.reasonLeft}>
|
||||
<View className={styles.reasonFont}>退货原因</View>
|
||||
<View className={styles.reasonFont}>退款原因</View>
|
||||
<Text className={styles.xing}>*</Text>
|
||||
{
|
||||
Query.reasonName === '请选择' && <View className={styles.selectFont}>请选择</View>
|
||||
@ -175,7 +373,14 @@ export default () => {
|
||||
<View className={styles.bottomBox}>
|
||||
|
||||
<Button className={styles.resetBox} onClick={() => { handCancl() }}> 取消</Button >
|
||||
<Button className={classnames(isDisabled ? styles.button : styles.activeButton)} disabled={isDisabled} onClick={() => handSure()}> 确认退款</Button >
|
||||
{
|
||||
showItem && <Button className={classnames(canTui ? styles.button : styles.activeButton)} disabled={canTui} onClick={() => handSure()}> 确认退款</Button >
|
||||
|
||||
}
|
||||
{
|
||||
!showItem && <Button className={classnames(noGoods ? styles.button : styles.activeButton)} disabled={noGoods} onClick={() => handSure()}> 确认退款</Button >
|
||||
|
||||
}
|
||||
</View>
|
||||
</View>
|
||||
<Popup title={'筛选情况'} show={showPopup} onClose={() => { setshowPopup?.(false) }}>
|
||||
@ -204,3 +409,83 @@ export default () => {
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
|
||||
//产品商品元素
|
||||
interface PropGoods {
|
||||
list: any[],
|
||||
obj: {
|
||||
sale_mode?: number | string
|
||||
},
|
||||
handTui?: (any) => void,
|
||||
handCancel?: (any) => void,
|
||||
onBlur?: (e: any, obj: any) => void,
|
||||
onInputEven?: (e: any, obj: any) => void,
|
||||
handReduce?: (any) => void,
|
||||
handAdd?: (any) => void,
|
||||
}
|
||||
const GoodsItem = memo((porps: PropGoods) => {
|
||||
const { list = [], obj = {}, handTui, handCancel, onBlur, handReduce, handAdd, onInputEven } = porps
|
||||
// const [value, setValue] = useState<any>({ count: 1 })
|
||||
// const onInputEven = (e) => {
|
||||
// let res = Number(e.detail.value)
|
||||
// if (res < 1) {
|
||||
// setValue({ count: 1 })
|
||||
// } else {
|
||||
// setValue({ count: res })
|
||||
// }
|
||||
// }
|
||||
|
||||
return (
|
||||
<>
|
||||
{
|
||||
list.map((item, index) => {
|
||||
return (
|
||||
<View className={styles.goodsBox} key={index}>
|
||||
<View className={styles.goodsProduct}>{item.product_code}# {item.product_name}</View>
|
||||
<View className={styles.goodsLine}></View>
|
||||
{
|
||||
item.av_product_color.map((it, inx) => {
|
||||
return (
|
||||
<View className={styles.itemGoods} key={inx}>
|
||||
<View className={styles.itemPic} style={{ backgroundColor: `rgb(${it?.rgb?.r} ${it?.rgb?.g} ${it?.rgb?.b})` }}></View>
|
||||
<View className={styles.itemRight}>
|
||||
<View className={styles.item_right_top}>
|
||||
<View className={styles.itemName}>{it.product_color_code} {it.product_color_name}</View>
|
||||
</View>
|
||||
<View className={styles.item_right_Bottom}>
|
||||
<View className={styles.itemMoney}>x{obj?.sale_mode === 0 ? it.roll : it.length / 100}{obj?.sale_mode === 0 ? '条' : 'm'}</View>
|
||||
{
|
||||
!it.isTui && <View className={styles.btn} onClick={() => handTui?.(it)}>退货</View>
|
||||
}
|
||||
{
|
||||
(it.sale_mode != 0 && it.isTui) && <View className={styles.btnOne} onClick={() => handCancel?.(it)}>已选择退货</View>
|
||||
}
|
||||
{
|
||||
(it.sale_mode == 0 && it.isTui) && <View className={styles.inputBox} >
|
||||
<View className={styles.redceBox} onClick={() => handReduce?.(it)}>
|
||||
<View className={styles.reduce}></View>
|
||||
</View>
|
||||
<View className={styles.inputBig}>
|
||||
<Input type={'number'} value={it.nums} onInput={(e) => onInputEven?.(e, it)} maxlength={it.roll} onBlur={(e) => onBlur?.(e, it)}></Input>
|
||||
</View>
|
||||
<View className={styles.addBox} onClick={() => handAdd?.(it)}>
|
||||
+
|
||||
</View>
|
||||
</View>
|
||||
}
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
)
|
||||
})
|
||||
}
|
||||
</View>
|
||||
)
|
||||
})
|
||||
}
|
||||
</>
|
||||
|
||||
)
|
||||
})
|
||||
@ -273,7 +273,11 @@ export default () => {
|
||||
} else if (search.modeId == 1 && Number(e.detail.value) >= 0.5) {
|
||||
item.nums = e.detail.value
|
||||
}
|
||||
if (search.modeId == 2) {
|
||||
if (search.modeId == 2 && Number(e.detail.value) < 3) {
|
||||
item.nums = 3
|
||||
item.showInput = false
|
||||
|
||||
} else if (search.modeId == 2 && Number(e.detail.value) >= 3) {
|
||||
item.nums = e.detail.value
|
||||
}
|
||||
|
||||
|
||||
@ -21,6 +21,22 @@ export default memo((props: propsObj) => {
|
||||
})
|
||||
}
|
||||
|
||||
const monyFont = useMemo(() => {
|
||||
if (props?.obj.status == 0 || props?.obj.status == 1 || props?.obj.status == 2) {
|
||||
return '预估金额:'
|
||||
} else {
|
||||
return '合计金额:'
|
||||
}
|
||||
}, [props?.obj])
|
||||
|
||||
const totalMoney = useMemo(() => {
|
||||
if (props?.obj.status == 0 || props?.obj.status == 1 || props?.obj.status == 2) {
|
||||
return props?.obj?.estimate_amount
|
||||
} else {
|
||||
return props?.obj?.bill_total_sale_price
|
||||
}
|
||||
}, [props?.obj])
|
||||
|
||||
return (
|
||||
<View className={styles.itemBox} onClick={(e) => navTo(e)}>
|
||||
<View className={styles.topItem}>
|
||||
@ -65,10 +81,12 @@ export default memo((props: propsObj) => {
|
||||
<View className={styles.msgLeft}>布料信息:</View>
|
||||
<View className={styles.msgRight}>{props?.obj?.total_fabrics} 种面料,{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 className={styles.bottomMsg}>
|
||||
<View className={styles.msgLeft}>预估金额:</View>
|
||||
<View className={styles.msgRightOne}>¥{formatPriceDiv(props?.obj?.estimate_amount)}</View>
|
||||
</View>
|
||||
{
|
||||
props?.obj.status != 5 && <View className={styles.bottomMsg}>
|
||||
<View className={styles.msgLeft}>{monyFont}</View>
|
||||
<View className={styles.msgRightOne}>¥{formatPriceDiv(totalMoney)}</View>
|
||||
</View>
|
||||
}
|
||||
<View className={styles.bottomBox}>
|
||||
<BottomBtns
|
||||
obj={props?.obj}
|
||||
|
||||
@ -10,7 +10,6 @@ page {
|
||||
|
||||
.pussName {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
}
|
||||
@ -18,7 +17,6 @@ page {
|
||||
.pussPhone {
|
||||
margin-left: 88px;
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
}
|
||||
@ -27,7 +25,6 @@ page {
|
||||
.total {
|
||||
margin-top: 44px;
|
||||
font-size: 24px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
margin-left: 32px;
|
||||
@ -57,7 +54,6 @@ page {
|
||||
margin-left: 32px;
|
||||
margin-right: 8px;
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
}
|
||||
@ -69,7 +65,6 @@ page {
|
||||
|
||||
.shoudPay {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #F64861;
|
||||
margin-right: 32px;
|
||||
@ -95,14 +90,12 @@ page {
|
||||
|
||||
.title {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.modeName {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #337FFF;
|
||||
}
|
||||
@ -127,7 +120,6 @@ page {
|
||||
|
||||
.goodsProduct {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #000000;
|
||||
margin-left: 32px;
|
||||
@ -160,7 +152,7 @@ page {
|
||||
.itemRight {
|
||||
padding-bottom: 24px;
|
||||
margin-right: 32px;
|
||||
// width: 495px;
|
||||
width: 495px;
|
||||
border-bottom: 1px solid #f7f7f7;
|
||||
|
||||
.item_right_top {
|
||||
@ -171,14 +163,12 @@ page {
|
||||
|
||||
.itemName {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.itemNums {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
}
|
||||
@ -191,14 +181,12 @@ page {
|
||||
|
||||
.itemMoney {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.itemMoneyOne {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #000000;
|
||||
}
|
||||
@ -234,14 +222,12 @@ page {
|
||||
|
||||
.itemName {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.itemNums {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
}
|
||||
@ -254,14 +240,12 @@ page {
|
||||
|
||||
.itemMoney {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.itemMoneyOne {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #000000;
|
||||
}
|
||||
@ -289,7 +273,6 @@ page {
|
||||
.detailRight {
|
||||
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
}
|
||||
@ -301,7 +284,6 @@ page {
|
||||
border-radius: 8px;
|
||||
border: 1PX solid #337FFF;
|
||||
font-size: 24px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #337FFF;
|
||||
text-align: center;
|
||||
@ -311,7 +293,6 @@ page {
|
||||
|
||||
.detailFont {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
}
|
||||
@ -320,7 +301,6 @@ page {
|
||||
.remarkFont {
|
||||
margin-top: 24px;
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
}
|
||||
@ -344,7 +324,6 @@ page {
|
||||
|
||||
.moreFont {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: rgba(0, 0, 0, 0.8);
|
||||
margin-left: 48px;
|
||||
|
||||
@ -538,6 +538,7 @@ export default () => {
|
||||
|
||||
//申请退款
|
||||
const handApplyMoney = () => {
|
||||
|
||||
Taro.navigateTo({
|
||||
url: '/pages/applyMoney/index?orderId=' + infoObj.id
|
||||
})
|
||||
@ -586,6 +587,14 @@ export default () => {
|
||||
useEffect(() => {
|
||||
setInfoObj(infoObj)
|
||||
}, [infoObj])
|
||||
const showRemarkFont = useMemo(() => {
|
||||
if (infoObj.status === 10 || infoObj.status == 0 || infoObj.status == 1 || infoObj.status == 2 || infoObj.status == 7) {
|
||||
return `${'填写/修改备注'} >`
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
}, [infoObj])
|
||||
|
||||
return (
|
||||
<View className={styles.mainBox}>
|
||||
{(infoObj?.status != 10 && <OrderState orderInfo={infoObj} />)}
|
||||
@ -616,7 +625,7 @@ export default () => {
|
||||
<View className={styles.totalFont}>合计金额</View>
|
||||
<IconFont name={'icon-tishi'} size={28} ></IconFont>
|
||||
</View>
|
||||
<View className={styles.shoudPay}>{formatPriceDiv(infoObj.total_should_collect_money)}</View>
|
||||
<View className={styles.shoudPay}>{formatPriceDiv(infoObj.bill_total_sale_price)}</View>
|
||||
</View>
|
||||
<View className={styles.flexMoney}>
|
||||
<View className={styles.flexTotalBox}>
|
||||
@ -653,12 +662,9 @@ export default () => {
|
||||
}
|
||||
|
||||
</DefaultBox>
|
||||
{
|
||||
(infoObj.status != 11 && infoObj.status != 3 && infoObj.status != 8 && infoObj.status != 9 && infoObj.status != 4
|
||||
) && <DefaultBox title={'备注信息'} showMode={true} modeName={`${'填写/修改备注'} >`} clickNode={() => setShowDesc(true)}>
|
||||
<View className={styles.remarkFont}>{infoObj.remark === '' ? '暂无' : infoObj.remark}</View>
|
||||
</DefaultBox>
|
||||
}
|
||||
<DefaultBox title={'备注信息'} showMode={true} modeName={showRemarkFont} clickNode={() => setShowDesc(showRemarkFont != '' ? true : false)}>
|
||||
<View className={styles.remarkFont}>{infoObj.remark === '' ? '暂无' : infoObj.remark}</View>
|
||||
</DefaultBox>
|
||||
|
||||
<Popup show={showDesc} title={'填写/编辑备注'} showTitle={true} onClose={() => setShowDesc(false)}>
|
||||
<View style={{ margin: '24rpx' }}>
|
||||
|
||||
@ -2,7 +2,7 @@ import { Image, Text, View } from "@tarojs/components";
|
||||
import { memo, useEffect, useMemo, useRef, useState } from "react";
|
||||
import classnames from "classnames";
|
||||
import styles from './index.module.scss'
|
||||
|
||||
import IconFont from '@/components/iconfont/iconfont'
|
||||
interface propsObj {
|
||||
receivingStatus?: Number | null,
|
||||
onReceivingStatus?: (any, Number) => void,
|
||||
@ -29,7 +29,7 @@ export default memo((props: propsObj) => {
|
||||
<View className={styles.topFont}>请按以下退货地址寄回货物并提供退货物流信息</View>
|
||||
<View className={styles.topBox}>
|
||||
<View className={styles.cirle}>
|
||||
<View className={classnames('iconfont', 'icon-dingwei', styles.dingwei)}></View>
|
||||
<IconFont name={'icon-dingwei'} size={26} color={'#ffffff'}></IconFont>
|
||||
</View>
|
||||
<View className={styles.address}>{'广东省佛山市禅城区陆盈纺织仓库'}</View>
|
||||
</View>
|
||||
|
||||
@ -35,8 +35,12 @@ export default memo(({ orderInfo = { logistics_details: [], payment_method: 0, s
|
||||
setShowMore(() => !showMore)
|
||||
}
|
||||
const dataList = useMemo(() => {
|
||||
console.log(orderInfo.logistics_details ? orderInfo?.logistics_details.reverse() : [],'5555')
|
||||
return orderInfo.logistics_details ? orderInfo?.logistics_details.reverse() : []
|
||||
let arr = orderInfo?.logistics_details
|
||||
if (orderInfo.logistics_details) {
|
||||
return arr.reverse()
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
}, [orderInfo.logistics_details])
|
||||
|
||||
|
||||
|
||||
@ -253,6 +253,16 @@ export default () => {
|
||||
DeatailObj?.sale_mode == 0 ? DeatailObj?.return_roll : DeatailObj?.total_number / 100
|
||||
} {DeatailObj?.sale_mode == 0 ? "条" : "米"}</View>
|
||||
</View>
|
||||
{
|
||||
(DeatailObj.stage == 3) &&
|
||||
<View className={styles.totalBox}>
|
||||
<View className={styles.totalLeft}>退款金额</View>
|
||||
<View className={styles.totalRight} style={{ color: '#F64861' }}>¥{
|
||||
formatPriceDiv(DeatailObj.refund_amount)
|
||||
}</View>
|
||||
</View>
|
||||
|
||||
}
|
||||
</DefaultBox>
|
||||
<DefaultBox title={'订单信息'}>
|
||||
{
|
||||
|
||||
@ -35,8 +35,12 @@ export default memo(({ orderInfo = { logistics_details: [], payment_method: 0, s
|
||||
setShowMore(() => !showMore)
|
||||
}
|
||||
const dataList = useMemo(() => {
|
||||
console.log(orderInfo.logistics_details ? orderInfo?.logistics_details.reverse() : [],'5555')
|
||||
return orderInfo.logistics_details ? orderInfo?.logistics_details.reverse() : []
|
||||
let arr = orderInfo?.logistics_details
|
||||
if (orderInfo.logistics_details) {
|
||||
return arr.reverse()
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
}, [orderInfo.logistics_details])
|
||||
|
||||
|
||||
|
||||
@ -213,32 +213,32 @@ export default () => {
|
||||
DeatailObj.stage == 0 && <View className={styles.totalBox}>
|
||||
|
||||
<View className={styles.totalLeft}>合计金额</View>
|
||||
<View className={styles.totalRight} style={{ color: '#F64861' }}>{
|
||||
<View className={styles.totalRight} style={{ color: '#F64861' }}>¥{
|
||||
formatPriceDiv(DeatailObj.total_refund_amount)
|
||||
}</View>
|
||||
</View>
|
||||
}
|
||||
{
|
||||
(DeatailObj.stage == 5 || DeatailObj.stage == 6) && <View className={styles.totalBox}>
|
||||
(DeatailObj.stage == 3) && <View className={styles.totalBox}>
|
||||
<View className={styles.totalLeft}>退款金额</View>
|
||||
<View className={styles.totalRight} style={{ color: '#F64861' }}>{
|
||||
<View className={styles.totalRight} style={{ color: '#F64861' }}>¥{
|
||||
formatPriceDiv(DeatailObj.refund_amount)
|
||||
}</View>
|
||||
</View>
|
||||
}
|
||||
{
|
||||
(DeatailObj.stage == 5 || DeatailObj.stage == 6) && <View className={styles.totalBox}>
|
||||
(DeatailObj.stage == 3) && <View className={styles.totalBox}>
|
||||
<View className={styles.totalLeft}>其他扣除金额</View>
|
||||
<View className={styles.totalRight} style={{ color: '#F64861' }}>{
|
||||
<View className={styles.totalRight} style={{ color: '#F64861' }}>¥{
|
||||
formatPriceDiv(DeatailObj.other_deduction_amount)
|
||||
}</View>
|
||||
</View>
|
||||
}
|
||||
{
|
||||
(DeatailObj.stage == 5 || DeatailObj.stage == 6) && <View className={styles.totalBox}>
|
||||
(DeatailObj.stage == 3) && <View className={styles.totalBox}>
|
||||
<View className={styles.totalLeft}>退款去向</View>
|
||||
<View className={styles.totalRight} style={{ color: '#F64861' }}>{
|
||||
formatPriceDiv(DeatailObj.refund_flow_name)
|
||||
DeatailObj.refund_flow_name
|
||||
}</View>
|
||||
</View>
|
||||
}
|
||||
|
||||
@ -100,7 +100,7 @@ export default memo((props: propsObj) => {
|
||||
(props?.obj.stage == 5 || props?.obj.stage == 6 || props?.obj.stage == 3) && <View className={styles.bottomMsg}>
|
||||
<View className={styles.msgLeft}>退款金额:</View>
|
||||
|
||||
<View className={styles.msgRightOne}>¥{formatPriceDiv(props?.obj?.refundable_amount)}</View>
|
||||
<View className={styles.msgRightOne}>¥{formatPriceDiv(props?.obj?.refund_amount)}</View>
|
||||
|
||||
</View>
|
||||
}
|
||||
|
||||
@ -274,6 +274,7 @@ export default memo(() => {
|
||||
if (search.modeId == 0 && (e.detail.value == '' || Number(e.detail.value) == 0)) {
|
||||
item.showInput = false
|
||||
item.nums = 1
|
||||
|
||||
} else if (search.modeId == 0 && (e.detail.value != '' || Number(e.detail.value) > 0)) {
|
||||
item.nums = e.detail.value
|
||||
}
|
||||
@ -283,7 +284,11 @@ export default memo(() => {
|
||||
} else if (search.modeId == 1 && Number(e.detail.value) >= 0.5) {
|
||||
item.nums = e.detail.value
|
||||
}
|
||||
if (search.modeId == 2) {
|
||||
if (search.modeId == 2 && Number(e.detail.value) < 3) {
|
||||
item.nums = 3
|
||||
item.showInput = false
|
||||
|
||||
} else if (search.modeId == 2 && Number(e.detail.value) >= 3) {
|
||||
item.nums = e.detail.value
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user