电子商城测试版v3
This commit is contained in:
@@ -11,9 +11,11 @@ type Param = {
|
||||
show?: true|false,
|
||||
onClose?: () => void,
|
||||
onSubmit?: () => void,
|
||||
id?: number //订单id
|
||||
id?: number, //订单id
|
||||
images: string[], //图片列表
|
||||
descValue?: string, //描述
|
||||
}
|
||||
export default memo(({show = false, onClose, onSubmit, id = 0}: Param) => {
|
||||
export default memo(({show = false, onClose, onSubmit, id = 0, images = [], descValue = ''}: Param) => {
|
||||
//需要提交的数据
|
||||
const submitData = useRef({
|
||||
accessory_url: [],
|
||||
@@ -45,6 +47,7 @@ export default memo(({show = false, onClose, onSubmit, id = 0}: Param) => {
|
||||
} else {
|
||||
alert.error('上传失败')
|
||||
}
|
||||
onSubmit?.()
|
||||
}
|
||||
|
||||
return (
|
||||
@@ -54,11 +57,11 @@ export default memo(({show = false, onClose, onSubmit, id = 0}: Param) => {
|
||||
<View className={styles.logistics_image}>
|
||||
<Text className={styles.title_desc}>上传附件:</Text>
|
||||
<View className={styles.upload_image}>
|
||||
<UploadImage onChange={getImageList}/>
|
||||
<UploadImage onChange={getImageList} defaultList={images}/>
|
||||
</View>
|
||||
</View>
|
||||
<View className={styles.logistics_desc}>
|
||||
<TextareaEnhance onChange={getOtherReason} title="备注:" placeholder="请输入备注信息"/>
|
||||
<TextareaEnhance defaultValue={descValue} onChange={getOtherReason} title="备注:" placeholder="请输入备注信息"/>
|
||||
</View>
|
||||
<View className={styles.btns_two}>
|
||||
<View className={styles.verify_btn } onClick={() => onSubmitEven()}>保存</View>
|
||||
|
||||
@@ -116,9 +116,13 @@ import styles from './index.module.scss'
|
||||
})
|
||||
}
|
||||
}, [orderDetail])
|
||||
const onCloseLogistics = useCallback(() => setLogisticsShow(false), [])
|
||||
const onCloseLogistics = useCallback(() => {
|
||||
setLogisticsShow(false)
|
||||
}, [])
|
||||
//物流成功上传
|
||||
const logisticsSuccess = useCallback(() => {
|
||||
console.log('12312132121113')
|
||||
setLogisticsShow(false)
|
||||
getSaleOrderPreView()
|
||||
}, [])
|
||||
|
||||
@@ -137,7 +141,7 @@ import styles from './index.module.scss'
|
||||
<AfterOrderBtns orderInfo={orderInfo} onClick={orderStateClick} />
|
||||
</View>
|
||||
<AfterSalePricture urls={orderDetail?.fabric_piece_accessory_url}/>
|
||||
<ReturnLogistics show={logisticsShow} id={orderDetail?.return_apply_order_id} onClose={onCloseLogistics} onSubmit={logisticsSuccess}/>
|
||||
<ReturnLogistics images={orderDetail?.accessory_url} descValue={orderDetail?.take_goods_remark} show={logisticsShow} id={orderDetail?.return_apply_order_id} onClose={onCloseLogistics} onSubmit={logisticsSuccess}/>
|
||||
<ApplyRecord show={applyRecord} id={orderDetail?.id} onClose={() => setApplyRecord(false)}/>
|
||||
<View className="common_safe_area_y"></View>
|
||||
</View>
|
||||
|
||||
Reference in New Issue
Block a user