联动组件优化
This commit is contained in:
parent
33016fca85
commit
b8f78eea71
@ -5,6 +5,7 @@ import configStore from './store'
|
|||||||
import './app.scss'
|
import './app.scss'
|
||||||
import Taro, { useDidShow} from '@tarojs/taro'
|
import Taro, { useDidShow} from '@tarojs/taro'
|
||||||
import { analysisShortCodeApi } from './common/shortCode'
|
import { analysisShortCodeApi } from './common/shortCode'
|
||||||
|
import { IMG_CND_Prefix } from './common/constant'
|
||||||
|
|
||||||
const store = configStore()
|
const store = configStore()
|
||||||
const App:FC = (params) => {
|
const App:FC = (params) => {
|
||||||
@ -35,6 +36,7 @@ const App:FC = (params) => {
|
|||||||
} else {
|
} else {
|
||||||
path = `/pages/index/index?share=${sortCode.shareShortPage.code}`
|
path = `/pages/index/index?share=${sortCode.shareShortPage.code}`
|
||||||
title = sortCode.shareShortPage.title
|
title = sortCode.shareShortPage.title
|
||||||
|
imageUrl = IMG_CND_Prefix + '/mall/share_img_01.png'
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
title,
|
title,
|
||||||
|
@ -11,8 +11,8 @@
|
|||||||
// export const BASE_URL = `https://dev.zzfzyc.com/lymarket` // 开发环境
|
// export const BASE_URL = `https://dev.zzfzyc.com/lymarket` // 开发环境
|
||||||
// export const BASE_URL = `https://www.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.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` // 杰
|
export const BASE_URL = `http://192.168.1.42:50001/lymarket` // 杰
|
||||||
|
|
||||||
// CDN
|
// CDN
|
||||||
// 生成密钥
|
// 生成密钥
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
.message{
|
.message{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
background: rgba(168, 179, 189, 0.8);
|
background: rgba(168, 179, 189, 0.9);
|
||||||
z-index: 9;
|
z-index: 9;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
|
@ -58,7 +58,8 @@ export default memo(({orderInfo, onClick}:Param) => {
|
|||||||
SaleOrderStatusArranging.value,
|
SaleOrderStatusArranging.value,
|
||||||
SaleOrderStatusArranged.value,
|
SaleOrderStatusArranged.value,
|
||||||
SaleOrderStatusWaitingPayment.value,
|
SaleOrderStatusWaitingPayment.value,
|
||||||
SaleOrderStatusWaitingDelivery.value], //取消订单按钮对应: 待接单,配布中,已配布, 待付款, 待发货
|
SaleOrderStatusTaking.value,
|
||||||
|
SaleOrderStatusWaitingDelivery.value], //取消订单按钮对应: 待接单,配布中,已配布, 待付款, 待发货, 提货中
|
||||||
label: '取消订单'
|
label: '取消订单'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -115,7 +116,7 @@ export default memo(({orderInfo, onClick}:Param) => {
|
|||||||
return( orderInfo.wait_pay_amount != 0 && item.value.includes(orderInfo.status)) //只要没有付完款就显示
|
return( orderInfo.wait_pay_amount != 0 && item.value.includes(orderInfo.status)) //只要没有付完款就显示
|
||||||
} else if(item.id == 3 ) {
|
} else if(item.id == 3 ) {
|
||||||
//申请退款, 只有大货才有
|
//申请退款, 只有大货才有
|
||||||
return (orderInfo.sale_mode == SaLeModeBulk.value && orderInfo.actual_amount != 0 && item.value.includes(orderInfo.status)) //大货在待发货付过款
|
return (orderInfo.sale_mode == SaLeModeBulk.value && orderInfo.actual_amount != 0 && orderInfo.av_return_roll && item.value.includes(orderInfo.status)) //大货在待发货付过款
|
||||||
} else if( item.id == 8) {
|
} else if( item.id == 8) {
|
||||||
//退款按钮(直接退款不用申请), 只有散剪和剪板有
|
//退款按钮(直接退款不用申请), 只有散剪和剪板有
|
||||||
return (orderInfo.sale_mode != SaLeModeBulk.value && orderInfo.actual_amount != 0 && item.value.includes(orderInfo.status)) //散剪和剪板在待接单时付过款
|
return (orderInfo.sale_mode != SaLeModeBulk.value && orderInfo.actual_amount != 0 && item.value.includes(orderInfo.status)) //散剪和剪板在待接单时付过款
|
||||||
|
@ -14,10 +14,6 @@
|
|||||||
border-color: transparent transparent #999999;
|
border-color: transparent transparent #999999;
|
||||||
transform: rotate(180deg);
|
transform: rotate(180deg);
|
||||||
}
|
}
|
||||||
.top:hover {
|
|
||||||
cursor: pointer;
|
|
||||||
border-color: transparent transparent #333333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.top {
|
.top {
|
||||||
width: 0;
|
width: 0;
|
||||||
@ -27,10 +23,6 @@
|
|||||||
border-color: transparent transparent #999999;
|
border-color: transparent transparent #999999;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
.bottom:hover {
|
|
||||||
cursor: pointer;
|
|
||||||
border-color: transparent transparent #333333;
|
|
||||||
}
|
|
||||||
.selected{
|
.selected{
|
||||||
border-color: transparent transparent $color_main;
|
border-color: transparent transparent $color_main;
|
||||||
}
|
}
|
@ -12,6 +12,7 @@ import { alert, goLink } from "@/common/common";
|
|||||||
import UploadImage from "@/components/uploadImage"
|
import UploadImage from "@/components/uploadImage"
|
||||||
import TextareaEnhance from "@/components/textareaEnhance";
|
import TextareaEnhance from "@/components/textareaEnhance";
|
||||||
import useLogin from "@/use/useLogin";
|
import useLogin from "@/use/useLogin";
|
||||||
|
import { throttle } from "@/common/util";
|
||||||
|
|
||||||
enum returnStatus {
|
enum returnStatus {
|
||||||
return_reason = 1, //原因
|
return_reason = 1, //原因
|
||||||
@ -140,12 +141,12 @@ export default () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//底部按钮
|
//底部按钮
|
||||||
const onSubmit = (val) => {
|
const onSubmit = throttle((val) => {
|
||||||
if(val == 2) {
|
if(val == 2) {
|
||||||
if(!submitData.return_explain) return alert.error('请填写其他说明')
|
if(!submitData.return_explain) return alert.error('请填写其他说明')
|
||||||
onSubmitData()
|
onSubmitData()
|
||||||
}
|
}
|
||||||
}
|
}, 600)
|
||||||
|
|
||||||
//退货原因选择弹窗
|
//退货原因选择弹窗
|
||||||
const [showReason, setShowReason] = useState(false)
|
const [showReason, setShowReason] = useState(false)
|
||||||
@ -175,9 +176,11 @@ export default () => {
|
|||||||
//退货原因选择列表返回的数据
|
//退货原因选择列表返回的数据
|
||||||
const [returnObj, setReturnObj] = useState<any>([])
|
const [returnObj, setReturnObj] = useState<any>([])
|
||||||
const onReturnSelect = useCallback((val) => {
|
const onReturnSelect = useCallback((val) => {
|
||||||
setReturnGoodsInfo((e) => [])
|
|
||||||
let res = val.data[val.data.length - 1]
|
let res = val.data[val.data.length - 1]
|
||||||
if(val.index == 1) getReturnExplain(res.id)
|
if(val.index == 1) {
|
||||||
|
getReturnExplain(res.id)
|
||||||
|
setReturnGoodsInfo(() => [])
|
||||||
|
}
|
||||||
if(val.index == 2) setReturnObj(val.data)
|
if(val.index == 2) setReturnObj(val.data)
|
||||||
}, [])
|
}, [])
|
||||||
const onHeaderSelect = useCallback((val) => {
|
const onHeaderSelect = useCallback((val) => {
|
||||||
|
@ -19,6 +19,9 @@
|
|||||||
font-size: 28px;
|
font-size: 28px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
|
.credit-used-list-price-add{
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
.credit-used-list-bottom{
|
.credit-used-list-bottom{
|
||||||
display: flex;justify-content: space-between;
|
display: flex;justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@ import Taro, { useReady } from "@tarojs/taro"
|
|||||||
import { useCallback, useEffect, useMemo, useRef, useState } from "react"
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react"
|
||||||
import {creditListApi} from "@/api/creditLine"
|
import {creditListApi} from "@/api/creditLine"
|
||||||
import "./index.scss"
|
import "./index.scss"
|
||||||
|
import classnames from "classnames";
|
||||||
import { formatDateTime, formatPriceDiv, toDecimal2 } from "@/common/fotmat"
|
import { formatDateTime, formatPriceDiv, toDecimal2 } from "@/common/fotmat"
|
||||||
import { dataLoadingStatus, getFilterData } from "@/common/util";
|
import { dataLoadingStatus, getFilterData } from "@/common/util";
|
||||||
import useLogin from "@/use/useLogin"
|
import useLogin from "@/use/useLogin"
|
||||||
@ -31,8 +32,8 @@ export default ()=>{
|
|||||||
return (
|
return (
|
||||||
<View key={index} className="credit-used-list">
|
<View key={index} className="credit-used-list">
|
||||||
<View className="credit-used-list-top">
|
<View className="credit-used-list-top">
|
||||||
<View className="credit-used-list-type">下单</View>
|
<View className="credit-used-list-type">{item.quota_order_status_name}</View>
|
||||||
<View className={`credit-used-list-price ${item.amount>0?'green':item.amount<0?'red':''}`}>
|
<View className={classnames(`credit-used-list-price`, item.trans_type==1?`credit-used-list-price-add`:`green`)}>
|
||||||
{item.trans_type==2?"-":"+"}{toDecimal2(formatPriceDiv(item.amount)).toLocaleString()}
|
{item.trans_type==2?"-":"+"}{toDecimal2(formatPriceDiv(item.amount)).toLocaleString()}
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
@ -15,6 +15,7 @@ import AddressInfoDetail from "./components/addressInfoDetail";
|
|||||||
import { SubscriptionMessageApi } from "@/api/user";
|
import { SubscriptionMessageApi } from "@/api/user";
|
||||||
import { SUBSCRIPTION_MESSAGE_SCENE } from "@/common/enum";
|
import { SUBSCRIPTION_MESSAGE_SCENE } from "@/common/enum";
|
||||||
import { UseSubscriptionMessage } from "@/use/useCommon";
|
import { UseSubscriptionMessage } from "@/use/useCommon";
|
||||||
|
import { throttle } from "@/common/util";
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
|
|
||||||
@ -140,7 +141,7 @@ import { UseSubscriptionMessage } from "@/use/useCommon";
|
|||||||
|
|
||||||
//提交订单
|
//提交订单
|
||||||
const {fetchData: saleOrderFetchData} = SaleOrderApi()
|
const {fetchData: saleOrderFetchData} = SaleOrderApi()
|
||||||
const submitOrderEven = async () => {
|
const submitOrderEven = throttle(async () => {
|
||||||
if(!submitOrderData?.shipment_mode) {
|
if(!submitOrderData?.shipment_mode) {
|
||||||
alert.error('请选择收货方式')
|
alert.error('请选择收货方式')
|
||||||
return false
|
return false
|
||||||
@ -156,7 +157,7 @@ import { UseSubscriptionMessage } from "@/use/useCommon";
|
|||||||
} else {
|
} else {
|
||||||
alert.none(res.msg)
|
alert.none(res.msg)
|
||||||
}
|
}
|
||||||
}
|
}, 600)
|
||||||
|
|
||||||
//页面下拉刷新
|
//页面下拉刷新
|
||||||
usePullDownRefresh(() => {
|
usePullDownRefresh(() => {
|
||||||
|
@ -66,7 +66,7 @@ export default memo(({orderInfo, onRefresh}:Param) => {
|
|||||||
<Image className={styles.image} src={formatImgUrl("/mall/my_cart.png")}/>
|
<Image className={styles.image} src={formatImgUrl("/mall/my_cart.png")}/>
|
||||||
</View>
|
</View>
|
||||||
<View className={styles.refresh} onClick={() => onRefresh?.()}>
|
<View className={styles.refresh} onClick={() => onRefresh?.()}>
|
||||||
<Text className={classnames(styles.mconfont, 'iconfont icon-xianxiahuikuan')}></Text>
|
<Text className={classnames(styles.mconfont, 'iconfont icon-shuaxin')}></Text>
|
||||||
<Text className={classnames(styles.refresh_text)}>刷新</Text>
|
<Text className={classnames(styles.refresh_text)}>刷新</Text>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
@ -87,7 +87,7 @@ export default memo(({show, onClose, orderId}:Param) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Popup show={show} title="申请退款33" onClose={onClose} >
|
<Popup show={show} title="申请退款" onClose={onClose} >
|
||||||
<View className={styles.apply_after_sales_con}>
|
<View className={styles.apply_after_sales_con}>
|
||||||
<View className={styles.returnSaleInput_item}>
|
<View className={styles.returnSaleInput_item}>
|
||||||
<View className={styles.title}>退款说明</View>
|
<View className={styles.title}>退款说明</View>
|
||||||
|
@ -72,7 +72,7 @@ export default memo(({orderInfo = {logistics_details: [],payment_method: 0, stat
|
|||||||
</View>}
|
</View>}
|
||||||
<View className={styles.image_tag}>
|
<View className={styles.image_tag}>
|
||||||
{(orderInfo.payment_method == PaymentMethodCashOnDelivery.value)&&<Image mode="aspectFit" src={formatImgUrl('/mall/order_pay_status.png')} className={styles.image}/>}
|
{(orderInfo.payment_method == PaymentMethodCashOnDelivery.value)&&<Image mode="aspectFit" src={formatImgUrl('/mall/order_pay_status.png')} className={styles.image}/>}
|
||||||
{(orderInfo.payment_method == PaymentMethodAccountPeriod.value)&&<Image mode="aspectFit" src={formatImgUrl('/mall/order_pay_status_7day.png')} className={styles.image}/>}
|
{(orderInfo.payment_method == PaymentMethodAccountPeriod.value)&&<Image mode="aspectFit" src={formatImgUrl('/mall/order_pay_status_day.png')} className={styles.image}/>}
|
||||||
</View>
|
</View>
|
||||||
{(orderInfo.status == SaleorderstatusWaitingPrePayment.value)&&<View className={styles.refresh} onClick={onRefresh}>
|
{(orderInfo.status == SaleorderstatusWaitingPrePayment.value)&&<View className={styles.refresh} onClick={onRefresh}>
|
||||||
<Text className={classnames(styles.mconfont, 'iconfont icon-xianxiahuikuan')}></Text>
|
<Text className={classnames(styles.mconfont, 'iconfont icon-xianxiahuikuan')}></Text>
|
||||||
|
@ -229,8 +229,6 @@ import styles from './index.module.scss'
|
|||||||
}
|
}
|
||||||
}, [orderDetail])
|
}, [orderDetail])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//刷新页面
|
//刷新页面
|
||||||
const refresh = useCallback(() => {
|
const refresh = useCallback(() => {
|
||||||
alert.loading('刷新中')
|
alert.loading('刷新中')
|
||||||
|
@ -135,5 +135,15 @@
|
|||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
padding: 10px 22px;
|
padding: 10px 22px;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
.price{
|
||||||
|
font-size: 30px;
|
||||||
|
color: #007AFF;
|
||||||
|
text{
|
||||||
|
font-size: 23px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -31,7 +31,9 @@ type Param = {
|
|||||||
actual_amount: number, //实付金额
|
actual_amount: number, //实付金额
|
||||||
wait_pay_amount: number, //待付金额
|
wait_pay_amount: number, //待付金额
|
||||||
should_collect_order_id: number, //应付单id
|
should_collect_order_id: number, //应付单id
|
||||||
av_return_roll: number
|
av_return_roll: number,
|
||||||
|
total_sale_price: number,
|
||||||
|
estimate_amount: number
|
||||||
},
|
},
|
||||||
onClickBtn?: (val:{status:number, orderInfo:Param['value']}) => void
|
onClickBtn?: (val:{status:number, orderInfo:Param['value']}) => void
|
||||||
}
|
}
|
||||||
@ -126,7 +128,10 @@ export default memo(({value, onClickBtn}: Param) => {
|
|||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<View className={styles.color_count_num}>{numText}</View>
|
<View className={styles.color_count_num}>
|
||||||
|
<Text>{numText}</Text>
|
||||||
|
{(value.total_sale_price||value.estimate_amount)&& <Text className={styles.price}><Text>¥</Text>{value.total_sale_price||value.estimate_amount}</Text>}
|
||||||
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<OrderBtns orderInfo={orderInfo} onClick={orderBtnsClick}/>
|
<OrderBtns orderInfo={orderInfo} onClick={orderBtnsClick}/>
|
||||||
</View>
|
</View>
|
||||||
|
@ -9,6 +9,8 @@ import styles from './index.module.scss'
|
|||||||
type OrderParam = {
|
type OrderParam = {
|
||||||
estimate_amount: number, //预估金额
|
estimate_amount: number, //预估金额
|
||||||
list: any[],
|
list: any[],
|
||||||
|
product_list: any[],
|
||||||
|
quality_check_pass_product: any[],
|
||||||
sale_mode: number,
|
sale_mode: number,
|
||||||
sale_mode_name: string,
|
sale_mode_name: string,
|
||||||
unit: string,
|
unit: string,
|
||||||
@ -23,6 +25,9 @@ type OrderParam = {
|
|||||||
total_weight_error_discount: number, //空差优惠
|
total_weight_error_discount: number, //空差优惠
|
||||||
the_previous_status: number, //取消订单时的订单状态
|
the_previous_status: number, //取消订单时的订单状态
|
||||||
actual_amount: number //实付金额
|
actual_amount: number //实付金额
|
||||||
|
quality_check_pass_colors: number, //验布后的颜色总数
|
||||||
|
quality_check_pass_fabrics: number, //验布后的面料数量
|
||||||
|
quality_check_pass_number: number, //验布后的总数量
|
||||||
}
|
}
|
||||||
|
|
||||||
type Param = {
|
type Param = {
|
||||||
@ -39,15 +44,24 @@ export default memo(({order, comfirm = false}:Param) => {
|
|||||||
const standardPrice = useCallback(price => {
|
const standardPrice = useCallback(price => {
|
||||||
return formatPriceDiv(price).toLocaleString() + '/' + (order?.sale_mode == 1?'m':'kg')
|
return formatPriceDiv(price).toLocaleString() + '/' + (order?.sale_mode == 1?'m':'kg')
|
||||||
}, [order])
|
}, [order])
|
||||||
|
|
||||||
//数量格式
|
//数量格式
|
||||||
const numText = useMemo(() => {
|
const numText = useMemo(() => {
|
||||||
if(order) {
|
if(order) {
|
||||||
let total_number = order?.sale_mode == 0?order?.total_number:(order?.total_number/100)
|
if(!order?.quality_check_pass_fabrics&&!order?.quality_check_pass_number&&!order?.quality_check_pass_colors) {
|
||||||
return `${order?.total_fabrics}种面料,${order?.total_colors}种颜色,共${total_number}${order?.unit}`
|
let total_number = order?.sale_mode == 0?order?.total_number:(order?.total_number/100)
|
||||||
|
return `${order?.total_fabrics}种面料,${order?.total_colors}种颜色,共${total_number}${order?.unit}`
|
||||||
|
} else {
|
||||||
|
let total_number = order?.sale_mode == 0?order?.quality_check_pass_number:(order?.quality_check_pass_number/100)
|
||||||
|
return `${order?.quality_check_pass_fabrics}种面料,${order?.quality_check_pass_colors}种颜色,共${total_number}${order?.unit}`
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}, [order])
|
}, [order])
|
||||||
|
|
||||||
|
//获取面料数组
|
||||||
|
const list = useMemo(() => {
|
||||||
|
return order?.quality_check_pass_product.length > 0?order?.quality_check_pass_product:order?.product_list
|
||||||
|
}, [order])
|
||||||
|
|
||||||
//售后单状态枚举
|
//售后单状态枚举
|
||||||
const {
|
const {
|
||||||
ReturnStageApplying, // 申请中
|
ReturnStageApplying, // 申请中
|
||||||
@ -137,7 +151,6 @@ export default memo(({order, comfirm = false}:Param) => {
|
|||||||
} else {
|
} else {
|
||||||
return priceInfo[key[order?.sale_mode]].includes(order?.stage)
|
return priceInfo[key[order?.sale_mode]].includes(order?.stage)
|
||||||
}
|
}
|
||||||
|
|
||||||
}, [order])
|
}, [order])
|
||||||
|
|
||||||
const priceConDom = useMemo(() => {
|
const priceConDom = useMemo(() => {
|
||||||
@ -168,7 +181,7 @@ export default memo(({order, comfirm = false}:Param) => {
|
|||||||
<View className={styles.orders_list_con}>
|
<View className={styles.orders_list_con}>
|
||||||
<View className={styles.orders_return_title}>{order?.type == 1?'退货信息':'退款信息'}</View>
|
<View className={styles.orders_return_title}>{order?.type == 1?'退货信息':'退款信息'}</View>
|
||||||
{
|
{
|
||||||
order?.list?.map(item => {
|
list?.map(item => {
|
||||||
return <View key={item.product_code} className={styles.order_list}>
|
return <View key={item.product_code} className={styles.order_list}>
|
||||||
<View className={styles.order_list_title}>
|
<View className={styles.order_list_title}>
|
||||||
<View className={styles.tag}>{order.sale_mode_name}</View>
|
<View className={styles.tag}>{order.sale_mode_name}</View>
|
||||||
|
@ -52,8 +52,13 @@ import styles from './index.module.scss'
|
|||||||
total_colors: orderDetail.total_colors, //总颜色数量
|
total_colors: orderDetail.total_colors, //总颜色数量
|
||||||
total_number: orderDetail.total_number, //总数量
|
total_number: orderDetail.total_number, //总数量
|
||||||
total_fabrics: orderDetail.total_fabrics, //面料数量
|
total_fabrics: orderDetail.total_fabrics, //面料数量
|
||||||
|
quality_check_pass_colors: orderDetail.quality_check_pass_colors, //验布后的颜色总数
|
||||||
|
quality_check_pass_fabrics: orderDetail.quality_check_pass_fabrics, //验布后的面料数量
|
||||||
|
quality_check_pass_number: orderDetail.quality_check_pass_number, //验布后的总数量
|
||||||
unit: orderDetail.sale_mode == 0?'条':'m', //单位
|
unit: orderDetail.sale_mode == 0?'条':'m', //单位
|
||||||
list: orderDetail.quality_check_pass_product,
|
// list: orderDetail.quality_check_pass_product.length > 0?orderDetail.quality_check_pass_product:orderDetail.product_list,
|
||||||
|
product_list: orderDetail.product_list,
|
||||||
|
quality_check_pass_product: orderDetail.quality_check_pass_product,
|
||||||
stage: orderDetail.stage, //订单状态
|
stage: orderDetail.stage, //订单状态
|
||||||
type: orderDetail.type, //退货or退款
|
type: orderDetail.type, //退货or退款
|
||||||
total_sale_price: orderDetail.total_sale_price, //销售金额
|
total_sale_price: orderDetail.total_sale_price, //销售金额
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { goLink } from "@/common/common";
|
import { goLink } from "@/common/common";
|
||||||
import { REFUND_STATUS_ORDER } from "@/common/enum";
|
import { AFTER_ORDER_STATUS, REFUND_STATUS_ORDER } from "@/common/enum";
|
||||||
import { formatHashTag, formatImgUrl, formatPriceDiv } from "@/common/fotmat";
|
import { formatHashTag, formatImgUrl, formatPriceDiv } from "@/common/fotmat";
|
||||||
import AfterOrderBtns from "@/components/afterOrderBtns";
|
import AfterOrderBtns from "@/components/afterOrderBtns";
|
||||||
import LabAndImg from "@/components/LabAndImg";
|
import LabAndImg from "@/components/LabAndImg";
|
||||||
@ -74,6 +74,12 @@ export default memo(({value, onClickBtn}: Param) => {
|
|||||||
return `${value?.total_fabrics}种面料,${value?.total_colors}种颜色,共${total_number_new}${value?.sale_mode == 0? '条':'米'}`
|
return `${value?.total_fabrics}种面料,${value?.total_colors}种颜色,共${total_number_new}${value?.sale_mode == 0? '条':'米'}`
|
||||||
}, [value])
|
}, [value])
|
||||||
|
|
||||||
|
//售后单状态
|
||||||
|
const {ReturnStageQualityCheckPendingRefund, ReturnStageServiceOrderPendingRefund} = AFTER_ORDER_STATUS
|
||||||
|
const stage_name = useMemo(() => {
|
||||||
|
return [ReturnStageQualityCheckPendingRefund.value, ReturnStageServiceOrderPendingRefund.value].includes(value?.stage)?'待退款':value?.stage_name
|
||||||
|
}, [value])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View className={styles.order_item}>
|
<View className={styles.order_item}>
|
||||||
<View className={styles.header} onClick={() => goLink('/pages/salesAfter/index', {id: value?.id})}>
|
<View className={styles.header} onClick={() => goLink('/pages/salesAfter/index', {id: value?.id})}>
|
||||||
@ -95,7 +101,7 @@ export default memo(({value, onClickBtn}: Param) => {
|
|||||||
<View className={styles.product_title}>
|
<View className={styles.product_title}>
|
||||||
<View className={styles.product_tag}>{value?.sale_mode_name}</View>
|
<View className={styles.product_tag}>{value?.sale_mode_name}</View>
|
||||||
<View className={styles.product_name}>{formatHashTag(value?.product_list?.[0].code, value?.product_list?.[0].name)}</View>
|
<View className={styles.product_name}>{formatHashTag(value?.product_list?.[0].code, value?.product_list?.[0].name)}</View>
|
||||||
<View className={styles.product_status}>{value?.stage_name}</View>
|
<View className={styles.product_status}>{stage_name}</View>
|
||||||
</View>
|
</View>
|
||||||
<View className={styles.product_list}>
|
<View className={styles.product_list}>
|
||||||
<View className={styles.image}>
|
<View className={styles.image}>
|
||||||
|
@ -111,6 +111,8 @@ export default () => {
|
|||||||
//显示记录
|
//显示记录
|
||||||
const [applyRecord, setApplyRecord] = useState(false)
|
const [applyRecord, setApplyRecord] = useState(false)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View className={styles.order_list_main}>
|
<View className={styles.order_list_main}>
|
||||||
<View className={styles.title}>
|
<View className={styles.title}>
|
||||||
|
@ -13,19 +13,10 @@ import { useDidShow, } from '@tarojs/taro'
|
|||||||
import { GetAdminUserInfoApi } from "@/api/user";
|
import { GetAdminUserInfoApi } from "@/api/user";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
//重新获取用户信息
|
|
||||||
// const {fetchData: useFetchData} = GetAdminUserInfoApi()
|
|
||||||
// const [userDataAgain, setUserDataAgain] = useState<any>({})
|
|
||||||
// const getUserData = async () => {
|
|
||||||
// let res = await useFetchData()
|
|
||||||
// setUserDataAgain(res.data)
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// 用户信息
|
// 用户信息
|
||||||
const { getSelfUserInfo } = useLogin();
|
const { getSelfUserInfo, getAdminUserInfo } = useLogin();
|
||||||
const { adminUserInfo } = useSelector(state => state.userInfo);
|
const { adminUserInfo } = useSelector(state => state.userInfo);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// getSelfUserInfo().then().catch(() => {
|
// getSelfUserInfo().then().catch(() => {
|
||||||
@ -45,7 +36,7 @@ export default () => {
|
|||||||
}, [])
|
}, [])
|
||||||
useDidShow(() => {
|
useDidShow(() => {
|
||||||
ApigetTotal()
|
ApigetTotal()
|
||||||
// getUserData()
|
getAdminUserInfo()
|
||||||
})
|
})
|
||||||
const checkGo = () => {
|
const checkGo = () => {
|
||||||
if (adminUserInfo?.authentication_status === 0 || adminUserInfo?.authentication_status === 1 || adminUserInfo?.authentication_status === 2 || adminUserInfo?.authentication_status === 3) {
|
if (adminUserInfo?.authentication_status === 0 || adminUserInfo?.authentication_status === 1 || adminUserInfo?.authentication_status === 2 || adminUserInfo?.authentication_status === 3) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
@font-face {
|
@font-face {
|
||||||
font-family: "iconfont"; /* Project id 2987621 */
|
font-family: "iconfont"; /* Project id 2987621 */
|
||||||
src: url('iconfont.ttf?t=1653384789393') format('truetype');
|
src: url('iconfont.ttf?t=1657712890419') format('truetype');
|
||||||
}
|
}
|
||||||
|
|
||||||
.iconfont {
|
.iconfont {
|
||||||
@ -11,6 +11,42 @@
|
|||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.icon-shangchuanzhaopian:before {
|
||||||
|
content: "\e676";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-zuzhiziliao:before {
|
||||||
|
content: "\e66e";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-rili:before {
|
||||||
|
content: "\e66f";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-yishoucang:before {
|
||||||
|
content: "\e670";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-tongguorenzheng:before {
|
||||||
|
content: "\e671";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-gerenziliao:before {
|
||||||
|
content: "\e672";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-shuaxin:before {
|
||||||
|
content: "\e673";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-piliangguanli:before {
|
||||||
|
content: "\e674";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-xinzeng:before {
|
||||||
|
content: "\e675";
|
||||||
|
}
|
||||||
|
|
||||||
.icon-yucunkuan:before {
|
.icon-yucunkuan:before {
|
||||||
content: "\e66c";
|
content: "\e66c";
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user