商城测试版v6

This commit is contained in:
2022-07-19 21:17:53 +08:00
parent d5a5099e25
commit ff8eb0ce1c
33 changed files with 839 additions and 655 deletions
+4 -5
View File
@@ -53,7 +53,7 @@ export default memo(({orderInfo, onClick, fixedBottom = true}:Param) => {
id: 1,
label: '取消退货',
validatarFunc: (orderInfo) => {
if(orderInfo.sale_mode !== 1) return [ReturnStageApplying.value, ReturnStageWaitCheck.value].includes(orderInfo.stage)
if(orderInfo?.sale_mode != 1 && orderInfo.type == ReturnApplyOrderTypeReturnForRefund.value) return [ReturnStageApplying.value, ReturnStageWaitCheck.value].includes(orderInfo.stage)
return false
}
},
@@ -61,7 +61,7 @@ export default memo(({orderInfo, onClick, fixedBottom = true}:Param) => {
id: 4,
label: '质检结果',
validatarFunc: (orderInfo) => {
if(orderInfo.sale_mode !== 1) return [ReturnStageQualityCheckPendingRefund.value, ReturnStageServiceOrderPendingRefund.value, ReturnStageReturned.value].includes(orderInfo.stage)
if(orderInfo.sale_mode !== 1 && orderInfo.type == ReturnApplyOrderTypeReturnForRefund.value) return [ReturnStageQualityCheckPendingRefund.value, ReturnStageServiceOrderPendingRefund.value, ReturnStageReturned.value].includes(orderInfo.stage)
return false
}
},
@@ -69,9 +69,8 @@ export default memo(({orderInfo, onClick, fixedBottom = true}:Param) => {
id: 6,
label: '取消退款',
validatarFunc: (orderInfo) => {
//大货 是销售退款时
if(orderInfo?.sale_mode == 0 && orderInfo.type != ReturnApplyOrderTypeReturnForRefund.value) return [ReturnStageApplying.value, ReturnStageServiceOrderPendingRefund.value]?.includes(orderInfo.stage)
if(orderInfo?.sale_mode == 1) return [ReturnStageApplying.value].includes(orderInfo.stage)
if (orderInfo?.sale_mode != 1 && orderInfo.type != ReturnApplyOrderTypeReturnForRefund.value) return [ReturnStageApplying.value, ReturnStageServiceOrderPendingRefund.value]?.includes(orderInfo.stage)
if (orderInfo?.sale_mode == 1) return [ReturnStageApplying.value].includes(orderInfo.stage)
return false
}
},
+1 -1
View File
@@ -25,7 +25,7 @@ export default ({show, onClose}:params) => {
const onConfirm = () => {
onClose?.()
// goLink('/')
goLink('/pages/bindSalesman/index')
}
return (
<>
@@ -81,5 +81,8 @@
}
}
}
.refund_destination{
font-size: 28px;
}
}
+5 -3
View File
@@ -8,15 +8,16 @@ import AmountShow from "../amountShow";
type Param = {
style?: Object,
number?: number,
number?: number|string,
title?: string,
titleStatus?: true|false, //true 标题加大加深
numberStatus?: 0|1|2, //数字尺寸
messageTitle?: string,
messageWidth?: number,
messageShow?: true|false,
numberFormat?: 'number'|'text' //数字还是字符串
}
export default memo(({number = 0, titleStatus = true, title = '', messageTitle = '', numberStatus = 1, messageWidth = 430, messageShow = false}:Param) => {
export default memo(({number = 0, titleStatus = true, title = '', messageTitle = '', numberStatus = 1, messageWidth = 430, messageShow = false, numberFormat = 'number'}:Param) => {
const [show, setShow] = useState(messageShow)
const onClose = () => {
setShow(false)
@@ -54,7 +55,8 @@ export default memo(({number = 0, titleStatus = true, title = '', messageTitle =
<Text className={classnames(styles.miconfont, 'iconfont icon-zhushi')}></Text>
</View>
</View>
<AmountShow status={numberStatus} number={number}/>
{numberFormat == 'number' && <AmountShow status={numberStatus} number={(number as number / 100)}/>}
{(numberFormat == 'text') && <View className={styles.refund_destination}>{number}</View>}
{show&&<View className={styles.close} catchMove onClick={onClose}></View>}
</View>
</>
+11 -2
View File
@@ -22,10 +22,11 @@ type Param = {
is_return?: true|false, //是否申请了售后
},
showStatus?: 'detail'|'list', //订单详情,订单列表
onClick?: (val: number) => void //点击后触发的事件,返回订单状态
}
export default memo(({orderInfo, onClick}:Param) => {
export default memo(({orderInfo, showStatus = 'detail', onClick}:Param) => {
//订单状态枚举
const {
SaleOrderStatusBooking,
@@ -126,6 +127,13 @@ export default memo(({orderInfo, onClick}:Param) => {
return orderStatus.includes(orderInfo.status)
}
},
{
id: 10,
label: '销售码单',
validatarFunc: (orderInfo) => {
return orderInfo.actual_amount > 0 && orderInfo.wait_pay_amount == 0 && showStatus == 'detail'
}
},
{
id: 2,
label: '去付款',
@@ -142,7 +150,8 @@ export default memo(({orderInfo, onClick}:Param) => {
]
return orderInfo.wait_pay_amount != 0 && orderStatus.includes(orderInfo.status)
}
},
}
])
//显示的按钮数组
+1 -1
View File
@@ -31,7 +31,7 @@
right:0;
bottom: 0;
background: rgba($color: #000, $alpha: 0.3);
border-radius: 36px 0px 10px 0px;
border-radius: 36px 0px 20px 0px;
color: #fff;
text-align: center;
}
+7 -1
View File
@@ -4,18 +4,24 @@ import { goLink } from "@/common/common"
import styles from './index.module.scss'
import { formatHashTag, formatImgUrl } from "@/common/fotmat"
import LabAndImg from "../LabAndImg"
import { useCallback, useMemo } from "react"
type Params = {
desStatus?: true|false,
productList?: any[]
}
export default ({desStatus = true, productList = []}:Params) => {
const labAndImgObj = useCallback((item) => {
const img = item?item.texture_url.split(',')[0]:''
return {lab:item.lab,rgb:item.rgb,texture_url:img}
}, [productList])
return (
<View className={styles.products_list}>
{productList?.map(item => {
return <View className={styles.products_item} onClick={() => goLink(`/pages/details/index?id=${item.id}`)}>
<View className={styles.item_img}>
<LabAndImg value={{lab:item.lab,rgb:item.rgb,texture_url:item.texture_url}}/>
<LabAndImg value={labAndImgObj(item)}/>
<View className={styles.num}>{item.product_color_count}色</View>
</View>
<View className={styles.item_con}>
+1
View File
@@ -3,6 +3,7 @@
align-items: center;
position: relative;
width: 100%;
z-index: 0;
.icon_a_sousuo1_self{
font-size: 37px;
color: $color_font_two;
+8 -19
View File
@@ -15,6 +15,7 @@ import { debounce, throttle } from "@/common/util";
import Counter from "../counter";
import { ApplyOrderAccessApi, GetAdminUserInfoApi, SubscriptionMessageApi } from "@/api/user";
import useCommonData from "@/use/useCommonData";
import BindSalesmanPopup from "../bindSalesmanPopup";
type param = {
show?: true|false,
@@ -89,6 +90,7 @@ export default ({show = false, onClose, intoStatus='shop'}: param) => {
setLoading(true)
initStatus.current = true
getShoppingCart()
setShowBindSalesman(() => false)
}
}, [show])
@@ -232,25 +234,8 @@ export default ({show = false, onClose, intoStatus='shop'}: param) => {
let res = await useFetchData()
if(res.data.order_access_status !== 3) {
if(res.data.order_access_status == 1) applyOrderAccessFetchData()
let modal_res = await Taro.showModal({
title: '提示',
content: '暂未开通下单权限功能,稍后有客服联系您,请注意接受电话。',
confirmText: '联系客服',
cancelText: '我知道',
})
if (modal_res.confirm) {
let res = await Taro.showModal({
title: '是否拨打服务热线',
confirmText: '拨打',
content: '(0757) 8270 6695',
cancelText: '取消',
})
if(res.confirm) {
Taro.makePhoneCall({
phoneNumber: '(0757)82706695'
})
}
}
setShowBindSalesman(() => true)
onClose?.()
return false
}
getSelectId()
@@ -283,6 +268,9 @@ export default ({show = false, onClose, intoStatus='shop'}: param) => {
}
}, 300)
//绑定业务员和电话号码
const [showBindSalesman, setShowBindSalesman] = useState(false)
return (
<View className={styles.shop_cart_main}>
<Popup showTitle={false} show={showPopup} onClose={() => closePopup()} >
@@ -363,6 +351,7 @@ export default ({show = false, onClose, intoStatus='shop'}: param) => {
</View>
</View>
</Popup>
<BindSalesmanPopup show={showBindSalesman} onClose={() => setShowBindSalesman(false)}/>
</View>
)
}