diff --git a/src/api/salesAfterOrder.ts b/src/api/salesAfterOrder.ts index 23a6732..b62b9ee 100644 --- a/src/api/salesAfterOrder.ts +++ b/src/api/salesAfterOrder.ts @@ -109,4 +109,14 @@ export const GetSaleOrderListApi = () => { url: `/v1/mall/enum/refundExplain`, method: "get", }) -} \ No newline at end of file +} + +/** + * 售后记录 + */ + export const ReturnRecordApi = () => { + return useRequest({ + url: `/v1/mall/saleOrder/return`, + method: "get", + }) +} diff --git a/src/common/constant.js b/src/common/constant.js index 346a828..deed9aa 100644 --- a/src/common/constant.js +++ b/src/common/constant.js @@ -4,14 +4,14 @@ // export const BASE_URL = `http://10.0.0.5:50001/lymarket` // export const BASE_URL = `http://192.168.0.89:40001/lymarket` // export const BASE_URL = `http://192.168.1.165:40001/lymarket` // 王霞 -export const BASE_URL = `https://test.zzfzyc.com/lymarket` // 测试环境 +// export const BASE_URL = `https://test.zzfzyc.com/lymarket` // 测试环境 // export const BASE_URL = `http://192.168.1.9:40001/lymarket` // 发 // export const BASE_URL = `http://192.168.1.9:50005/lymarket` // 发 // export const BASE_URL = `http://192.168.1.30:50001/lymarket` // 发 // export const BASE_URL = `https://dev.zzfzyc.com/lymarket` // 开发环境 // export const BASE_URL = `https://www.zzfzyc.com/lymarket` // 正式环境 // export const BASE_URL = `http://192.168.1.5:40001/lymarket` // 王霞 -// export const BASE_URL = `http://192.168.1.7:50002/lymarket` // 添 +export const BASE_URL = `http://192.168.1.7:50002/lymarket` // 添 // export const BASE_URL = `http://192.168.1.42:50001/lymarket` // 杰 // CDN diff --git a/src/components/addCollection/index.tsx b/src/components/addCollection/index.tsx index 0a74b4e..dfa0fe5 100644 --- a/src/components/addCollection/index.tsx +++ b/src/components/addCollection/index.tsx @@ -26,14 +26,19 @@ export default memo(({show = false, onClose, onAdd}: ReasonInfoParam) => { if(show) getFavoriteList() }, [show]) + const onCreate = () => { + onClose?.() + goLink('/pages/collection/index') + } + return ( - 选择文件夹 + 选择收藏夹 - goLink('/pages/collection/index')}>新建 + 新建 diff --git a/src/components/estimatedAmount/index.tsx b/src/components/estimatedAmount/index.tsx index c0b1586..39dd7c0 100644 --- a/src/components/estimatedAmount/index.tsx +++ b/src/components/estimatedAmount/index.tsx @@ -3,8 +3,8 @@ import { memo, useCallback, useEffect, useLayoutEffect, useMemo, useState } from import {formatKbPrice} from '@/common/common' import classnames from "classnames"; import styles from './index.module.scss' -import AmountShow from "../amountShow"; import Taro from "@tarojs/taro"; +import AmountShow from "../amountShow"; type Param = { style?: Object, diff --git a/src/components/orderBtns/index.tsx b/src/components/orderBtns/index.tsx index ed5af8e..0a8a676 100644 --- a/src/components/orderBtns/index.tsx +++ b/src/components/orderBtns/index.tsx @@ -91,11 +91,17 @@ export default memo(({orderInfo, onClick}:Param) => { value: [SaleOrderStatusBooking.value], //按钮对应: 待接单 label: '退款' }, + { + id: 9, + value: [SaleOrderStatusRefund.value], //售后记录按钮:已退款 + label: '售后记录' + }, { id: 2, value: [SaleOrderStatusTaking.value, SaleorderstatusWaitingPrePayment.value, SaleOrderStatusWaitingPayment.value, SaleOrderStatusWaitingDelivery.value, SaleOrderStatusWaitingReceipt.value, SaleOrderStatusAlreadyReceipt.value, SaleOrderStatusComplete.value], //去付款按钮对应:待付款, 待发货, 待收货, 已收货, 已完成 label: '去付款' }, + ]) //判断是否显示该按钮 diff --git a/src/components/searchInput/index.module.scss b/src/components/searchInput/index.module.scss index dcdd256..04d420f 100644 --- a/src/components/searchInput/index.module.scss +++ b/src/components/searchInput/index.module.scss @@ -1,8 +1,8 @@ .searchInput_main{ display: flex; - align-items: center; min-height: 62px; + align-items: center; border-bottom: 1px solid #F0F0F0; .searchInput_title { min-width: 145px; @@ -26,6 +26,9 @@ .searchInput_con{ flex:1; width: 100%; + display: flex; + width: 100%; + align-items: center; input{ font-size: 26px; } diff --git a/src/components/searchInput/index.tsx b/src/components/searchInput/index.tsx index 2fbaebf..c41d344 100644 --- a/src/components/searchInput/index.tsx +++ b/src/components/searchInput/index.tsx @@ -12,7 +12,7 @@ type Params = { changeOnInput?: (string) => void, clickOnInput?: () => void, children?: ReactNode - height?: number, + height?: string, titleStyle?: Object, styleObj?: Object @@ -28,7 +28,7 @@ export default memo((props: Params) => { showBorder = true, changeOnInput, clickOnInput, - height = 80, + height = '80rpx', titleStyle = {} } = props @@ -39,11 +39,11 @@ export default memo((props: Params) => { return {} }, [showBorder]) return ( - + {showTitle&&{title}} {!props.children&& clickOnInput?.()} onInput={(e) => changeOnInput?.(e.detail.value)}/> - ||{props.children} + ||<>{props.children} } {showIcon&&} diff --git a/src/pages/applyAfterSales/index.module.scss b/src/pages/applyAfterSales/index.module.scss index 6e11a17..b8d2820 100644 --- a/src/pages/applyAfterSales/index.module.scss +++ b/src/pages/applyAfterSales/index.module.scss @@ -58,6 +58,9 @@ .miconfont{ font-size: 30px; } + .selected{ + color: #000; + } } .upload_image{ flex:1; diff --git a/src/pages/applyAfterSales/index.tsx b/src/pages/applyAfterSales/index.tsx index fd06f1d..6bd1c67 100644 --- a/src/pages/applyAfterSales/index.tsx +++ b/src/pages/applyAfterSales/index.tsx @@ -212,21 +212,21 @@ export default () => { 退货原因 onShowReason(returnStatus.return_reason)}> - {returnObj[returnStatus.return_reason]?.name||'请选择'} + {returnObj[returnStatus.return_reason]?.name||'请选择'} 货物状况 onShowReason(returnStatus.goods_status)}> - {returnObj[returnStatus.goods_status]?.name||'请选择'} + {returnObj[returnStatus.goods_status]?.name||'请选择'} 退货说明 onShowReason(returnStatus.return_explain)}> - {returnObj[returnStatus.return_explain]?.name||'请选择'} + {returnObj[returnStatus.return_explain]?.name||'请选择'} diff --git a/src/pages/order/components/kindList/index.tsx b/src/pages/order/components/kindList/index.tsx index 861b7fb..34a3558 100644 --- a/src/pages/order/components/kindList/index.tsx +++ b/src/pages/order/components/kindList/index.tsx @@ -69,7 +69,6 @@ export default memo(({order, comfirm = false}:Param) => { label:'预估金额', field: 'estimate_amount', message: '预估金额按生产商定义的标准匹重计算,仅供参考。详细交易金额以出单为准!', - messageShow: false, }, { id:2, @@ -77,7 +76,6 @@ export default memo(({order, comfirm = false}:Param) => { label:'合计金额', field: 'total_sale_price', message: '包含空差的货款金额', - messageShow: false, }, { id:3, @@ -85,7 +83,6 @@ export default memo(({order, comfirm = false}:Param) => { label:'空差优惠', field: 'total_weight_error_discount', message: '扣除空差金额', - messageShow: false, }, { id:4, @@ -93,7 +90,6 @@ export default memo(({order, comfirm = false}:Param) => { label:'应付金额', field: 'total_should_collect_money', message: '扣除空差后的货款金额', - messageShow: false, }, { id:5, @@ -101,14 +97,13 @@ export default memo(({order, comfirm = false}:Param) => { label:'实付金额', field: 'actual_amount', message: '本单实付总金额', - messageShow: false, } ] //订单流程是否显示价格 const showPrice = (item) => { if (item.id == 2) { - //合计金额 (剪板特殊请情况) + //合计金额 (剪板特殊情况) return (item.value.includes(order.status)|| order.sale_mode == 1) } else if (item.id == 3) { //空差优惠只有大货才有 @@ -126,7 +121,7 @@ export default memo(({order, comfirm = false}:Param) => { <> { priceList.map(item => { - return <>{showPrice(item)&&} + return <>{showPrice(item)&&} }) } @@ -140,11 +135,17 @@ export default memo(({order, comfirm = false}:Param) => { return }, [order]) - //金额展示 + //确认金额展示 const showPriceConDom = useMemo(() => { return comfirm?comfirmPriceConDom:priceConDom }, [order]) + //颜色金额小计 + const colorPrice = useCallback((item) => { + let res = item.total_sale_price||item.estimate_amount + return formatPriceDiv(res).toLocaleString('en', {minimumFractionDigits: 2}) + },[order]) + //散剪大约重量 const aboutWeight = useCallback((weight) => { @@ -187,7 +188,7 @@ export default memo(({order, comfirm = false}:Param) => { ×{formatCount(colorItem)}{order.unit} - ¥{formatPriceDiv(colorItem.estimate_amount).toLocaleString()} + ¥{colorPrice(colorItem)} diff --git a/src/pages/order/components/returnRecord/index.module.scss b/src/pages/order/components/returnRecord/index.module.scss new file mode 100644 index 0000000..fc9425c --- /dev/null +++ b/src/pages/order/components/returnRecord/index.module.scss @@ -0,0 +1,160 @@ +.returnRecord_main{ + height: 70vh; + .order_item{ + background-color: #fff; + border-radius: 20px; + padding: 20px; + box-sizing: border-box; + .header{ + display: flex; + align-items: center; + .user{ + display: flex; + align-items: center; + .name { + color: #000; + font-weight: 700; + margin-left: 15px; + font-size: $font_size; + width: 100px; + @include common_ellipsis(); + } + image{ + width: 70px; + height: 70px; + border-radius: 50%; + } + } + .order_con { + padding-left: 15px; + width: 100%; + .name { + color: #000; + font-weight: 700; + font-size: $font_size; + } + .order_num { + flex: 1; + font-size: $font_size_medium; + color: $color_font_one; + padding-right: 10px; + display: flex; + justify-content: flex-start; + align-items: center; + .order_num_con{ + flex:1; + } + .miconfont { + font-size: 20px; + } + } + } + .tag{ + font-size: $font_size_min; + padding: 5px 15px; + background-color: $color_main; + color: #fff; + border-radius: 0px 20px 0px 20px; + } + } + .product_title{ + display: flex; + align-items: center; + padding: 35px 0; + .product_tag{ + background-color: #CDE5FF; + font-size: $font_size_min; + padding: 5px 10px; + color: $color_main; + border-radius: 6px; + } + .product_name{ + flex:1; + font-size: $font_size; + font-weight: 700; + padding: 0 20px; + @include common_ellipsis() + } + .product_status{ + font-size: $font_size; + color: $color_main; + } + } + .product_list{ + display: flex; + .image{ + width: 126px; + height: 126px; + border-radius: 20px ; + position: relative; + image{ + width: 100%; + height: 100%; + border-radius: 20px ; + } + .color_num { + background: rgba(0,0,0, 0.5); + border-radius: 36px 0px 20px 0px; + font-size: $font_size_min; + color: #fff; + position: absolute; + right:0; + bottom:0; + padding: 5px 10px 5px 15px; + box-sizing: border-box; + } + } + .color_list{ + flex:1; + padding-left: 30px; + .color_item{ + display: flex; + justify-content: space-between; + font-size: $font_size_min; + color: $color_font_three; + align-items: center; + margin-bottom: 20px; + .color_title{ + font-weight: 700; + font-size: $font_size; + color: #000; + } + .color_more{ + color: $color_font_three; + } + } + } + + } + .color_count_num{ + font-size: $font_size_min; + color: $color_font_two; + background-color: #F6F6F6; + border-radius: 10px; + padding: 10px 22px; + margin-top: 20px; + } + .order_number{ + display: flex; + background-color: #F6F6F6; + padding: 20px; + margin: 20px 0; + align-items: center; + font-size: $font_size_medium; + border-radius: 10px; + text{ + &:nth-child(1) { + + font-weight: 700; + color: $color_font_three; + border-right: 2px solid #CCCCCC; + padding-right: 20px; + } + &:nth-child(2) { + padding-left: 20px; + color: $color_font_one; + } + } + } + } +} \ No newline at end of file diff --git a/src/pages/order/components/returnRecord/index.tsx b/src/pages/order/components/returnRecord/index.tsx new file mode 100644 index 0000000..5a2896d --- /dev/null +++ b/src/pages/order/components/returnRecord/index.tsx @@ -0,0 +1,160 @@ +import { GetSaleOrderListApi, ReturnRecordApi } from "@/api/salesAfterOrder"; +import { goLink } from "@/common/common"; +import { formatHashTag, formatPriceDiv } from "@/common/fotmat"; +import { dataLoadingStatus, getFilterData } from "@/common/util"; +import InfiniteScroll from "@/components/infiniteScroll"; +import LabAndImg from "@/components/LabAndImg"; +import Popup from "@/components/popup"; +import OrderStatusTag from "@/pages/salesAfterList/components/orderStatusTag"; +import { useSelector } from "@/reducers/hooks"; +import { Image, Text, View } from "@tarojs/components"; +import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react"; +import classnames from "classnames"; +import styles from './index.module.scss' +import { REFUND_STATUS_ORDER } from "@/common/enum"; + +type Param = { + show?: true|false, + onClose?: () => void, + onSubmit?: () => void, + id?: number +} +export default memo(({show, onClose, onSubmit, id}:Param) => { + //搜索参数 + const searchField = useRef({ + page : 1, + size : 10, + saleOrderID: 0 + }) + + useEffect(() => { + if(show && id) { + searchField.current.saleOrderID = id + getOrderList() + } + }, [show, id]) + + const userInfo = useSelector(state => state.userInfo) + + //获取订单列表 + const {fetchData: listFetchData, state:orderState} = ReturnRecordApi() + const [orderData, setOrderData] = useState<{list:any[], total:number}>({list:[], total:0}) + const getOrderList = async () => { + console.log('ida::', id) + let res = await listFetchData(getFilterData(searchField.current)) + setOrderData({list: res.data.list, total: res.data.total}) + } + + //整理颜色 + const labAndRgbAndUrl = useCallback((item) => { + return {lab:{...item?.lab}, rgb:{...item?.rgb}, texturl_url: item?.texturl_url} + }, [orderData]) + + const { + ReturnApplyOrderTypeReturnForRefund, // 退货退款 + } = REFUND_STATUS_ORDER + + //对应单价 + const standardPrice = useCallback((price, sale_mode) => { + return formatPriceDiv(price).toLocaleString() + '/' + (sale_mode == 1?'m':'kg') + }, [orderData]) + + //对应数量 + const formatCount = useCallback((item, sale_mode) => { + return sale_mode == 0? item.roll : Number(item.length / 100) + }, [orderData]) + + //上拉加载数据 + const pageNum = useRef({size: searchField.current.size, page: searchField.current.page}) + const getScrolltolower = () => { + if(orderData.list.length < orderData.total) { + pageNum.current.page++ + const size = pageNum.current.size * pageNum.current.page + searchField.current.size = size + } + } + + //监听滚动 + const [scrollStatus, setScrollStatus] = useState(false) + const onscroll = useCallback((e) => { + if(e.detail.scrollTop > 20) { + setScrollStatus(true) + } else { + setScrollStatus(false) + } + },[]) + + //数据加载状态 + const statusMore = useMemo(() => { + return dataLoadingStatus({list:orderData.list, total: orderData.total, status: orderState.loading}) + }, [orderData, orderState]) + + return ( + <> + + + + + {orderData?.list?.map(item => + goLink('/pages/salesAfter/index', {id: item?.id})}> + + + + + {userInfo?.adminUserInfo?.user_name} + + + 售后单号:{item?.return_order_no} + + + + + + + goLink('/pages/salesAfter/index', {id: item?.id})}> + + {item?.sale_mode_name} + {formatHashTag(item?.product_list?.[0].code, item?.product_list?.[0].name)} + {item?.stage_name} + + + + + {item?.product_list?.[0].product_colors?.[0].code} + + + {item?.product_list?.[0].product_colors?.map((itemColor, index) => { + return ( + (index <= 1)&& + {formatHashTag(itemColor.code, itemColor.name)} + {standardPrice(itemColor.sale_price, item.sale_mode)} + ×{formatCount(itemColor, itemColor.sale_mode)}条 + + ) + }) + } + + …… + …… + …… + + + + {`${item?.total_fabrics}种面料,${item?.total_colors}种颜色,共${item?.total_number}条`} + + {item?.type == ReturnApplyOrderTypeReturnForRefund.value?'已申请退货':'已申请退款'} + 订单号:{item?.order_no} + + + )} + + + + + + ) +}) \ No newline at end of file diff --git a/src/pages/order/index.module.scss b/src/pages/order/index.module.scss index 55096de..624a241 100644 --- a/src/pages/order/index.module.scss +++ b/src/pages/order/index.module.scss @@ -108,6 +108,7 @@ display: flex; justify-content: space-between; align-items: center; + width: 100%; .order_num_btn{ font-size: $font_size_medium; padding: 5px 10px; diff --git a/src/pages/order/index.tsx b/src/pages/order/index.tsx index 55dc75e..b8e1b25 100644 --- a/src/pages/order/index.tsx +++ b/src/pages/order/index.tsx @@ -26,6 +26,7 @@ import KindList from "./components/kindList"; import OrderState from "./components/orderState"; import Payment from "./components/payment"; import Remark from "./components/remark"; +import ReturnRecord from "./components/returnRecord"; import styles from './index.module.scss' export default () => { @@ -180,8 +181,7 @@ import styles from './index.module.scss' //获取底部按钮点击, 获取按钮状态 const orderStateClick = useCallback((val) => { - if(val == 1 || val == 6) { - //取消订单 + if(val == 1 || val == 6 || val == 8) { getSaleOrderPreView() }else if(val == 2) { //待付款 @@ -193,6 +193,9 @@ import styles from './index.module.scss' } else if(val == 7) { //再购 addShopCart() + } else if(val == 9) { + //售后记录 + onReturnRecordShow() } }, [orderDetail]) @@ -286,6 +289,15 @@ import styles from './index.module.scss' } + //显示售后记录 + const [returnRecordShow, setReturnRecordShow] = useState(false) + const onReturnRecordShow = useCallback(() => { + setReturnRecordShow(true) + }, []) + const closeReturnRecord = useCallback(() => { + setReturnRecordShow(false) + }, []) + return ( {(orderDetail?.status != SaleorderstatusWaitingPrePayment.value)&&|| @@ -296,16 +308,16 @@ import styles from './index.module.scss' 订单信息 - + {orderDetail?.order_no} clipboardData()}>复制 - + {formatDateTime(orderDetail?.create_time)} - {(orderDetail?.payment_time)&& + {(orderDetail?.payment_time)&& {formatDateTime(orderDetail?.payment_time)} } @@ -327,6 +339,7 @@ import styles from './index.module.scss' setShowCart(false)}/> + ) diff --git a/src/pages/orderList/components/order/index.tsx b/src/pages/orderList/components/order/index.tsx index 960f734..41a7223 100644 --- a/src/pages/orderList/components/order/index.tsx +++ b/src/pages/orderList/components/order/index.tsx @@ -1,4 +1,5 @@ import { goLink } from "@/common/common"; +import { ORDER_STATUS } from "@/common/enum"; import { formatHashTag, formatImgUrl, formatPriceDiv } from "@/common/fotmat"; import LabAndImg from "@/components/LabAndImg"; import OrderBtns from "@/components/orderBtns"; @@ -51,6 +52,13 @@ export default memo(({value, onClickBtn}: Param) => { onClickBtn?.({status, orderInfo:value}) }, [value]) + let {SaleOrderStatusTaking} = ORDER_STATUS + + //订单状态 + // const orderStatus = useCallback((item) => { + // return item.status == SaleOrderStatusTaking.value?'装车中':item.status_name + // }, [value]) + //按钮所需数据 const orderInfo = useMemo(() => { return { @@ -68,6 +76,7 @@ export default memo(({value, onClickBtn}: Param) => { return `${value?.total_fabrics}种面料,${value?.total_colors}种颜色,共${value?.total_number}${value?.sale_mode == 0? '条':'米'}` }, [value]) + return ( goLink('/pages/order/index', {id: value?.id})}> diff --git a/src/pages/orderList/index.tsx b/src/pages/orderList/index.tsx index 5210ec6..551aaf4 100644 --- a/src/pages/orderList/index.tsx +++ b/src/pages/orderList/index.tsx @@ -15,6 +15,7 @@ import ShopCart from "@/components/shopCart" import { alert } from "@/common/common" import { useRouter } from "@tarojs/runtime" import ApplyRefund from "../order/components/applyRefund" +import ReturnRecord from "../order/components/returnRecord" export default () => { const {checkLogin} = useLogin() @@ -107,7 +108,7 @@ export default () => { //监听点击的按钮 const clickOrderBtn = useCallback(({status, orderInfo}) => { setCallBackPayOrderInfo(() => orderInfo) - if(status == 1 || status == 6) { + if(status == 1 || status == 6 || status == 8) { getOrderList() } else if(status == 2) { //去支付 @@ -119,6 +120,8 @@ export default () => { } else if (status == 7) { //购买 addShopCart(orderInfo) + } else if (status == 9) { + onReturnRecordShow() } }, [orderData]) @@ -178,6 +181,15 @@ export default () => { setRefundShow(false) }, []) + //显示售后记录 + const [returnRecordShow, setReturnRecordShow] = useState(false) + const onReturnRecordShow = useCallback(() => { + setReturnRecordShow(true) + }, []) + const closeReturnRecord = useCallback(() => { + setReturnRecordShow(false) + }, []) + return ( @@ -194,6 +206,7 @@ export default () => { setShowCart(false)}/> + ) diff --git a/src/pages/salesAfter/components/applyRecord/index.module.scss b/src/pages/salesAfter/components/applyRecord/index.module.scss index b9603f6..07984dd 100644 --- a/src/pages/salesAfter/components/applyRecord/index.module.scss +++ b/src/pages/salesAfter/components/applyRecord/index.module.scss @@ -1,9 +1,11 @@ -.apply_record_scroll{ - height: 70vh; -} + .apply_record_main{ margin-top: 20px; padding: 0 30px; + height: 70vh; + .apply_record_scroll{ + height: 100%; + } .kind_number{ width: 100%; padding: 20px; diff --git a/src/pages/salesAfter/components/applyRecord/index.tsx b/src/pages/salesAfter/components/applyRecord/index.tsx index d631ac3..ca5634f 100644 --- a/src/pages/salesAfter/components/applyRecord/index.tsx +++ b/src/pages/salesAfter/components/applyRecord/index.tsx @@ -4,6 +4,7 @@ import LabAndImg from "@/components/LabAndImg"; import Popup from "@/components/popup"; import { ScrollView, Text, View } from "@tarojs/components"; import { memo, useCallback, useEffect, useMemo, useState } from "react"; +import Taro from "@tarojs/taro"; import styles from './index.module.scss' type Param = { @@ -15,10 +16,12 @@ type Param = { export default memo(({show, onClose, onSubmit, id}:Param) => { useEffect(() => { if(show && id) getSaleOrderPreView() + if(!show) setFormatDetailOrder(() => null) }, [show, id]) + //获取订单详情 - const [orderDetail, setOrderDetail] = useState() //获取到的原始数据 + const [orderDetail, setOrderDetail] = useState(null) //获取到的原始数据 const {fetchData: saleOrderOrderDetailData} = SaleOrderOrderDetailApi() const getSaleOrderPreView = async () => { if(id) { @@ -77,50 +80,52 @@ export default memo(({show, onClose, onSubmit, id}:Param) => { return ( <> - {formatDetailOrder&& - {numText} - - - { - formatDetailOrder?.list?.map(item => { - return - - {formatDetailOrder.sale_mode_name} - {formatHashTag(item.code, item.name)} - 共{item?.product_colors.length}种 - - - {item?.product_colors?.map(colorItem => { - return - - - - - - {colorItem.code + ' ' + colorItem.name} - - ¥{standardPrice(colorItem.sale_price)} - 总重{standardPrice(colorItem.estimate_weight)} + + {formatDetailOrder&&<> + {numText} + + + { + formatDetailOrder?.list?.map(item => { + return + + {formatDetailOrder.sale_mode_name} + {formatHashTag(item.code, item.name)} + 共{item?.product_colors.length}种 + + + {item?.product_colors?.map(colorItem => { + return + + + + + + {colorItem.code + ' ' + colorItem.name} + + ¥{standardPrice(colorItem.sale_price)} + 总重{standardPrice(colorItem.estimate_weight)} + + + + ×{formatCount(colorItem)}{formatDetailOrder.unit} + ¥{formatPriceDiv(colorItem.estimate_amount).toLocaleString()} - - ×{formatCount(colorItem)}{formatDetailOrder.unit} - ¥{formatPriceDiv(colorItem.estimate_amount).toLocaleString()} - - - })} + })} + - - }) - } - - 申请条数 - ×{orderDetail?.total_number} + }) + } + + 申请条数 + ×{orderDetail?.total_number} + - - - } + + } + ) diff --git a/src/pages/salesAfter/index.module.scss b/src/pages/salesAfter/index.module.scss index f44eb04..635ee29 100644 --- a/src/pages/salesAfter/index.module.scss +++ b/src/pages/salesAfter/index.module.scss @@ -112,6 +112,7 @@ } .order_num{ display: flex; + width: 100%; justify-content: space-between; align-items: center; .order_num_btn{ @@ -124,6 +125,7 @@ } text{ font-size: $font_size; + word-break: break-all; } } diff --git a/src/pages/salesAfter/index.tsx b/src/pages/salesAfter/index.tsx index d613e5c..54965e4 100644 --- a/src/pages/salesAfter/index.tsx +++ b/src/pages/salesAfter/index.tsx @@ -157,33 +157,33 @@ import styles from './index.module.scss' return ( 订单信息 - + {orderInfo?.return_order_no} clipboardData(orderInfo?.return_order_no)}>复制 - + {orderInfo?.order_no} clipboardData(orderInfo?.order_no)}>复制 - + {orderInfo?.return_reason_name} - + {orderInfo?.return_explain_name} - - {orderInfo?.reason_describe} - - + {orderInfo?.goods_status_name} - + {formatDateTime(orderInfo?.apply_time)} + + {orderInfo?.reason_describe} + ) }) diff --git a/src/pages/salesAfterList/components/order/index.tsx b/src/pages/salesAfterList/components/order/index.tsx index 5bfdfb1..fb4426a 100644 --- a/src/pages/salesAfterList/components/order/index.tsx +++ b/src/pages/salesAfterList/components/order/index.tsx @@ -3,6 +3,7 @@ import { REFUND_STATUS_ORDER } from "@/common/enum"; import { formatHashTag, formatImgUrl, formatPriceDiv } from "@/common/fotmat"; import AfterOrderBtns from "@/components/afterOrderBtns"; import LabAndImg from "@/components/LabAndImg"; +import ApplyRecord from "@/pages/salesAfter/components/applyRecord"; import { useSelector } from "@/reducers/hooks"; import { Image, Text, View } from "@tarojs/components" import classnames from "classnames"; @@ -68,6 +69,8 @@ export default memo(({value, onClickBtn}: Param) => { ReturnApplyOrderTypeReturnForRefund, // 退货退款 } = REFUND_STATUS_ORDER + + return ( goLink('/pages/salesAfter/index', {id: value?.id})}> diff --git a/src/pages/salesAfterList/index.tsx b/src/pages/salesAfterList/index.tsx index 8256d9e..b77f56d 100644 --- a/src/pages/salesAfterList/index.tsx +++ b/src/pages/salesAfterList/index.tsx @@ -12,6 +12,7 @@ import OrderStatusList from "./components/orderStatusList" import { AFTER_ORDER_STATUS } from "@/common/enum" import { GetSaleOrderListApi, RefundOrderSatausApi } from "@/api/salesAfterOrder" import ReturnLogistics from "./components/returnLogistics" +import ApplyRecord from "../salesAfter/components/applyRecord" export default () => { useLogin() @@ -93,16 +94,23 @@ export default () => { } //监听点击的按钮 + const [callBackOrderInfo, setCallBackPayOrderInfo] = useState() const clickOrderBtn = useCallback(({status, orderInfo}) => { if(status == 1 || status == 6) { getOrderList() + } else if (status == 8) { + setApplyRecord(true) } + setCallBackPayOrderInfo(orderInfo) }, [orderData]) //物流显示 const [logisticsShow, setLogisticsShow] = useState(false) const onCloseLogistics = useCallback(() => setLogisticsShow(false), []) + //显示记录 + const [applyRecord, setApplyRecord] = useState(false) + return ( @@ -117,6 +125,7 @@ export default () => { + setApplyRecord(false)}/> ) } diff --git a/src/pages/searchList/searchList.module.scss b/src/pages/searchList/searchList.module.scss index 0e4bb51..68f2e4b 100644 --- a/src/pages/searchList/searchList.module.scss +++ b/src/pages/searchList/searchList.module.scss @@ -33,7 +33,7 @@ .text_ss{ position: relative; .miconfont{ - font-size: 20px; + font-size: 30px; margin-left: 5px; } &::before{ diff --git a/src/pages/searchList/searchList.tsx b/src/pages/searchList/searchList.tsx index 13b5309..d7677ae 100644 --- a/src/pages/searchList/searchList.tsx +++ b/src/pages/searchList/searchList.tsx @@ -29,7 +29,8 @@ export default () => { width: '', weight_density: '', product_kind_id: '', - component: '' + component: '', + abstract_sort_key: '' }) //获取面料列表 @@ -116,6 +117,19 @@ export default () => { setSelectList([...data]) } + //排序 + const [sortStatus, setSortStatus] = useState<{comprehensive:'none'|'top'|'bottom', collection:'none'|'top'|'bottom'}>({ + comprehensive: 'none', + collection: 'none' + }) + const changeSort = (val) => { + if(val == 1) { + + } else { + + } + } + return ( @@ -123,13 +137,13 @@ export default () => { - + changeSort(1)}> 综合 - + - + changeSort(2)}> 收藏 - + goLink('/pages/searchList/hightSearchList')}> 高级搜索 diff --git a/src/pages/user/index.tsx b/src/pages/user/index.tsx index 3cdb744..cda99e9 100644 --- a/src/pages/user/index.tsx +++ b/src/pages/user/index.tsx @@ -325,7 +325,7 @@ const Assets = (props: any) => { // 功能 const Main = memo(() => { let menu = [{ text: "地址管理", icon: "icon-daohang", url: "/pages/addressManager/index" }, { text: "码单管理", icon: "icon-a-yuanmadanmadanguanli", url: "/pages/weightList/index" }, - { text: "我的收藏", icon: "icon-shoucang" }, { text: "颜色对比", icon: "icon-yanseduibi", url: "/pages/sampleComparison/index" }, + { text: "我的收藏", icon: "icon-shoucang", url: "/pages/collection/index" }, { text: "颜色对比", icon: "icon-yanseduibi", url: "/pages/sampleComparison/index" }, { text: "分享推广", icon: "icon-fenxiang" }, { text: "团队邀请", icon: "icon-yaoqingtuandui" }] return (