✨ feat:状态按钮重新对接完成进度20%
This commit is contained in:
@@ -35,14 +35,14 @@
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #000000;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
/*这里设置几行*/
|
||||
overflow: hidden;
|
||||
margin-right: 41px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2; /*这里设置几行*/
|
||||
overflow: hidden;
|
||||
|
||||
}
|
||||
|
||||
.icon_more {
|
||||
|
||||
@@ -21,7 +21,7 @@ export default memo((props: propsObj) => {
|
||||
if (receivingStatus == 1) {
|
||||
return obj.take_goods_address
|
||||
} else {
|
||||
return obj.province_name + obj.city_name + obj.district_name
|
||||
return obj.province_name + obj.city_name + obj.district_name + obj.address_detail
|
||||
}
|
||||
}, [obj, receivingStatus])
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import Popup from "@/components/popup"
|
||||
import { Textarea, View } from "@tarojs/components"
|
||||
import { useCallback, useEffect, useState } from "react"
|
||||
import styles from './index.module.scss'
|
||||
import styles from './index.module.scss'
|
||||
|
||||
type Param = {
|
||||
onBlur?: (val:any) => void
|
||||
onBlur?: (val: any) => void
|
||||
onSave?: (val: string) => void
|
||||
defaultValue?: string
|
||||
}
|
||||
export default ({onBlur, onSave, defaultValue = ''}:Param) => {
|
||||
export default ({ onBlur, onSave, defaultValue = '' }: Param) => {
|
||||
const [descData, setDescData] = useState({
|
||||
number: 0,
|
||||
value: '',
|
||||
@@ -21,10 +21,10 @@ export default ({onBlur, onSave, defaultValue = ''}:Param) => {
|
||||
|
||||
const getDesc = (value) => {
|
||||
let res = value
|
||||
if(value.length > descData.count) {
|
||||
if (value.length > descData.count) {
|
||||
res = value.slice(0, descData.count)
|
||||
}
|
||||
setDescData({...descData, number:res.length, value: res})
|
||||
setDescData({ ...descData, number: res.length, value: res })
|
||||
}
|
||||
|
||||
const setSave = () => {
|
||||
|
||||
@@ -199,6 +199,7 @@ page {
|
||||
|
||||
|
||||
}
|
||||
|
||||
.itemGoods:last-child {
|
||||
margin-top: 24px;
|
||||
display: flex;
|
||||
@@ -367,4 +368,18 @@ page {
|
||||
transform: rotate(135deg);
|
||||
box-shadow: 2px -2px 2px #ccc;
|
||||
}
|
||||
}
|
||||
|
||||
.order_save_address {
|
||||
height: 82px;
|
||||
background: #007aff;
|
||||
border-radius: 40px;
|
||||
width: 668px;
|
||||
text-align: center;
|
||||
line-height: 82px;
|
||||
color: #fff;
|
||||
margin-top: 20px;
|
||||
margin-left: 24px;
|
||||
margin-right: 24px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
@@ -5,7 +5,7 @@ import classnames from "classnames";
|
||||
import Taro, { usePullDownRefresh, useRouter, useDidShow } from '@tarojs/taro';
|
||||
import AdvanceOrderState from './components/advanceOrderState'
|
||||
import AddressDetailBox from './components/addressDetailBox'
|
||||
import Remark from './components/remark'
|
||||
import Remark from '@/components/textareaEnhance'
|
||||
import Popup from '@/components/popup'
|
||||
import BottomBtns from '@/components/BottomBtns';
|
||||
import BottomApply from './components/BottomApply';
|
||||
@@ -72,11 +72,19 @@ export default () => {
|
||||
setReceivingStatus(value)
|
||||
getDetail()
|
||||
} else {
|
||||
Taro.hideLoading()
|
||||
Taro.showToast({
|
||||
title: '请先去新增地址',
|
||||
icon: 'error'
|
||||
})
|
||||
if (res.data.code == 70029) {
|
||||
Taro.hideLoading()
|
||||
Taro.showToast({
|
||||
title: res.msg,
|
||||
icon: 'error'
|
||||
})
|
||||
} else {
|
||||
Taro.hideLoading()
|
||||
Taro.showToast({
|
||||
title: '请先去新增地址',
|
||||
icon: 'error'
|
||||
})
|
||||
}
|
||||
}
|
||||
}, 300)
|
||||
|
||||
@@ -106,6 +114,8 @@ export default () => {
|
||||
})
|
||||
setOrderMsg([...orderMsg])
|
||||
setReceivingStatus(res.data.shipment_mode)
|
||||
// 小程序提供的api,通知页面停止下拉刷新效果
|
||||
Taro.stopPullDownRefresh();
|
||||
Taro.hideLoading()
|
||||
}
|
||||
//复制功能
|
||||
@@ -148,8 +158,8 @@ export default () => {
|
||||
//备注操作
|
||||
const [showDesc, setShowDesc] = useState(false)
|
||||
const { fetchData: remarkFetch } = mpsaleOrderput()
|
||||
const getRemark = useCallback(async (e) => {
|
||||
const res = await remarkFetch({ remark: e, id: Number(router.params.id) })
|
||||
const getRemark = async () => {
|
||||
const res = await remarkFetch({ remark: infoObj.remark, id: Number(router.params.id) })
|
||||
if (res.msg === 'success') {
|
||||
Taro.showToast({
|
||||
title: '成功',
|
||||
@@ -158,7 +168,7 @@ export default () => {
|
||||
setShowDesc(false)
|
||||
getDetail()
|
||||
}
|
||||
}, [])
|
||||
}
|
||||
|
||||
//更多按钮查看操作
|
||||
const [showMore, setShowMore] = useState(false)
|
||||
@@ -476,7 +486,7 @@ export default () => {
|
||||
title: '请稍等...',
|
||||
mask: true
|
||||
})
|
||||
const restult = await obj.status !== 10 ? payOneFetch({ id: Number(obj.should_collect_order_id), payment_method: Number(arr[0]?.id) }) : payTwoFetch({ id: Number(obj.pre_collect_order_id), payment_method: Number(arr[0]?.id) })
|
||||
let restult = await obj.status !== 10 ? payOneFetch({ id: Number(obj.should_collect_order_id), payment_method: Number(arr[0]?.id) }) : payTwoFetch({ id: Number(obj.pre_collect_order_id), payment_method: Number(arr[0]?.id) })
|
||||
if (restult?.msg === 'success') {
|
||||
Taro.showToast({
|
||||
title: '交易成功'
|
||||
@@ -548,7 +558,7 @@ export default () => {
|
||||
title: '请稍等...',
|
||||
mask: true
|
||||
})
|
||||
const res = await receveFetch({ id: Number(infoObj.id) })
|
||||
const res = await receveFetch({ sale_order_id: Number(infoObj.id) })
|
||||
if (res?.msg === 'success') {
|
||||
Taro.showToast({
|
||||
title: '成功'
|
||||
@@ -569,6 +579,13 @@ export default () => {
|
||||
})
|
||||
}
|
||||
|
||||
const onChange = (e) => {
|
||||
setInfoObj((val) => ({ ...val, remark: e }))
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
setInfoObj(infoObj)
|
||||
}, [infoObj])
|
||||
return (
|
||||
<View className={styles.mainBox}>
|
||||
{(infoObj?.status != 10 && <OrderState orderInfo={infoObj} />)}
|
||||
@@ -636,11 +653,22 @@ export default () => {
|
||||
}
|
||||
|
||||
</DefaultBox>
|
||||
<DefaultBox title={'备注信息'} showMode={true} modeName={`${'填写/修改备注'} >`} clickNode={() => setShowDesc(true)}>
|
||||
<View className={styles.remarkFont}>{infoObj.remark === '' ? '暂无' : infoObj.remark}</View>
|
||||
</DefaultBox>
|
||||
<Popup show={showDesc} showTitle={false} onClose={() => setShowDesc(false)}>
|
||||
<Remark onSave={(e) => getRemark(e)} defaultValue={infoObj.remark} />
|
||||
{
|
||||
(infoObj.status != 11 && infoObj.status != 3 && infoObj.status != 8 && infoObj.status != 9 && infoObj.status != 4
|
||||
) && <DefaultBox title={'备注信息'} showMode={true} modeName={`${'填写/修改备注'} >`} clickNode={() => setShowDesc(true)}>
|
||||
<View className={styles.remarkFont}>{infoObj.remark === '' ? '暂无' : infoObj.remark}</View>
|
||||
</DefaultBox>
|
||||
}
|
||||
|
||||
<Popup show={showDesc} title={'填写/编辑备注'} showTitle={true} onClose={() => setShowDesc(false)}>
|
||||
<View style={{ margin: '24rpx' }}>
|
||||
<Remark
|
||||
// onSave={(e) => getRemark(e)}
|
||||
onChange={(e) => onChange(e)}
|
||||
defaultValue={infoObj.remark} />
|
||||
<View className={styles.order_save_address} onClick={() => getRemark()}>保存</View>
|
||||
</View>
|
||||
|
||||
</Popup>
|
||||
<View className={styles.safeBottom}></View>
|
||||
<View className={styles.bottomBox}>
|
||||
|
||||
Reference in New Issue
Block a user