🐞 fix:【ID1000658】:

新版内部商城加入购物车的客户搜索无效,
【ID1000661】:序号2,3,9,10,11,13,14,22,37,38,43
This commit is contained in:
Haiyi 2022-11-08 13:54:23 +08:00
parent 7eb3394cd8
commit 4198b9b548
33 changed files with 538 additions and 369 deletions

View File

@ -197,6 +197,41 @@
"query": "", "query": "",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
},
{
"name": "",
"pathName": "pages/applyGoods/index",
"query": "orderId=31700",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "pages/customerManagement/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "pages/applyMoney/index",
"query": "orderId=31712",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "pages/applyGoods/index",
"query": "orderId=31708",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "pages/refundMoneyDetail/index",
"query": "id=697",
"launchMode": "default",
"scene": null
} }
] ]
} }

View File

@ -25,7 +25,7 @@ export const OrderListApi = () => {
*/ */
export const ClientListApi = () => { export const ClientListApi = () => {
return useRequest({ return useRequest({
url: `/v1/mp/purchaser/list`, url: `/v2/mp/purchaser/list`,
method: "get" method: "get"
}) })
} }

View File

@ -16,7 +16,8 @@ interface prosObj {
showTuiGoods?: boolean, showTuiGoods?: boolean,
handApplyGoods?: () => void, handApplyGoods?: () => void,
handApplyMoney?: () => void, handApplyMoney?: () => void,
showDetail?: boolean showDetail?: boolean,
goodsObj?: any
} }
export default memo(forwardRef((props: prosObj, ref) => { export default memo(forwardRef((props: prosObj, ref) => {
@ -35,7 +36,8 @@ export default memo(forwardRef((props: prosObj, ref) => {
handSureGoods, handSureGoods,
handApplyGoods, handApplyGoods,
handApplyMoney, handApplyMoney,
showDetail = false showDetail = false,
goodsObj = {}
} = props } = props
//判断显示取消订单 //判断显示取消订单
@ -109,11 +111,11 @@ export default memo(forwardRef((props: prosObj, ref) => {
//判断显示申请退货 //判断显示申请退货
const showTuihuo = useMemo(() => { const showTuihuo = useMemo(() => {
if ( if (
(obj.sale_mode === 0 && obj.status == 9 && obj.collect_status == 0) || (obj.sale_mode === 0 && obj.status == 9 && obj.collect_status == 0 && goodsObj?.av_return_product?.length) ||
(obj.sale_mode === 0 && obj.status == 9 && obj.collect_status == 1) || (obj.sale_mode === 0 && obj.status == 9 && obj.collect_status == 1 && goodsObj?.av_return_product?.length) ||
(obj.sale_mode === 0 && obj.status == 9 && obj.collect_status == 2) || (obj.sale_mode === 0 && obj.status == 9 && obj.collect_status == 2 && goodsObj?.av_return_product?.length) ||
(obj.sale_mode === 0 && obj.status == 9 && obj.settle_mode == 3) || (obj.sale_mode === 0 && obj.status == 9 && obj.settle_mode == 3 && goodsObj?.av_return_product?.length) ||
(obj.sale_mode === 2 && obj.status == 9) (obj.sale_mode === 2 && obj.status == 9 && goodsObj?.av_return_product?.length)
) { ) {
return true return true
} else return false } else return false
@ -121,16 +123,16 @@ export default memo(forwardRef((props: prosObj, ref) => {
//判断显示申请退款 //判断显示申请退款
const showTuikuan = useMemo(() => { const showTuikuan = useMemo(() => {
if ( if (
(obj.sale_mode === 0 && obj.status == 2 && obj.collect_status == 1) || (obj.sale_mode === 0 && obj.status == 2 && obj.collect_status == 1 && goodsObj?.av_return_product?.length) ||
(obj.sale_mode === 0 && obj.status == 7 && obj.collect_status == 0) || (obj.sale_mode === 0 && obj.status == 7 && obj.collect_status == 0 && goodsObj?.av_return_product?.length) ||
(obj.sale_mode === 0 && obj.status == 11 && (obj.collect_status == 1 || obj.collect_status == 2)) || (obj.sale_mode === 0 && obj.status == 11 && (obj.collect_status == 1 || obj.collect_status == 2) && goodsObj?.av_return_product?.length) ||
(obj.sale_mode === 0 && obj.status == 3 && obj.collect_status == 0) || (obj.sale_mode === 0 && obj.status == 3 && obj.collect_status == 0 && goodsObj?.av_return_product?.length) ||
(obj.sale_mode === 0 && obj.status == 3 && obj.collect_status == 2) || (obj.sale_mode === 0 && obj.status == 3 && obj.collect_status == 2 && goodsObj?.av_return_product?.length) ||
(obj.sale_mode === 0 && obj.status == 3 && obj.collect_status == 1) || (obj.sale_mode === 0 && obj.status == 3 && obj.collect_status == 1 && goodsObj?.av_return_product?.length) ||
(obj.sale_mode === 1 && obj.status == 0) || (obj.sale_mode === 1 && obj.status == 0 && goodsObj?.av_return_product?.length) ||
(obj.sale_mode === 1 && obj.status == 9) || (obj.sale_mode === 1 && obj.status == 9 && goodsObj?.av_return_product?.length) ||
(obj.sale_mode === 2 && obj.status == 0 && obj.collect_status == 1) || (obj.sale_mode === 2 && obj.status == 0 && obj.collect_status == 1 && goodsObj?.av_return_product?.length) ||
(obj.sale_mode === 2 && obj.status == 0 && obj.collect_status == 2) (obj.sale_mode === 2 && obj.status == 0 && obj.collect_status == 2 && goodsObj?.av_return_product?.length)
) { ) {
return true return true
} else return false } else return false
@ -149,6 +151,9 @@ export default memo(forwardRef((props: prosObj, ref) => {
if (canBuy) { if (canBuy) {
nums = nums + 1 nums = nums + 1
} }
if (showBuy) {
nums = nums + 1
}
return nums return nums
}, [obj]) }, [obj])

View File

@ -72,7 +72,7 @@ export default memo((props: props) => {
<View className={styles.productNums}>:{props.value?.roll}</View> <View className={styles.productNums}>:{props.value?.roll}</View>
</View> </View>
<View className={styles.rightFontsbox}> <View className={styles.rightFontsbox}>
<View className={styles.money}>¥{props?.modeFont === 0 ? Number(props.value?.bulk_price) / 100 : props.modeFont === 1 ? Number(props.value?.length_cut_price) / 100 : Number(props.value?.weight_cut_price) / 100}{props.modeFont === 0 ? '/Kg' : '/m'}</View> <View className={styles.money}>¥{props?.modeFont === 0 ? Number(props.value?.bulk_price) / 100 : props.modeFont === 1 ? Number(props.value?.length_cut_price) / 100 : Number(props.value?.weight_cut_price) / 100}{props.modeFont != 1 ? '/Kg' : '/m'}</View>
{ {
props.value.showInput && <View className={styles.inputBox}> props.value.showInput && <View className={styles.inputBox}>
<View className={styles.reduceBox} onClick={() => { props.clickReduce?.(props.value) }}> <View className={styles.reduceBox} onClick={() => { props.clickReduce?.(props.value) }}>

View File

@ -9,202 +9,207 @@ import BottomCustomer from "@/components/BottomCustomer"
import VirtualList from '@tarojs/components/virtual-list' import VirtualList from '@tarojs/components/virtual-list'
import DotLoading from "@/components/dotLoading" import DotLoading from "@/components/dotLoading"
import Divider from '../divider'; import Divider from '../divider';
import { useDidShow } from '@tarojs/taro';
interface prosObj { interface prosObj {
showPopup?: false | true, showPopup?: false | true,
closePopup?: () => void, closePopup?: () => void,
goodList?: any[], goodList?: any[],
typeList?: any[], typeList?: any[],
handCheck?: (any) => void, handCheck?: (any) => void,
addNums?: (any) => void addNums?: (any) => void
reduceNums?: (any) => void reduceNums?: (any) => void
// oninputEvent?: (e: string, res: object) => void, // oninputEvent?: (e: string, res: object) => void,
getSearchData: (any) => void, getSearchData: (any) => void,
handPlus: (any) => void, handPlus: (any) => void,
handSure: () => void, handSure: () => void,
obj?: { obj?: {
code?: string, code?: string,
name?: string, name?: string,
}, },
modeFont: Number | string, modeFont: Number | string,
clientName: string, clientName: string,
clientId: Number, clientId: Number,
hasBottom?: true | false, //默认不占位底部 hasBottom?: true | false, //默认不占位底部
onBlur?: (e: string, res: object) => void onBlur?: (e: string, res: object) => void
} }
export default memo(forwardRef((props: prosObj, ref) => { export default memo(forwardRef((props: prosObj, ref) => {
const { const {
showPopup = false, showPopup = false,
closePopup, closePopup,
goodList = [], goodList = [],
typeList = [], typeList = [],
handCheck, handCheck,
addNums, addNums,
reduceNums, reduceNums,
// oninputEvent, // oninputEvent,
getSearchData, getSearchData,
handPlus, handPlus,
obj = {}, obj = {},
modeFont = 0, modeFont = 0,
clientName = '', clientName = '',
clientId = -1, clientId = -1,
handSure, handSure,
hasBottom = true, hasBottom = true,
onBlur onBlur
} = props } = props
useImperativeHandle(ref, () => ({
Object: props,
typeList: typeList
}))
const SearchRef = useRef<any>()
//判断选择的类型 useImperativeHandle(ref, () => ({
const showModefont = useMemo(() => { Object: props,
const modeObj = typeList.filter(item => { typeList: typeList,
return item.checked SearchRef
}) }))
if (modeObj[0].id === 0) {
return '条'
} else {
return '米'
}
}, [typeList])
//已选的颜色
const selectTotal = useMemo(() => {
const totalArr = goodList.filter(item => {
return item.showInput
})
return totalArr.length
}, [goodList])
//选择的条数或者米数
const selectNums = useMemo(() => {
let arr: any = []
goodList.forEach(item => {
if (item.showInput) {
arr.push(Number(item.nums))
}
})
let hate = sum(arr)
return hate
}, [goodList])
// onInputEven={(e, item) => oninputEvent?.(e, item)}
function sum(arr) {
var s = 0;
for (var i = arr.length - 1; i >= 0; i--) {
s += arr[i];
}
return s;
}
const rows = memo(({ id, index, style, data }: any) => { //判断选择的类型
let item = data[index] const showModefont = useMemo(() => {
return ( const modeObj = typeList.filter(item => {
<> return item.checked
<Goods
onBlur={(e, id) => onBlur?.(e, id)}
modeFont={(modeFont as number)}
handPlus={(item) => handPlus?.(item)}
value={item || {}}
clickAdd={(item) => addNums?.(item)}
clickReduce={(item) => { reduceNums?.(item) }}
goodList={goodList}
></Goods>
</>
)
}) })
if (modeObj[0].id === 0) {
return '条'
} else {
return '米'
}
}, [typeList])
//已选的颜色
const selectTotal = useMemo(() => {
const totalArr = goodList.filter(item => {
return item.showInput
})
return totalArr.length
}, [goodList])
//选择的条数或者米数
const selectNums = useMemo(() => {
let arr: any = []
goodList.forEach(item => {
if (item.showInput) {
arr.push(Number(item.nums))
}
})
let hate = sum(arr)
return hate
}, [goodList])
// onInputEven={(e, item) => oninputEvent?.(e, item)}
function sum(arr) {
var s = 0;
for (var i = arr.length - 1; i >= 0; i--) {
s += arr[i];
}
return s;
}
const rows = memo(({ id, index, style, data }: any) => {
let item = data[index]
return ( return (
<Popup showTitle={false} show={showPopup} onClose={() => closePopup?.()}> <>
<ScrollView className={styles.scrllStyle} scrollY> <Goods
<View className={styles.shopcartBox}> onBlur={(e, id) => onBlur?.(e, id)}
<View className={styles.topTitle}> modeFont={(modeFont as number)}
{obj?.code}# {obj?.name} handPlus={(item) => handPlus?.(item)}
</View> value={item || {}}
<View className={styles.selectFont}> clickAdd={(item) => addNums?.(item)}
1 {selectTotal} {selectNums} {showModefont} clickReduce={(item) => { reduceNums?.(item) }}
</View> goodList={goodList}
<Divider direction='horizontal' customStyles={{ margin: '12px 0' }}></Divider> ></Goods>
<View className={styles.typeFont}></View> </>
<View className={styles.flexType}> )
{typeList.map((item, index) => { })
return (
<View
onClick={() => {
handCheck?.(item)
}}
key={index}
className={classnames(item.checked ? styles.activemodeFont : styles.modeFont)}>
{item.name}
</View>
)
})}
</View>
<View style={{position: 'sticky', top: 0, background: 'white',zIndex: '9999'}}>
<Divider direction='horizontal' customStyles={{ margin: '12px 0' }}></Divider>
<View className={styles.flexFonts}>
<View className={styles.kingFont}>({goodList?.length})</View>
<View className={styles.danwei}>
{modeFont == 0 ? '大货' : modeFont == 1 ? '剪版' : '散剪'}{showModefont}
</View>
</View>
<View className={styles.searchBox}>
<Search
cursorSpacing={100}
placeholder='请输入搜索布料'
showBtn={false}
changeOnSearch={getSearchData}
debounceTime={300}
adjustPosition={true}
/>
</View>
</View>
{goodList.length > 0 && (
<>
<View className={styles.scrollviewBig}>
<VirtualList
className={styles.scrollview}
height={300} /* 列表的高度 */
width='100%' /* 列表的宽度 */
itemData={goodList} /* 渲染列表的数据 */
itemCount={goodList.length + 0} /* 渲染列表的长度 */
itemSize={100} /* 列表单项的高度 */
overscanCount={1}>
{rows}
</VirtualList>
</View>
<View className={styles.kongOne}></View> return (
</> <Popup showTitle={false} show={showPopup} onClose={() => closePopup?.()}>
)} <ScrollView className={styles.scrllStyle} scrollY>
{goodList.length === 0 && ( <View className={styles.shopcartBox}>
<> <View className={styles.topTitle}>
<View className={styles.loading_more}> {obj?.code}# {obj?.name}
</View>
<DotLoading /> <View className={styles.selectFont}>
1 {selectTotal} {selectNums} {showModefont}
</View>
<Divider direction='horizontal' customStyles={{ margin: '12px 0' }}></Divider>
<View className={styles.typeFont}></View>
<View className={styles.flexType}>
{typeList.map((item, index) => {
return (
<View
onClick={() => {
handCheck?.(item)
}}
key={index}
className={classnames(item.checked ? styles.activemodeFont : styles.modeFont)}>
{item.name}
</View> </View>
</> )
)} })}
{!hasBottom && <View style={{ height: '100rpx' }}></View>} </View>
<View className={classnames(hasBottom === true ? styles.posBox : styles.noBottom)}> <View style={{ position: 'sticky', top: 0, background: 'white', zIndex: '9999' }}>
<BottomCustomer <Divider direction='horizontal' customStyles={{ margin: '12px 0' }}></Divider>
clientName={clientName} <View className={styles.flexFonts}>
clientId={clientId} <View className={styles.kingFont}>({goodList?.length})</View>
isDisabled={selectTotal > 0 && clientName !== '' ? false : true} <View className={styles.danwei}>
handSure={() => { {modeFont == 0 ? '大货' : modeFont == 1 ? '剪版' : '散剪'}{showModefont}
handSure() </View>
}}></BottomCustomer> </View>
<View className={styles.searchBox}>
<Search
ref={SearchRef}
cursorSpacing={100}
placeholder='请输入搜索布料'
showBtn={false}
changeOnSearch={getSearchData}
debounceTime={300}
adjustPosition={true}
/>
</View> </View>
</View> </View>
</ScrollView> {goodList.length > 0 && (
</Popup> <>
) <View className={styles.scrollviewBig}>
<VirtualList
className={styles.scrollview}
height={300} /* 列表的高度 */
width='100%' /* 列表的宽度 */
itemData={goodList} /* 渲染列表的数据 */
itemCount={goodList.length + 0} /* 渲染列表的长度 */
itemSize={100} /* 列表单项的高度 */
overscanCount={1}>
{rows}
</VirtualList>
</View>
<View className={styles.kongOne}></View>
</>
)}
{goodList.length === 0 && (
<>
<View className={styles.loading_more}>
<DotLoading />
</View>
</>
)}
{!hasBottom && <View style={{ height: '100rpx' }}></View>}
<View className={classnames(hasBottom === true ? styles.posBox : styles.noBottom)}>
<BottomCustomer
clientName={clientName}
clientId={clientId}
isDisabled={selectTotal > 0 && clientName !== '' ? false : true}
handSure={() => {
handSure()
}}></BottomCustomer>
</View>
</View>
</ScrollView>
</Popup>
)
})) }))

View File

@ -216,7 +216,7 @@ export default () => {
//新增地址 //新增地址
const { fetchData: addAddressFetch } = mppurchaseraddress() const { fetchData: addAddressFetch } = mppurchaseraddress()
const handAdd = async () => { const handAdd = async () => {
if (!btnDisabled) return false // if (!btnDisabled) return false
let res = await addAddressFetch({ ...getFilterData(formData), purchaser_id: Number(router.params.purchaser_id) }) let res = await addAddressFetch({ ...getFilterData(formData), purchaser_id: Number(router.params.purchaser_id) })
if (res.data) { if (res.data) {
Taro.showToast({ Taro.showToast({
@ -234,7 +234,7 @@ export default () => {
// 编辑地址 // 编辑地址
const { fetchData: putFetch } = mppurchaseraddressput() const { fetchData: putFetch } = mppurchaseraddressput()
const handEdit = async () => { const handEdit = async () => {
if (!btnDisabled) return false // if (!btnDisabled) return false
let res = await putFetch({ ...getFilterData(formData), purchaser_id: Number(router.params.purchaser_id), id: Number(infoObj?.id) }) let res = await putFetch({ ...getFilterData(formData), purchaser_id: Number(router.params.purchaser_id), id: Number(infoObj?.id) })
if (res.msg === 'success') { if (res.msg === 'success') {
Taro.showToast({ Taro.showToast({
@ -259,7 +259,7 @@ export default () => {
Taro.showLoading({ Taro.showLoading({
title: '请稍等...' title: '请稍等...'
}) })
const result = await deleteFetch({ id: Number(router.params.purchaser_id) }); const result = await deleteFetch({ id: Number(formData.id) });
if (result.success) { if (result.success) {
alert.success("删除成功"); alert.success("删除成功");
Taro.hideLoading() Taro.hideLoading()

View File

@ -40,7 +40,7 @@
margin-right: 42px; margin-right: 42px;
width: 108px; width: 108px;
height: 108px; height: 108px;
background: #322F2F; // background: #322F2F;
border-radius: 8px; border-radius: 8px;
} }
@ -174,7 +174,7 @@
margin-right: 42px; margin-right: 42px;
width: 108px; width: 108px;
height: 108px; height: 108px;
background: #322F2F; // background: #322F2F;
border-radius: 8px; border-radius: 8px;
} }
@ -432,6 +432,7 @@
} }
.popupBox { .popupBox {
height: 500px;
padding-bottom: env(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom);

View File

@ -1,4 +1,4 @@
import { View, Input, Button, Image, Text, Textarea } from '@tarojs/components' import { View, Input, Button, Image, Text, Textarea, ScrollView } from '@tarojs/components'
import { useCallback, useEffect, useMemo, useRef, useState, ReactNode, memo } from 'react' import { useCallback, useEffect, useMemo, useRef, useState, ReactNode, memo } from 'react'
import styles from "./index.module.scss" import styles from "./index.module.scss"
import classnames from "classnames"; import classnames from "classnames";
@ -17,9 +17,9 @@ import UploadImage from '@/components/uploadImage'
export default () => { export default () => {
const router = useRouter() const router = useRouter()
useDidShow(() => { useEffect(() => {
getDetail() getDetail()
}) }, [])
const { fetchData: infoFetch } = mpsaleOrder() const { fetchData: infoFetch } = mpsaleOrder()
const [infoObj, setInfoObj] = useState<any>({}) const [infoObj, setInfoObj] = useState<any>({})
const [ListArr, setListArr] = useState<any[]>([]) const [ListArr, setListArr] = useState<any[]>([])
@ -77,8 +77,8 @@ export default () => {
ListArr.forEach(item => { ListArr.forEach(item => {
item.av_product_color.map(it => { item.av_product_color.map(it => {
if (it.sale_order_detail_id === val.sale_order_detail_id) { if (it.sale_order_detail_id === val.sale_order_detail_id) {
if (val.nums === 1) { if (val.nums == 1) {
// it.isTui = false it.isTui = false
it.nums = 1 it.nums = 1
} else { } else {
it.nums-- it.nums--
@ -389,6 +389,14 @@ export default () => {
//确认退货 //确认退货
const { fetchData: sureFetch } = mpreturnApplyOrder() const { fetchData: sureFetch } = mpreturnApplyOrder()
const handSure = () => { const handSure = () => {
if (Query.reasonNameTwo == '其他问题' && TextareaValue == '') {
Taro.showToast({
title: '请填写其他说明',
icon: 'error',
duration: 3000
})
return false
}
const arr: any = []; const arr: any = [];
ListArr.forEach((item) => { ListArr.forEach((item) => {
item.av_product_color.forEach((it) => { item.av_product_color.forEach((it) => {
@ -507,72 +515,75 @@ export default () => {
value={TextareaValue} value={TextareaValue}
// style='background:#f6f6f6;height:210px;padding:15rpx 24rpx 24rpx 24rpx;border-radius: 8rpx;' // style='background:#f6f6f6;height:210px;padding:15rpx 24rpx 24rpx 24rpx;border-radius: 8rpx;'
placeholderStyle='font-size: 28rpx;font-weight: 400;' placeholderStyle='font-size: 28rpx;font-weight: 400;'
placeholder={'选填/退货说明中选择时(其他问题)必填'} placeholder={'选填/退货原因中选择时(其他问题)必填'}
></Textarea> ></Textarea>
</View> </View>
</View> </View>
<View className={styles.safeBox}> <View className={styles.safeBox}>
<View className={styles.bottomBox}> <View className={styles.bottomBox}>
<Button className={styles.resetBox} onClick={() => { handCancl() }}> </Button > <Button className={styles.resetBox} onClick={() => { handCancl() }}> </Button >
<Button className={classnames(isDisabled ? styles.button : styles.activeButton)} disabled={isDisabled} onClick={() => handSure()}> 退</Button > <Button className={classnames(isDisabled ? styles.button : styles.activeButton)} disabled={isDisabled} onClick={() => handSure()}> 退</Button >
</View> </View>
</View> </View>
<Popup title={'筛选情况'} show={showPopup} onClose={() => { setshowPopup?.(false) }}> <Popup title={'筛选情况'} show={showPopup} onClose={() => { setshowPopup?.(false) }}>
<View className={styles.popupBox}> <ScrollView scrollY >
<View className={styles.thirdBox}> <View className={styles.popupBox}>
<View className={styles.thirdTopfont}>退</View> <View className={styles.thirdBox}>
<View className={styles.flexModebox}> <View className={styles.thirdTopfont}>退</View>
{ <View className={styles.flexModebox}>
ReasonList.map((item, index) => { {
return ( ReasonList.map((item, index) => {
<View onClick={() => { handReasonOne(item) }} className={classnames(item.default ? styles.activemodeBox : styles.modeBox)} key={index}>{item.name}</View> return (
) <View onClick={() => { handReasonOne(item) }} className={classnames(item.default ? styles.activemodeBox : styles.modeBox)} key={index}>{item.name}</View>
}) )
} })
}
</View>
</View> </View>
</View> <View className={styles.thirdBox}>
<View className={styles.thirdBox}> <View className={styles.thirdTopfont}>退</View>
<View className={styles.thirdTopfont}>退</View> <View className={styles.flexModebox}>
<View className={styles.flexModebox}> {
{ ReasonListTwo.map((item, index) => {
ReasonListTwo.map((item, index) => { return (
return ( <View onClick={() => { handReasonTwo(item) }} className={classnames(item.default ? styles.activemodeBox : styles.modeBox)} key={index}>{item.name}</View>
<View onClick={() => { handReasonTwo(item) }} className={classnames(item.default ? styles.activemodeBox : styles.modeBox)} key={index}>{item.name}</View> )
) })
}) }
} </View>
</View> </View>
</View> <View style={{ height: '100rpx' }}></View>
<View style={{ height: '100rpx' }}></View> <View className={styles.bottomBox1}>
<View className={styles.bottomBox1}>
<Button className={styles.resetBox1} onClick={() => { handReset() }}> </Button > <Button className={styles.resetBox1} onClick={() => { handReset() }}> </Button >
<Button className={classnames(selectIsDisabled ? styles.button1 : styles.activeButton1)} disabled={selectIsDisabled} onClick={() => handSlect()}> </Button > <Button className={classnames(selectIsDisabled ? styles.button1 : styles.activeButton1)} disabled={selectIsDisabled} onClick={() => handSlect()}> </Button >
</View>
</View> </View>
</View> </ScrollView>
</Popup> </Popup>
<Popup title={'筛选说明'} show={DescPopup} onClose={() => { setDescPopup?.(false) }}> <Popup title={'筛选说明'} show={DescPopup} onClose={() => { setDescPopup?.(false) }}>
<View className={styles.popupBox}> <ScrollView scrollY >
<View className={styles.thirdBox}> <View className={styles.popupBox}>
<View className={styles.thirdTopfont}></View> <View className={styles.thirdBox}>
<View className={styles.flexModebox}> <View className={styles.thirdTopfont}></View>
{ <View className={styles.flexModebox}>
GoodStatusList.map((item, index) => { {
return ( GoodStatusList.map((item, index) => {
<View onClick={() => { handStatus(item) }} className={classnames(item.default ? styles.activemodeBox : styles.modeBox)} key={index}>{item.name}</View> return (
) <View onClick={() => { handStatus(item) }} className={classnames(item.default ? styles.activemodeBox : styles.modeBox)} key={index}>{item.name}</View>
}) )
} })
}
</View>
</View>
<View className={styles.safeBoxs} ></View>
<View className={styles.bottomBox1}>
<Button className={styles.resetBox1} onClick={() => { handResetStatus() }}> </Button >
<Button className={classnames(StatusIsDisabled ? styles.button1 : styles.activeButton1)} disabled={StatusIsDisabled} onClick={() => handSlectStatus()}> </Button >
</View> </View>
</View> </View>
<View className={styles.safeBoxs} ></View> </ScrollView>
<View className={styles.bottomBox1}>
<Button className={styles.resetBox1} onClick={() => { handResetStatus() }}> </Button >
<Button className={classnames(StatusIsDisabled ? styles.button1 : styles.activeButton1)} disabled={StatusIsDisabled} onClick={() => handSlectStatus()}> </Button >
</View>
</View>
</Popup> </Popup>
</View> </View>
) )
@ -620,7 +631,8 @@ const GoodsItem = memo((porps: PropGoods) => {
item.av_product_color.map((it, inx) => { item.av_product_color.map((it, inx) => {
return ( return (
<View className={styles.itemGoods} key={inx}> <View className={styles.itemGoods} key={inx}>
<View className={styles.itemPic} style={{ backgroundColor: `rgb(${it?.rgb?.r} ${it?.rgb?.g} ${it?.rgb?.b})` }}></View> <Image className={styles.itemPic} mode={'aspectFill'} src={'https://test.cdn.zzfzyc.com/mall/no_img.png'}></Image>
{/* <View className={styles.itemPic} style={{ backgroundColor: `rgb(${it?.rgb?.r} ${it?.rgb?.g} ${it?.rgb?.b})` }}></View> */}
<View className={styles.itemRight}> <View className={styles.itemRight}>
<View className={styles.item_right_top}> <View className={styles.item_right_top}>
<View className={styles.itemName}>{it.product_color_code} {it.product_color_name}</View> <View className={styles.itemName}>{it.product_color_code} {it.product_color_name}</View>

View File

@ -40,7 +40,7 @@
margin-right: 42px; margin-right: 42px;
width: 108px; width: 108px;
height: 108px; height: 108px;
background: #322F2F; // background: #322F2F;
border-radius: 8px; border-radius: 8px;
} }
@ -174,7 +174,7 @@
margin-right: 42px; margin-right: 42px;
width: 108px; width: 108px;
height: 108px; height: 108px;
background: #322F2F; // background: #322F2F;
border-radius: 8px; border-radius: 8px;
} }
@ -413,6 +413,7 @@
} }
.popupBox { .popupBox {
height: 500px;
padding-bottom: env(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom);

View File

@ -1,4 +1,4 @@
import { View, Input, Button, Image, Text, Textarea } from '@tarojs/components' import { View, Input, Button, Image, Text, Textarea, ScrollView } from '@tarojs/components'
import { useCallback, useEffect, useMemo, useRef, useState, ReactNode, memo } from 'react' import { useCallback, useEffect, useMemo, useRef, useState, ReactNode, memo } from 'react'
import styles from "./index.module.scss" import styles from "./index.module.scss"
import classnames from "classnames"; import classnames from "classnames";
@ -78,7 +78,7 @@ export default () => {
item.av_product_color.map(it => { item.av_product_color.map(it => {
if (it.sale_order_detail_id === val.sale_order_detail_id) { if (it.sale_order_detail_id === val.sale_order_detail_id) {
if (val.nums === 1) { if (val.nums === 1) {
// it.isTui = false it.isTui = false
it.nums = 1 it.nums = 1
} else { } else {
it.nums-- it.nums--
@ -263,6 +263,14 @@ export default () => {
//确认退款 //确认退款
const { fetchData: sureFetch } = mpreturnApplyOrder() const { fetchData: sureFetch } = mpreturnApplyOrder()
const handSure = () => { const handSure = () => {
if (queryRef.current.reasonName == '其他问题' && TextareaValue == '') {
Taro.showToast({
title: '请填写其他说明',
icon: 'error',
duration: 3000
})
return false
}
let arr: any = []; let arr: any = [];
if (infoObj.sale_mode == 0 && infoObj.status == 9) { if (infoObj.sale_mode == 0 && infoObj.status == 9) {
ListArr.forEach((item) => { ListArr.forEach((item) => {
@ -386,8 +394,7 @@ export default () => {
value={TextareaValue} value={TextareaValue}
// style='background:#f6f6f6;height:210px;padding:15rpx 24rpx 24rpx 24rpx;border-radius: 8rpx;' // style='background:#f6f6f6;height:210px;padding:15rpx 24rpx 24rpx 24rpx;border-radius: 8rpx;'
placeholderStyle='font-size: 28rpx;font-weight: 400;' placeholderStyle='font-size: 28rpx;font-weight: 400;'
autoFocus placeholder={'选填/退款说明中选择(其他问题)必填'}
placeholder={'选填/退货说明中选择时(其他问题)必填'}
></Textarea> ></Textarea>
</View> </View>
</View> </View>
@ -406,27 +413,28 @@ export default () => {
</View> </View>
</View> </View>
<Popup title={'筛选情况'} show={showPopup} onClose={() => { setshowPopup?.(false) }}> <Popup title={'筛选情况'} show={showPopup} onClose={() => { setshowPopup?.(false) }}>
<ScrollView scrollY>
<View className={styles.popupBox}>
<View className={styles.thirdBox}>
<View className={styles.thirdTopfont}>退</View>
<View className={styles.flexModebox}>
{
List.map((item, index) => {
return (
<View onClick={() => { handReasonOne(item) }} className={classnames(item.default ? styles.activemodeBox : styles.modeBox)} key={index}>{item.name}</View>
)
})
}
</View>
</View>
<View className={styles.safeBoxs} ></View>
<View className={styles.bottomBox1}>
<View className={styles.popupBox}> <Button className={styles.resetBox1} onClick={() => { handReset() }}> </Button >
<View className={styles.thirdBox}> <Button className={classnames(isDisabled ? styles.button1 : styles.activeButton1)} disabled={isDisabled} onClick={() => handSlect()}> </Button >
<View className={styles.thirdTopfont}>退</View>
<View className={styles.flexModebox}>
{
List.map((item, index) => {
return (
<View onClick={() => { handReasonOne(item) }} className={classnames(item.default ? styles.activemodeBox : styles.modeBox)} key={index}>{item.name}</View>
)
})
}
</View> </View>
</View> </View>
<View className={styles.safeBoxs} ></View> </ScrollView>
<View className={styles.bottomBox1}>
<Button className={styles.resetBox1} onClick={() => { handReset() }}> </Button >
<Button className={classnames(isDisabled ? styles.button1 : styles.activeButton1)} disabled={isDisabled} onClick={() => handSlect()}> </Button >
</View>
</View>
</Popup> </Popup>
</View> </View>
) )
@ -471,7 +479,8 @@ const GoodsItem = memo((porps: PropGoods) => {
item.av_product_color.map((it, inx) => { item.av_product_color.map((it, inx) => {
return ( return (
<View className={styles.itemGoods} key={inx}> <View className={styles.itemGoods} key={inx}>
<View className={styles.itemPic} style={{ backgroundColor: `rgb(${it?.rgb?.r} ${it?.rgb?.g} ${it?.rgb?.b})` }}></View> <Image className={styles.itemPic} mode={'aspectFill'} src={'https://test.cdn.zzfzyc.com/mall/no_img.png'}></Image>
{/* <View className={styles.itemPic} style={{ backgroundColor: `rgb(${it?.rgb?.r} ${it?.rgb?.g} ${it?.rgb?.b})` }}></View> */}
<View className={styles.itemRight}> <View className={styles.itemRight}>
<View className={styles.item_right_top}> <View className={styles.item_right_top}>
<View className={styles.itemName}>{it.product_color_code} {it.product_color_name}</View> <View className={styles.itemName}>{it.product_color_code} {it.product_color_name}</View>

View File

@ -12,6 +12,7 @@
justify-content: space-between; justify-content: space-between;
position: relative; position: relative;
border-bottom: 1px solid #f7f7f7; border-bottom: 1px solid #f7f7f7;
padding-bottom: 47px;
.textAreaLeft { .textAreaLeft {
font-size: 28px; font-size: 28px;
@ -79,6 +80,7 @@
align-items: center; align-items: center;
flex-direction: column; flex-direction: column;
overflow: hidden; overflow: hidden;
.topFont { .topFont {
margin-top: 32px; margin-top: 32px;
font-size: 28px; font-size: 28px;

View File

@ -123,14 +123,17 @@ export default () => {
<View className={styles.textAreaBox}> <View className={styles.textAreaBox}>
<View className={styles.textAreaLeft}></View> <View className={styles.textAreaLeft}></View>
<View className={styles.textAreaRight}> <View className={styles.textAreaRight}>
<Textarea {
disabled={true} Query.remark !== '' && <Textarea
style={{ width: '70%' }} disabled={true}
value={Query.remark} style={{ width: '70%' }}
placeholderStyle='font-size: 28rpx;font-weight: 400;' value={Query.remark}
autoFocus placeholderStyle='font-size: 28rpx;font-weight: 400;'
maxlength={64} autoFocus
></Textarea> maxlength={64}
></Textarea>
}
{/* <View className={styles.numsTotal}>{`${typeof (Query.nums) == 'undefined' ? 0 : Query.nums}/64`}</View> */} {/* <View className={styles.numsTotal}>{`${typeof (Query.nums) == 'undefined' ? 0 : Query.nums}/64`}</View> */}
</View> </View>
</View> </View>

View File

@ -82,16 +82,17 @@
justify-content: space-between; justify-content: space-between;
.item_add { .item_add {
margin-left: 20px;
line-height: 45px; line-height: 45px;
// font-size: 40px; // font-size: 40px;
margin-left: 8px; // margin-left: 8px;
} }
.item_add_font { .item_add_font {
font-size: 24px; font-size: 24px;
font-weight: 500; font-weight: 500;
color: #4581FF; color: #4581FF;
margin-right: 10px; margin-right: 15px;
} }
} }
} }

View File

@ -210,7 +210,7 @@ export default () => {
const { fetchData: putFetch } = mppurchaserput() const { fetchData: putFetch } = mppurchaserput()
//提交 //提交
const handSure = async () => { const handSure = async () => {
if (!isDisabled) return false // if (!isDisabled) return false
let query = { let query = {
...formData, ...formData,
remark: remarkDesc, remark: remarkDesc,

View File

@ -10,13 +10,15 @@ import { GetAddressListApi } from "@/api/addressList";
import Tabs from "../tabs" import Tabs from "../tabs"
import IconFont from '@/components/iconfont/iconfont'; import IconFont from '@/components/iconfont/iconfont';
interface Props { interface Props {
handCity?: (province: any, city: any) => void handCity?: (province: any, city: any) => void,
value?: any
} }
export default memo(forwardRef((props: Props, ref) => { export default memo(forwardRef((props: Props, ref) => {
useImperativeHandle(ref, () => ({ useImperativeHandle(ref, () => ({
close close,
DropDownItemRef
})) }))
const DropDownItemRef = useRef<any>() const DropDownItemRef = useRef<any>()

View File

@ -73,11 +73,12 @@
display: flex; display: flex;
.phoneFont { .phoneFont {
margin-right: 40px; // margin-right: 40px;
margin-left: 16px; margin-left: 16px;
font-size: 24px; font-size: 24px;
font-weight: 400; font-weight: 400;
color: #4581FF; color: #4581FF;
width: 100rpx;
} }
} }
} }

View File

@ -29,19 +29,29 @@ export default memo((props: Props) => {
<View className={styles.mainItem} onClick={() => handNav()}> <View className={styles.mainItem} onClick={() => handNav()}>
<View className={styles.itemTop}> <View className={styles.itemTop}>
<View className={styles.itemLeft}> <View className={styles.itemLeft}>
<View className={styles.itemCile}>{props.obj.name[0]}</View> <View className={styles.leftSafe}>
<View className={styles.itemCile}>{props.obj.name[0]}</View>
</View>
<View className={styles.item_top_one}> <View className={styles.item_top_one}>
<View className={styles.item_top_one_flex}> <View className={styles.item_top_one_flex}>
<View className={styles.itemName}>{props.obj.name}</View> <View className={styles.itemName}>{props.obj.name}</View>
<View className={styles.itemPhone}>{props.obj.phone}</View> <View className={styles.itemPhone}>{props.obj.phone}</View>
</View> </View>
<View className={styles.item_tag_box}> <View className={styles.item_tag_box}>
<View className={styles.item_tagItem}></View> <View className={styles.item_tagItem}>{props.obj.purchaser_type_name || '暂无'}</View>
<View className={styles.item_tagItem}>{props.obj.sale_user_name || '暂无'}</View> <View className={styles.item_tagItem}>{props.obj.sale_user_name || '暂无'}</View>
{
props.obj?.label_list?.map(item => {
return (
<View className={styles.item_tagItem}>{item.label_name}</View>
)
})
}
</View> </View>
</View> </View>
</View> </View>
<View className={styles.itemRight} onClick={(e) => handPhone(e)}> <View className={styles.itemRight} onClick={(e) => handPhone(e)}>
<IconFont name={'icon-dianhua'} size={30} color={'#337FFF'}></IconFont> <IconFont name={'icon-dianhua'} size={30} color={'#337FFF'}></IconFont>
<View className={styles.phoneFont}>TA</View> <View className={styles.phoneFont}>TA</View>
</View> </View>

View File

@ -1,5 +1,5 @@
import { View } from '@tarojs/components' import { View } from '@tarojs/components'
import React, { useCallback, memo, useEffect, useMemo, useRef, useState, ReactNode } from 'react' import React, { useCallback, memo, useEffect, useMemo, useRef, useState, ReactNode, forwardRef, useImperativeHandle } from 'react'
import styles from "./index.module.scss" import styles from "./index.module.scss"
import classnames from "classnames"; import classnames from "classnames";
import Taro, { usePullDownRefresh, useRouter, useDidShow } from '@tarojs/taro'; import Taro, { usePullDownRefresh, useRouter, useDidShow } from '@tarojs/taro';
@ -7,31 +7,51 @@ import { alert } from '@/common/common'
import { formatPriceDiv, formatDateTime, formatWeightDiv } from '@/common/format' import { formatPriceDiv, formatDateTime, formatWeightDiv } from '@/common/format'
import DropDownItem from '@/components/dropDown-item' import DropDownItem from '@/components/dropDown-item'
interface Props { interface Props {
handSort?: (any) => void handSort?: (any) => void,
value?: any
} }
export default memo((props: Props) => { export default memo(forwardRef((props: Props, ref) => {
const DropDownItemRef = useRef<any>() const DropDownItemRef = useRef<any>()
// const close = () => { // const close = () => {
// DropDownItemRef.current.closePopup() // DropDownItemRef.current.closePopup()
// } // }
useImperativeHandle(ref, () => ({
DropDownItemRef
}))
const [list, setlist] = useState<any[]>([ const [list, setlist] = useState<any[]>([
{ {
name: '下单时间', name: '下单时间正序',
id: '1', id: '1',
checked: false checked: false
}, },
{ {
name: '创建时间', name: '创建时间正序',
id: '2', id: '2',
checked: false checked: false
}, },
{ {
name: '更新时间', name: '更新时间正序',
id: '3', id: '3',
checked: false checked: false
},
{
name: '下单时间倒序',
id: '-1',
checked: false
},
{
name: '创建时间倒序',
id: '-2',
checked: false
},
{
name: '更新时间倒序',
id: '-3',
checked: false
} }
]) ])
@ -74,4 +94,4 @@ export default memo((props: Props) => {
</View> </View>
</DropDownItem> </DropDownItem>
) )
}) }))

View File

@ -1,5 +1,5 @@
import { View } from '@tarojs/components' import { View } from '@tarojs/components'
import React, { useCallback, memo, useEffect, useMemo, useRef, useState, ReactNode } from 'react' import React, { useCallback, memo, useEffect, useMemo, useRef, useState, ReactNode, forwardRef, useImperativeHandle } from 'react'
import styles from "./index.module.scss" import styles from "./index.module.scss"
import classnames from "classnames"; import classnames from "classnames";
import Taro, { usePullDownRefresh, useRouter, useDidShow } from '@tarojs/taro'; import Taro, { usePullDownRefresh, useRouter, useDidShow } from '@tarojs/taro';
@ -9,13 +9,16 @@ import DropDownItem from '@/components/dropDown-item'
import { mppurchaserlist } from "@/api/customer" import { mppurchaserlist } from "@/api/customer"
interface Props { interface Props {
handType: (any) => void, handType: (any) => void,
handTags: (any) => void handTags: (any) => void,
value?: any
} }
export default memo((props: Props) => { export default memo(forwardRef((props: Props, ref) => {
const DropDownItemRef = useRef<any>() const DropDownItemRef = useRef<any>()
useImperativeHandle(ref, () => ({
DropDownItemRef
}))
const [currentValue, setCurrentValue] = useState<number>(-1) const [currentValue, setCurrentValue] = useState<number>(-1)
const [list, setlist] = useState<any[]>([ const [list, setlist] = useState<any[]>([
@ -99,4 +102,4 @@ export default memo((props: Props) => {
</View> </View>
</DropDownItem> </DropDownItem>
) )
}) }))

View File

@ -92,6 +92,9 @@ export default () => {
setSearchField((val) => ({ ...val, size: 10, abstract_sort_key: e })) setSearchField((val) => ({ ...val, size: 10, abstract_sort_key: e }))
}, []) }, [])
const SortRef = useRef<any>()
const TagRef = useRef<any>()
//筛选城市 //筛选城市
const ChoseCityRef = useRef<any>() const ChoseCityRef = useRef<any>()
const handCity = useCallback((provinceVal, cityVal) => { const handCity = useCallback((provinceVal, cityVal) => {
@ -127,6 +130,7 @@ export default () => {
setSearchField((val) => ({ ...val, size: 10, label_ids: arr.length === 0 ? '' : arr })) setSearchField((val) => ({ ...val, size: 10, label_ids: arr.length === 0 ? '' : arr }))
}, []) }, [])
return ( return (
<View className={styles.mainBox}> <View className={styles.mainBox}>
<View className={styles.topBox}> <View className={styles.topBox}>
@ -134,9 +138,9 @@ export default () => {
<Search placeholder='搜索客户名称、电话、业务员' showBtn={false} changeOnSearch={getSearchData} debounceTime={300} /> <Search placeholder='搜索客户名称、电话、业务员' showBtn={false} changeOnSearch={getSearchData} debounceTime={300} />
</View> </View>
<View className={styles.menuBox}> <View className={styles.menuBox}>
<Sort handSort={handSort}></Sort> <Sort ref={SortRef} handSort={handSort}></Sort>
<ChoseCity ref={ChoseCityRef} handCity={handCity}></ChoseCity> <ChoseCity ref={ChoseCityRef} handCity={handCity}></ChoseCity>
<Tag handTags={handTags} handType={handType}></Tag> <Tag ref={TagRef} handTags={handTags} handType={handType}></Tag>
</View> </View>
</View> </View>
<View className={styles.totalFont}> {orderData?.total || 0} </View> <View className={styles.totalFont}> {orderData?.total || 0} </View>
@ -155,8 +159,8 @@ export default () => {
</InfiniteScroll> </InfiniteScroll>
</View> </View>
<View className={styles.bottom_box}> <View className={styles.bottom_box}>
<View className={styles.bottom_btn} onClick={() => goLink('/pages/customerEditor/index?type=add')}></View> <View className={styles.bottom_btn} onClick={() => goLink('/pages/customerEditor/index?type=add')}></View>
</View> </View>
</View> </View >
) )
} }

View File

@ -21,7 +21,7 @@ page {
} }
.listBox { .listBox {
height: 100vh; height: calc(100vh - 170px);
} }
.itemBox { .itemBox {

View File

@ -15,7 +15,7 @@ export default () => {
const [search, setSearch] = useState({ const [search, setSearch] = useState({
name: null, name_phone_or_sale_user: null,
page: 1, page: 1,
size: 10, size: 10,
}) })
@ -36,17 +36,17 @@ export default () => {
const getSearchData = useCallback((eq) => { const getSearchData = useCallback((eq) => {
pageNum.current.page = 1 pageNum.current.page = 1
setClientlist(() => ({ list: [], total: 0 })) setClientlist(() => ({ list: [], total: 0 }))
setSearch((e) => ({ ...e, name: eq, size: 10 })) setSearch((e) => ({ ...e, name_phone_or_sale_user: eq, size: 10 }))
}, []) }, [])
const router = useRouter() const router = useRouter()
useEffect(() => { useEffect(() => {
if (search.name === '') { if (search.name_phone_or_sale_user === '') {
setSearch((e) => ({ ...e, name: null })) setSearch((e) => ({ ...e, name_phone_or_sale_user: null }))
} }
if (search.name !== '') getCuss() if (search.name_phone_or_sale_user !== '') getCuss()
}, [search]) }, [search])
//上拉加载数据 //上拉加载数据
@ -68,7 +68,7 @@ export default () => {
setSearch((val) => ({ ...val, size: 10 })) setSearch((val) => ({ ...val, size: 10 }))
} }
const getCuss = async () => { const getCuss = async () => {
let res = await clitentFetch({ name: search.name === null ? '' : search.name, page: search.page, size: search.size }) let res = await clitentFetch({ name_phone_or_sale_user: search.name_phone_or_sale_user === null ? '' : search.name_phone_or_sale_user, page: search.page, size: search.size })
if (router?.params.clientId) { if (router?.params.clientId) {
res.data.list.map(item => { res.data.list.map(item => {
if (item.id == router?.params.clientId) { if (item.id == router?.params.clientId) {

View File

@ -125,6 +125,7 @@ export default () => {
setSearchObj((e) => ({ ...e, goodsId: item.id })) setSearchObj((e) => ({ ...e, goodsId: item.id }))
setShowShopCart(true) setShowShopCart(true)
setGoodsobj(item) setGoodsobj(item)
ShopCartRef.current.SearchRef.current.clearInput()
} }
const getGoodList = async () => { const getGoodList = async () => {

View File

@ -12,6 +12,7 @@ interface prosObj {
} }
handApplyGoods?: () => void, handApplyGoods?: () => void,
handApplyMoney?: () => void, handApplyMoney?: () => void,
goodsObj?: any
// handSureGoods?: () => void, // handSureGoods?: () => void,
} }
@ -26,17 +27,18 @@ export default memo((props: prosObj) => {
}, },
handApplyGoods, handApplyGoods,
handApplyMoney, handApplyMoney,
goodsObj = {}
// handSureGoods // handSureGoods
} = props } = props
//判断显示申请退货 //判断显示申请退货
const showTuihuo = useMemo(() => { const showTuihuo = useMemo(() => {
if ( if (
(obj.sale_mode === 0 && obj.status == 9 && obj.collect_status == 0) || (obj.sale_mode === 0 && obj.status == 9 && obj.collect_status == 0 && goodsObj?.av_return_product?.length) ||
(obj.sale_mode === 0 && obj.status == 9 && obj.collect_status == 1) || (obj.sale_mode === 0 && obj.status == 9 && obj.collect_status == 1 && goodsObj?.av_return_product?.length) ||
(obj.sale_mode === 0 && obj.status == 9 && obj.collect_status == 2) || (obj.sale_mode === 0 && obj.status == 9 && obj.collect_status == 2 && goodsObj?.av_return_product?.length) ||
(obj.sale_mode === 0 && obj.status == 9 && obj.settle_mode == 3) || (obj.sale_mode === 0 && obj.status == 9 && obj.settle_mode == 3 && goodsObj?.av_return_product?.length) ||
(obj.sale_mode === 2 && obj.status == 9) (obj.sale_mode === 2 && obj.status == 9 && goodsObj?.av_return_product?.length)
) { ) {
return true return true
} else return false } else return false
@ -44,16 +46,16 @@ export default memo((props: prosObj) => {
//判断显示申请退款 //判断显示申请退款
const showTuikuan = useMemo(() => { const showTuikuan = useMemo(() => {
if ( if (
(obj.sale_mode === 0 && obj.status == 2 && obj.collect_status == 1) || (obj.sale_mode === 0 && obj.status == 2 && obj.collect_status == 1 && goodsObj?.av_return_product?.length) ||
(obj.sale_mode === 0 && obj.status == 7 && obj.collect_status == 0) || (obj.sale_mode === 0 && obj.status == 7 && obj.collect_status == 0 && goodsObj?.av_return_product?.length) ||
(obj.sale_mode === 0 && obj.status == 11 && (obj.collect_status == 1 || obj.collect_status == 2)) || (obj.sale_mode === 0 && obj.status == 11 && (obj.collect_status == 1 || obj.collect_status == 2) && goodsObj?.av_return_product?.length) ||
(obj.sale_mode === 0 && obj.status == 3 && obj.collect_status == 0) || (obj.sale_mode === 0 && obj.status == 3 && obj.collect_status == 0 && goodsObj?.av_return_product?.length) ||
(obj.sale_mode === 0 && obj.status == 3 && obj.collect_status == 2) || (obj.sale_mode === 0 && obj.status == 3 && obj.collect_status == 2 && goodsObj?.av_return_product?.length) ||
(obj.sale_mode === 0 && obj.status == 3 && obj.collect_status == 1) || (obj.sale_mode === 0 && obj.status == 3 && obj.collect_status == 1 && goodsObj?.av_return_product?.length) ||
(obj.sale_mode === 1 && obj.status == 0) || (obj.sale_mode === 1 && obj.status == 0 && goodsObj?.av_return_product?.length) ||
(obj.sale_mode === 1 && obj.status == 9) || (obj.sale_mode === 1 && obj.status == 9 && goodsObj?.av_return_product?.length) ||
(obj.sale_mode === 2 && obj.status == 0 && obj.collect_status == 1) || (obj.sale_mode === 2 && obj.status == 0 && obj.collect_status == 1 && goodsObj?.av_return_product?.length) ||
(obj.sale_mode === 2 && obj.status == 0 && obj.collect_status == 2) (obj.sale_mode === 2 && obj.status == 0 && obj.collect_status == 2 && goodsObj?.av_return_product?.length)
) { ) {
return true return true
} else return false } else return false

View File

@ -598,9 +598,9 @@ export default () => {
const BottomBtnsRef = useRef<any>() const BottomBtnsRef = useRef<any>()
const [showOther, setshowOther] = useState(false) const [showOther, setshowOther] = useState(false)
const testOther = useMemo(() => { useMemo(() => {
Taro.nextTick(() => { Taro.nextTick(() => {
if (BottomBtnsRef.current?.itemNums >= 2) { if (BottomBtnsRef.current?.itemNums >= 3) {
setshowOther(true) setshowOther(true)
return true return true
} else { } else {
@ -641,14 +641,14 @@ export default () => {
<View className={styles.totalFont}></View> <View className={styles.totalFont}></View>
<IconFont name={'icon-tishi'} size={28} ></IconFont> <IconFont name={'icon-tishi'} size={28} ></IconFont>
</View> </View>
<View className={styles.shoudPay}>{formatPriceDiv(infoObj.bill_total_sale_price)}</View> <View className={styles.shoudPay}>¥{formatPriceDiv(infoObj.bill_total_sale_price)}</View>
</View> </View>
<View className={styles.flexMoney}> <View className={styles.flexMoney}>
<View className={styles.flexTotalBox}> <View className={styles.flexTotalBox}>
<View className={styles.totalFont}></View> <View className={styles.totalFont}></View>
<IconFont name={'icon-tishi'} size={28} ></IconFont> <IconFont name={'icon-tishi'} size={28} ></IconFont>
</View> </View>
<View className={styles.shoudPay}>{formatPriceDiv(infoObj.actual_amount)}</View> <View className={styles.shoudPay}>¥{formatPriceDiv(infoObj.actual_amount)}</View>
</View> </View>
<View className={styles.flexMoney}> <View className={styles.flexMoney}>
<View className={styles.flexTotalBox}> <View className={styles.flexTotalBox}>
@ -656,7 +656,7 @@ export default () => {
{/* <View className={classnames('iconfont', 'icon-tishi', styles.tishi)}></View> */} {/* <View className={classnames('iconfont', 'icon-tishi', styles.tishi)}></View> */}
<IconFont name={'icon-tishi'} size={28} ></IconFont> <IconFont name={'icon-tishi'} size={28} ></IconFont>
</View> </View>
<View className={styles.shoudPay}>{formatPriceDiv(infoObj.wait_pay_amount)}</View> <View className={styles.shoudPay}>¥{formatPriceDiv(infoObj.wait_pay_amount)}</View>
</View> </View>
</View> </View>
<DefaultBox title={'订单信息'}> <DefaultBox title={'订单信息'}>
@ -707,6 +707,7 @@ export default () => {
showMore && <View className={styles.posssBox}> showMore && <View className={styles.posssBox}>
<BottomApply <BottomApply
obj={infoObj} obj={infoObj}
goodsObj={infoObj}
handApplyGoods={() => handApplyGood?.()} handApplyGoods={() => handApplyGood?.()}
handApplyMoney={() => handApplyMoney?.()} handApplyMoney={() => handApplyMoney?.()}
></BottomApply> ></BottomApply>
@ -719,6 +720,7 @@ export default () => {
<BottomBtns <BottomBtns
ref={BottomBtnsRef} ref={BottomBtnsRef}
showDetail showDetail
goodsObj={infoObj}
obj={infoObj} obj={infoObj}
showTuiGoods showTuiGoods
cancle={(e) => cancle?.(e, infoObj)} cancle={(e) => cancle?.(e, infoObj)}

View File

@ -205,7 +205,7 @@
// margin-right: 42px; // margin-right: 42px;
width: 108px; width: 108px;
height: 108px; height: 108px;
background: #322F2F; // background: #322F2F;
border-radius: 8px; border-radius: 8px;
} }
@ -272,7 +272,7 @@
// margin-right: 42px; // margin-right: 42px;
width: 108px; width: 108px;
height: 108px; height: 108px;
background: #322F2F; // background: #322F2F;
border-radius: 8px; border-radius: 8px;
} }

View File

@ -17,6 +17,7 @@ import Popup from '@/components/popup';
import UploadImage from '@/components/uploadImage' import UploadImage from '@/components/uploadImage'
import { alert } from '@/common/common'; import { alert } from '@/common/common';
import RefundCodelist from "@/components/RefundCodelist" import RefundCodelist from "@/components/RefundCodelist"
import LabAndImg from "@/components/LabAndImg"
export default () => { export default () => {
//页面下拉刷新 //页面下拉刷新
usePullDownRefresh(() => { usePullDownRefresh(() => {
@ -50,7 +51,7 @@ export default () => {
if (it.leftTitle === '退货说明:') { if (it.leftTitle === '退货说明:') {
it.rightTitle = res.data.return_explain_name it.rightTitle = res.data.return_explain_name
} }
if (it.leftTitle === '其他什么') { if (it.leftTitle === '其他说明') {
it.rightTitle = res.data.reason_describe it.rightTitle = res.data.reason_describe
} }
if (it.leftTitle === '货物状况:') { if (it.leftTitle === '货物状况:') {
@ -100,7 +101,7 @@ export default () => {
rightTitle: '------', rightTitle: '------',
}, },
{ {
leftTitle: '其他什么', leftTitle: '其他说明',
rightTitle: '------', rightTitle: '------',
}, },
{ {
@ -378,6 +379,10 @@ interface PropGoods {
} }
const GoodsItem = memo((porps: PropGoods) => { const GoodsItem = memo((porps: PropGoods) => {
const { list = [], obj = {} } = porps const { list = [], obj = {} } = porps
const labAndImgObj = useCallback((item) => {
return { lab: item.lab, rgb: item.rgb, texture_url: item.texture_url }
}, [])
return ( return (
<> <>
{ {
@ -389,7 +394,16 @@ const GoodsItem = memo((porps: PropGoods) => {
item.product_colors.map((it, inx) => { item.product_colors.map((it, inx) => {
return ( return (
<View className={styles.itemGoods}> <View className={styles.itemGoods}>
<View className={styles.itemPic} style={{ backgroundColor: `rgb(${it?.rgb?.r} ${it?.rgb?.g} ${it?.rgb?.b})` }}></View> {
it.texture_url === '' &&
<Image className={styles.itemPic} mode={'aspectFill'} src={'https://test.cdn.zzfzyc.com/mall/no_img.png'}></Image>
}
{
it.texture_url !== '' &&
<View className={styles.itemPic}>
<LabAndImg value={labAndImgObj(it)} />
</View>
}
<View className={styles.clear}> </View> <View className={styles.clear}> </View>
<View className={styles.itemRight}> <View className={styles.itemRight}>
<View className={styles.item_right_top}> <View className={styles.item_right_top}>

View File

@ -205,7 +205,7 @@
// margin-right: 42px; // margin-right: 42px;
width: 108px; width: 108px;
height: 108px; height: 108px;
background: #322F2F; // background: #322F2F;
border-radius: 8px; border-radius: 8px;
} }
@ -271,7 +271,7 @@
// margin-right: 42px; // margin-right: 42px;
width: 108px; width: 108px;
height: 108px; height: 108px;
background: #322F2F; // background: #322F2F;
border-radius: 8px; border-radius: 8px;
} }

View File

@ -2,7 +2,7 @@ import { View, Input, Button, Image } from '@tarojs/components'
import { useCallback, useEffect, useMemo, useRef, useState, ReactNode, memo } from 'react' import { useCallback, useEffect, useMemo, useRef, useState, ReactNode, memo } from 'react'
import styles from "./index.module.scss" import styles from "./index.module.scss"
import classnames from "classnames"; import classnames from "classnames";
import Taro, { faceVerifyForPay, useDidShow, useRouter } from '@tarojs/taro' import Taro, { faceVerifyForPay, useDidShow, useRouter, usePullDownRefresh } from '@tarojs/taro'
import ItemList from './components/itemList' import ItemList from './components/itemList'
import { formatDateTime, formatHashTag, formatImgUrl, formatPriceDiv, formatWeightDiv } from '@/common/format' import { formatDateTime, formatHashTag, formatImgUrl, formatPriceDiv, formatWeightDiv } from '@/common/format'
import { import {
@ -14,11 +14,18 @@ import OrderState from './components/orderState'
// import AddressDetailBox from './components/addressDetailBox' // import AddressDetailBox from './components/addressDetailBox'
import { IMG_CND_Prefix } from "@/common/constant"; import { IMG_CND_Prefix } from "@/common/constant";
import RefundCodelist from "@/components/RefundCodelist" import RefundCodelist from "@/components/RefundCodelist"
import LabAndImg from "@/components/LabAndImg"
export default () => { export default () => {
const router = useRouter() const router = useRouter()
useEffect(() => { useEffect(() => {
getDetail() getDetail()
}, []) }, [])
//页面下拉刷新
usePullDownRefresh(() => {
getDetail()
})
//获取详情 //获取详情
const { fetchData: detailFetch } = mpreturnApplyOrder() const { fetchData: detailFetch } = mpreturnApplyOrder()
const [DeatailObj, setDeatailObj] = useState<any>({}) const [DeatailObj, setDeatailObj] = useState<any>({})
@ -43,7 +50,7 @@ export default () => {
if (it.leftTitle === '退货说明:') { if (it.leftTitle === '退货说明:') {
it.rightTitle = res.data.return_explain_name it.rightTitle = res.data.return_explain_name
} }
if (it.leftTitle === '其他什么') { if (it.leftTitle === '其他说明') {
it.rightTitle = res.data.reason_describe it.rightTitle = res.data.reason_describe
} }
// if (it.leftTitle === '货物状况:') { // if (it.leftTitle === '货物状况:') {
@ -54,6 +61,7 @@ export default () => {
} }
}) })
setOrderMsg([...orderMsg]) setOrderMsg([...orderMsg])
Taro.stopPullDownRefresh();
// setPicList([...res.data?.accessory_url !== null ? res.data?.accessory_url : []]) // setPicList([...res.data?.accessory_url !== null ? res.data?.accessory_url : []])
Taro.hideLoading() Taro.hideLoading()
} }
@ -61,10 +69,10 @@ export default () => {
//分辨用质检中还是质检前的数组 //分辨用质检中还是质检前的数组
const productList = useMemo(() => { const productList = useMemo(() => {
if (DeatailObj.stage == 0 || DeatailObj.type == 3) { if (DeatailObj?.stage == 0 || DeatailObj?.type == 3) {
return DeatailObj.product_list return DeatailObj?.product_list
} else { } else {
return DeatailObj.quality_check_pass_product return DeatailObj?.quality_check_pass_product
} }
}, [DeatailObj]) }, [DeatailObj])
@ -90,7 +98,7 @@ export default () => {
rightTitle: '------', rightTitle: '------',
}, },
{ {
leftTitle: '其他什么', leftTitle: '其他说明',
rightTitle: '------', rightTitle: '------',
}, },
// { // {
@ -346,6 +354,9 @@ interface PropGoods {
} }
const GoodsItem = memo((porps: PropGoods) => { const GoodsItem = memo((porps: PropGoods) => {
const { list = [], obj = {} } = porps const { list = [], obj = {} } = porps
const labAndImgObj = useCallback((item) => {
return { lab: item.lab, rgb: item.rgb, texture_url: item.texture_url }
}, [])
return ( return (
<> <>
{ {
@ -354,10 +365,20 @@ const GoodsItem = memo((porps: PropGoods) => {
<View className={styles.goodsBox} key={index}> <View className={styles.goodsBox} key={index}>
<View className={styles.goodsProduct}>{item.code}# {item.name}</View> <View className={styles.goodsProduct}>{item.code}# {item.name}</View>
{ {
item.product_colors.map((it, inx) => { item?.product_colors.map((it, inx) => {
return ( return (
<View className={styles.itemGoods}> <View className={styles.itemGoods}>
<View className={styles.itemPic} style={{ backgroundColor: `rgb(${it?.rgb?.r} ${it?.rgb?.g} ${it?.rgb?.b})` }}></View> {
it.texture_url === '' &&
<Image className={styles.itemPic} mode={'aspectFill'} src={'https://test.cdn.zzfzyc.com/mall/no_img.png'}></Image>
}
{
it.texture_url !== '' &&
<View className={styles.itemPic}>
<LabAndImg value={labAndImgObj(it)} />
</View>
}
{/* <View className={styles.itemPic} style={{ backgroundColor: `rgb(${it?.rgb?.r} ${it?.rgb?.g} ${it?.rgb?.b})` }}></View> */}
<View className={styles.clear}> </View> <View className={styles.clear}> </View>
<View className={styles.itemRight}> <View className={styles.itemRight}>
<View className={styles.item_right_top}> <View className={styles.item_right_top}>

View File

@ -1,11 +1,11 @@
import { ScrollView, View } from '@tarojs/components' import { ScrollView, View, Image } from '@tarojs/components'
import { memo, useCallback, useEffect, useMemo, useState } from 'react' import { memo, useCallback, useEffect, useMemo, useState } from 'react'
import styles from './index.module.scss' import styles from './index.module.scss'
import classnames from 'classnames' import classnames from 'classnames'
// import BottomBtns from '@/components/BottomBtns' // import BottomBtns from '@/components/BottomBtns'
import { formatPriceDiv } from '@/common/format' import { formatPriceDiv } from '@/common/format'
import Taro from '@tarojs/taro' import Taro from '@tarojs/taro'
import LabAndImg from "@/components/LabAndImg"
interface propsObj { interface propsObj {
obj: any, obj: any,
cancle?: (arg: any, obj: any) => void, cancle?: (arg: any, obj: any) => void,
@ -29,6 +29,9 @@ export default memo((props: propsObj) => {
} }
const labAndImgObj = useCallback((item) => {
return { lab: item.lab, rgb: item.rgb, texture_url: item.texture_url }
}, [])
return ( return (
@ -41,7 +44,17 @@ export default memo((props: propsObj) => {
<View className={styles.line}></View> <View className={styles.line}></View>
<View className={styles.contBox}> <View className={styles.contBox}>
<View style={{ minWidth: '24%' }}> <View style={{ minWidth: '24%' }}>
<View className={styles.leftCont} style={{ backgroundColor: `rgb(${props?.obj?.product_list[0]?.product_colors[0]?.rgb?.r} ${props?.obj?.product_list[0]?.product_colors[0]?.rgb?.g} ${props?.obj?.product_list[0]?.product_colors[0]?.rgb?.b})` }}> <View className={styles.leftCont} >
{
props?.obj?.product_list[0]?.texture_url === '' &&
<Image className={styles.leftCont} mode={'aspectFill'} src={'https://test.cdn.zzfzyc.com/mall/no_img.png'}></Image>
}
{
props?.obj?.product_list[0]?.texture_url !== '' &&
<>
<LabAndImg value={labAndImgObj(props?.obj?.product_list?.[0])} /></>
}
<View className={styles.leftContNums}> ({props?.obj?.total_colors})</View> <View className={styles.leftContNums}> ({props?.obj?.total_colors})</View>
</View> </View>
</View> </View>
@ -99,11 +112,10 @@ export default memo((props: propsObj) => {
} {props?.obj?.sale_mode === 0 ? props?.obj?.total_number : props?.obj?.total_number / 100} {props?.obj?.sale_mode === 0 ? '条' : 'm'}</View> } {props?.obj?.sale_mode === 0 ? props?.obj?.total_number : props?.obj?.total_number / 100} {props?.obj?.sale_mode === 0 ? '条' : 'm'}</View>
</View> </View>
{ {
(props?.obj.stage == 5 || props?.obj.stage == 6 || props?.obj.stage == 3) && <View className={styles.bottomMsg}> (props?.obj.stage == 3) && <View className={styles.bottomMsg}>
<View className={styles.msgLeft}>退</View> <View className={styles.msgLeft}>退</View>
<View className={styles.msgRightOne}>¥{formatPriceDiv(props?.obj?.refund_amount)}</View> <View className={styles.msgRightOne}>¥{formatPriceDiv(props?.obj?.refund_amount)}</View>
</View> </View>
} }
{ {

View File

@ -395,13 +395,12 @@ export default () => {
</View> </View>
</View> </View>
<View className={styles.safeBox}></View> <View className={styles.safeBox}></View>
<View className={styles.bottomBox}>
<Button className={styles.resetBox} onClick={() => { handReset() }}> </Button >
<Button className={classnames(isDisabled ? styles.button2 : styles.activeButton)} disabled={isDisabled} onClick={() => handSure()}> </Button >
</View>
</ScrollView> </ScrollView>
<View className={styles.bottomBox}>
<Button className={styles.resetBox} onClick={() => { handReset() }}> </Button >
<Button className={classnames(isDisabled ? styles.button2 : styles.activeButton)} disabled={isDisabled} onClick={() => handSure()}> </Button >
</View>
{/* <View className={styles.areaBox}></View> */} {/* <View className={styles.areaBox}></View> */}
</View> </View>
</Popup> </Popup>

View File

@ -175,11 +175,13 @@ export default memo(() => {
}, []) }, [])
const [goodObj, setGoodsobj] = useState({}) const [goodObj, setGoodsobj] = useState({})
const ShopCartRef = useRef<any>()
//点击对应商品显示购物车 //点击对应商品显示购物车
const showCart = async (item) => { const showCart = async (item) => {
setSearchObj((e) => ({ ...e, goodsId: item.id })) setSearchObj((e) => ({ ...e, goodsId: item.id }))
setShowShopCart(true) setShowShopCart(true)
setGoodsobj(item) setGoodsobj(item)
ShopCartRef.current.SearchRef.current.clearInput()
} }
//点击加展示输入框 //点击加展示输入框
@ -396,7 +398,9 @@ export default memo(() => {
} }
</> </>
} }
<ShopCart handSure={() => handSure()} <ShopCart
ref={ShopCartRef}
handSure={() => handSure()}
clientName={clientObj?.clientName} clientName={clientObj?.clientName}
clientId={clientObj?.clientId} clientId={clientObj?.clientId}
modeFont={search.modeId} modeFont={search.modeId}

View File

@ -186,7 +186,7 @@ export default () => {
<IconFont name={'icon-tishi'} size={28} ></IconFont> <IconFont name={'icon-tishi'} size={28} ></IconFont>
{/* <View className={classnames('iconfont', 'icon-tishi', styles.tishi)}></View> */} {/* <View className={classnames('iconfont', 'icon-tishi', styles.tishi)}></View> */}
</View> </View>
<View className={styles.shoudPay}>{formatPriceDiv(infoObj.estimate_amount)}</View> <View className={styles.shoudPay}>¥{formatPriceDiv(infoObj.estimate_amount)}</View>
</View> </View>
</View> </View>
<DefaultBox title={'备注信息'} showMode={true} modeName={`${'填写/修改备注'} >`} clickNode={() => setShowDesc(true)}> <DefaultBox title={'备注信息'} showMode={true} modeName={`${'填写/修改备注'} >`} clickNode={() => setShowDesc(true)}>