商城测试版v7

This commit is contained in:
2022-07-25 18:29:18 +08:00
parent 7e12050a94
commit 1dfce28a75
12 changed files with 83 additions and 39 deletions
+3 -2
View File
@@ -9,7 +9,8 @@ interface ListParams{
onClick?:()=>any, //点击列表
placeholder?:string, // 提示文本
children?: any, // 插槽
type?: string // 类型:1.input,2.textarea,3.select
type?: string // 类型:1.input,2.textarea,3.select,
primordialType?: 'text'|'number'|'idcard'|'digit'
value?: any,
style?: object, //整行样式
labelStyle?: object, // label样式
@@ -31,7 +32,7 @@ const FromList = memo((props:ListParams)=>{
{
type=="input"?
<View className="form-list-input">
<Input value={value} placeholder-class="phcolor" onInput={props?.onInput} placeholder={props.placeholder} />
<Input value={value} placeholder-class="phcolor" type={props.primordialType||'text'} onInput={props?.onInput} placeholder={props.placeholder} />
{value&&
<View><Text onClick={()=>props.onInput&&props.onInput({detail: {value: ""}})} className="iconfont icon-qingkong"/></View>
}
+9 -9
View File
@@ -63,13 +63,13 @@ export default memo(({orderInfo, onClick, fixedBottom = true}:Param) => {
return orderInfo?.is_quality_check
}
},
// {
// id: 5,
// label: '上传物流',
// validatarFunc: (orderInfo) => {
// return orderInfo?.stage == ReturnStageWaitCheck.value
// }
// },
{
id: 5,
label: '上传物流',
validatarFunc: (orderInfo) => {
return orderInfo?.stage == ReturnStageWaitCheck.value
}
},
{
id: 6,
label: '取消退款',
@@ -133,14 +133,14 @@ export default memo(({orderInfo, onClick, fixedBottom = true}:Param) => {
{(orderBtnsShowList.length > 0)&&<View className={classnames(fixedBottom&&styles.submit_order)}>
<View className={styles.btns_list}>
{(orderBtnsShowList.length > 3)&&<View className={styles.more}>
<Text onClick={() => setShowMore(true)}>更多</Text>
<Text onClick={() => setShowMore(!showMore)}>{!showMore?'更多':'关闭'}</Text>
{showMore&&<View className={styles.more_con}>
<View className={styles.more_list} style={styleTop}>
{orderBtnsShowList.map((item, index) => {
return ((index >= 3) &&<View className={styles.more_item} key={item.id} onClick={() => submitBtns(item.id, index)}>{item.label}</View>)
})}
</View>
<View className={styles.more_bg} catchMove onClick={() => setShowMore(false)}></View>
{/* <View className={styles.more_bg} catchMove onClick={() => setShowMore(false)}></View> */}
</View>}
</View>}
+11 -6
View File
@@ -181,9 +181,7 @@ export default memo(({orderInfo, showStatus = 'detail', onClick}:Param) => {
} else if (val == 6) {
receiveOrder()
} else if(val == 5) {
if(!orderInfo?.av_return_roll) return alert.none('该订单没有可退条数')
await openSubscriptionMessage({orderId: orderInfo?.orderId, scenes: ApplyGoods.value})
goLink('/pages/applyAfterSales/index',{id:orderInfo?.orderId})
applyProduct()
} else if (val == 3) {
bigApplyRefurn()
} else if(val == 8) {
@@ -191,7 +189,7 @@ export default memo(({orderInfo, showStatus = 'detail', onClick}:Param) => {
} else {
onClick?.(val)
}
}, 600)
}, 800)
//大货申请退款
const bigApplyRefurn = () => {
@@ -273,6 +271,13 @@ export default memo(({orderInfo, showStatus = 'detail', onClick}:Param) => {
}
//申请退货
const applyProduct = async () => {
if(!orderInfo?.av_return_roll) return alert.none('该订单没有可退条数')
await openSubscriptionMessage({orderId: orderInfo?.orderId, scenes: ApplyGoods.value})
goLink('/pages/applyAfterSales/index',{id:orderInfo?.orderId})
}
//显示更多按钮
const [showMore, setShowMore] = useState(false)
@@ -283,14 +288,14 @@ export default memo(({orderInfo, showStatus = 'detail', onClick}:Param) => {
return (
<View className={styles.btns_list}>
{(orderBtnsShowList.length > 3)&&<View className={styles.more}>
<Text onClick={() => setShowMore(true)}>更多</Text>
<Text onClick={() => setShowMore(!showMore)}>{!showMore?'更多':'关闭'}</Text>
{showMore&&<View className={styles.more_con}>
<View className={styles.more_list} style={styleTop}>
{orderBtnsShowList.map((item, index) => {
return ((index < (orderBtnsShowList.length - 3)) &&<View className={styles.more_item} key={item.id} onClick={() => submitBtns(item.id, index)}>{item.label}</View>)
})}
</View>
<View className={styles.more_bg} catchMove onClick={() => setShowMore(false)}></View>
{/* <View className={styles.more_bg} catchMove onClick={() => setShowMore(false)}></View> */}
</View>}
</View>}