🐞 fix(iconfont文件): 引用的 ttf 不能使用相对路径
This commit is contained in:
@@ -1,174 +1,156 @@
|
||||
|
||||
import { ScrollView, View, Image } from '@tarojs/components'
|
||||
import { memo, useCallback, useEffect, useMemo, useState, useRef } from 'react'
|
||||
import styles from './index.module.scss'
|
||||
import classnames from 'classnames'
|
||||
import BottomBtns from '@/components/BottomBtns'
|
||||
import { formatPriceDiv, formatImgUrl } from '@/common/fotmat'
|
||||
import { formatPriceDiv, formatImgUrl } from '@/common/format'
|
||||
import Taro from '@tarojs/taro'
|
||||
import Popup from '@/components/popup'
|
||||
import useCheckAuthorize from '@/use/useCheckAuthorize'
|
||||
import { alert } from '@/common/common'
|
||||
|
||||
interface Props {
|
||||
showPopup: true | false,
|
||||
popupClose?: () => void,
|
||||
obj: {
|
||||
wait_pay_amount?: number | string,
|
||||
actual_amount?: number | string,
|
||||
total_sale_price?: number | string,
|
||||
should_collect_order_id?: number | string,
|
||||
pre_collect_order_id?: number | string,
|
||||
status?: number | string,
|
||||
},
|
||||
showSide?: boolean,
|
||||
list?: any[],
|
||||
clickItem?: (any) => void,
|
||||
handsurePay?: (any) => void,
|
||||
title: string,
|
||||
picUrl?: string
|
||||
showPopup: true | false
|
||||
popupClose?: () => void
|
||||
obj: {
|
||||
wait_pay_amount?: number | string
|
||||
actual_amount?: number | string
|
||||
total_sale_price?: number | string
|
||||
should_collect_order_id?: number | string
|
||||
pre_collect_order_id?: number | string
|
||||
status?: number | string
|
||||
}
|
||||
showSide?: boolean
|
||||
list?: any[]
|
||||
clickItem?: (any) => void
|
||||
handsurePay?: (any) => void
|
||||
title: string
|
||||
picUrl?: string
|
||||
}
|
||||
|
||||
export default memo((props: Props) => {
|
||||
const {
|
||||
showSide = true,
|
||||
showPopup = false,
|
||||
popupClose,
|
||||
obj = {
|
||||
wait_pay_amount: '',
|
||||
actual_amount: '',
|
||||
total_sale_price: ''
|
||||
},
|
||||
clickItem,
|
||||
handsurePay,
|
||||
list = [],
|
||||
title = '待支付款项',
|
||||
picUrl = ''
|
||||
} = props
|
||||
const {
|
||||
showSide = true,
|
||||
showPopup = false,
|
||||
popupClose,
|
||||
obj = {
|
||||
wait_pay_amount: '',
|
||||
actual_amount: '',
|
||||
total_sale_price: '',
|
||||
},
|
||||
clickItem,
|
||||
handsurePay,
|
||||
list = [],
|
||||
title = '待支付款项',
|
||||
picUrl = '',
|
||||
} = props
|
||||
|
||||
const fileData = useRef({
|
||||
filePath: '',
|
||||
base64: '',
|
||||
const fileData = useRef({
|
||||
filePath: '',
|
||||
base64: '',
|
||||
})
|
||||
|
||||
//预览图片
|
||||
const showImage = () => {
|
||||
const time = new Date().valueOf()
|
||||
const [, format, bodyData] = /data:image\/(\w+);base64,(.*)/.exec(picUrl) || []
|
||||
let filePath = Taro.env.USER_DATA_PATH + '/img' + time + '.' + format
|
||||
fileData.current.filePath = filePath
|
||||
fileData.current.base64 = bodyData
|
||||
const save = Taro.getFileSystemManager()
|
||||
save.writeFile({
|
||||
filePath: fileData.current.filePath,
|
||||
data: fileData.current.base64,
|
||||
encoding: 'base64',
|
||||
})
|
||||
Taro.previewImage({
|
||||
current: fileData.current.filePath, // 当前显示
|
||||
urls: [fileData.current.filePath], // 需要预览的图片http链接列表
|
||||
})
|
||||
}
|
||||
|
||||
//预览图片
|
||||
const showImage = () => {
|
||||
const time = new Date().valueOf()
|
||||
const [, format, bodyData] = /data:image\/(\w+);base64,(.*)/.exec(picUrl) || []
|
||||
let filePath = Taro.env.USER_DATA_PATH + '/img' + time + '.' + format
|
||||
fileData.current.filePath = filePath
|
||||
fileData.current.base64 = bodyData
|
||||
const save = Taro.getFileSystemManager()
|
||||
save.writeFile({
|
||||
filePath: fileData.current.filePath,
|
||||
data: fileData.current.base64,
|
||||
encoding: 'base64',
|
||||
})
|
||||
Taro.previewImage({
|
||||
current: fileData.current.filePath, // 当前显示
|
||||
urls: [fileData.current.filePath], // 需要预览的图片http链接列表
|
||||
})
|
||||
}
|
||||
//检查是否开启保存图片权限
|
||||
const { check } = useCheckAuthorize({ scope: 'scope.writePhotosAlbum', msg: '您没授权,无法保存图片' })
|
||||
const saveImageCheck = async () => {
|
||||
const res = await check()
|
||||
res && saveImage()
|
||||
}
|
||||
|
||||
//保存图片
|
||||
const saveImage = () => {
|
||||
alert.loading('正在保存图片')
|
||||
Taro.saveImageToPhotosAlbum({
|
||||
filePath: fileData.current.filePath,
|
||||
success: function () {
|
||||
alert.success('图片保存成功')
|
||||
},
|
||||
fail: function (err) {
|
||||
console.log('err::', err)
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
//检查是否开启保存图片权限
|
||||
const { check } = useCheckAuthorize({ scope: 'scope.writePhotosAlbum', msg: '您没授权,无法保存图片' })
|
||||
const saveImageCheck = async () => {
|
||||
const res = await check()
|
||||
res && saveImage()
|
||||
}
|
||||
|
||||
//保存图片
|
||||
const saveImage = () => {
|
||||
alert.loading('正在保存图片')
|
||||
Taro.saveImageToPhotosAlbum({
|
||||
filePath: fileData.current.filePath,
|
||||
success: function () {
|
||||
alert.success('图片保存成功')
|
||||
},
|
||||
fail: function (err) {
|
||||
console.log('err::', err)
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
return (
|
||||
<View className={styles.popupBox}>
|
||||
<Popup show={showPopup} title={title} onClose={() => popupClose?.()}>
|
||||
{
|
||||
showSide &&
|
||||
<View className={styles.contBox}>
|
||||
<View className={styles.topMoney}>
|
||||
¥{formatPriceDiv(obj.wait_pay_amount)}
|
||||
</View>
|
||||
<View className={styles.itemMoney}>
|
||||
<View className={styles.leftFont}>
|
||||
订单金额
|
||||
</View>
|
||||
<View className={styles.rightFont}>
|
||||
¥{formatPriceDiv(obj.total_sale_price)}
|
||||
</View>
|
||||
</View>
|
||||
<View className={styles.itemMoney}>
|
||||
<View className={styles.leftFont}>
|
||||
已付金额
|
||||
</View>
|
||||
<View className={styles.rightFont}>
|
||||
¥{formatPriceDiv(obj.actual_amount)}
|
||||
</View>
|
||||
</View>
|
||||
<View className={styles.line}></View>
|
||||
{
|
||||
list.map((item, index) => {
|
||||
return (
|
||||
<View className={styles.itemBox} key={index} onClick={() => clickItem?.(item)}>
|
||||
<View className={styles.leftItem}>
|
||||
<View className={styles.leftCrile}>
|
||||
<View className={classnames('iconfont', item.iconfont, styles.lujing)}></View>
|
||||
</View>
|
||||
<View className={styles.rightLeft}>
|
||||
<View className={styles.title}>{item.name}</View>
|
||||
{
|
||||
item.fonts && <View className={styles.nums}>{item.fonts}{
|
||||
item.money !== "" ? "¥" : ""
|
||||
}{item.money}</View>
|
||||
}
|
||||
</View>
|
||||
</View>
|
||||
{
|
||||
item.name !== '扫码支付' &&
|
||||
<View className={item.checked ? styles.activeChecked : styles.checkYuan}>
|
||||
<View className={classnames('iconfont', 'icon-lujing', styles.gou)}></View>
|
||||
</View>
|
||||
}
|
||||
{
|
||||
item.name === '扫码支付' &&
|
||||
<View className={classnames('iconfont', 'icon-chakanquanbukehu', styles.chakanquanbukehu)}></View>
|
||||
}
|
||||
</View>
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
return (
|
||||
<View className={styles.popupBox}>
|
||||
<Popup show={showPopup} title={title} onClose={() => popupClose?.()}>
|
||||
{showSide && (
|
||||
<View className={styles.contBox}>
|
||||
<View className={styles.topMoney}>¥{formatPriceDiv(obj.wait_pay_amount)}</View>
|
||||
<View className={styles.itemMoney}>
|
||||
<View className={styles.leftFont}>订单金额</View>
|
||||
<View className={styles.rightFont}>¥{formatPriceDiv(obj.total_sale_price)}</View>
|
||||
</View>
|
||||
<View className={styles.itemMoney}>
|
||||
<View className={styles.leftFont}>已付金额</View>
|
||||
<View className={styles.rightFont}>¥{formatPriceDiv(obj.actual_amount)}</View>
|
||||
</View>
|
||||
<View className={styles.line}></View>
|
||||
{list.map((item, index) => {
|
||||
return (
|
||||
<View className={styles.itemBox} key={index} onClick={() => clickItem?.(item)}>
|
||||
<View className={styles.leftItem}>
|
||||
<View className={styles.leftCrile}>
|
||||
<View className={classnames('iconfont', item.iconfont, styles.lujing)}></View>
|
||||
</View>
|
||||
|
||||
}
|
||||
{
|
||||
showSide && <View className={styles.sure} onClick={() => handsurePay?.(props?.obj)}>确认交易</View>
|
||||
}
|
||||
{
|
||||
!showSide &&
|
||||
<ScrollView enhanced scrollY style={{ height: '700rpx', marginLeft: '24rpx' }}>
|
||||
<View className={styles.pic}>
|
||||
<Image lazyLoad mode='widthFix' style={{ width: '100%', height: '100%' }} src={picUrl} onClick={() => showImage()}></Image>
|
||||
<View className={styles.rightLeft}>
|
||||
<View className={styles.title}>{item.name}</View>
|
||||
{item.fonts && (
|
||||
<View className={styles.nums}>
|
||||
{item.fonts}
|
||||
{item.money !== '' ? '¥' : ''}
|
||||
{item.money}
|
||||
</View>
|
||||
</ScrollView>
|
||||
|
||||
}
|
||||
{
|
||||
!showSide && <View className={styles.sure} onClick={() => saveImageCheck()}>保存图片</View>
|
||||
}
|
||||
</Popup >
|
||||
</View >
|
||||
)
|
||||
})
|
||||
)}
|
||||
</View>
|
||||
</View>
|
||||
{item.name !== '扫码支付' && (
|
||||
<View className={item.checked ? styles.activeChecked : styles.checkYuan}>
|
||||
<View className={classnames('iconfont', 'icon-lujing', styles.gou)}></View>
|
||||
</View>
|
||||
)}
|
||||
{item.name === '扫码支付' && <View className={classnames('iconfont', 'icon-chakanquanbukehu', styles.chakanquanbukehu)}></View>}
|
||||
</View>
|
||||
)
|
||||
})}
|
||||
</View>
|
||||
)}
|
||||
{showSide && (
|
||||
<View className={styles.sure} onClick={() => handsurePay?.(props?.obj)}>
|
||||
确认交易
|
||||
</View>
|
||||
)}
|
||||
{!showSide && (
|
||||
<ScrollView enhanced scrollY style={{ height: '700rpx', marginLeft: '24rpx' }}>
|
||||
<View className={styles.pic}>
|
||||
<Image lazyLoad mode='widthFix' style={{ width: '100%', height: '100%' }} src={picUrl} onClick={() => showImage()}></Image>
|
||||
</View>
|
||||
</ScrollView>
|
||||
)}
|
||||
{!showSide && (
|
||||
<View className={styles.sure} onClick={() => saveImageCheck()}>
|
||||
保存图片
|
||||
</View>
|
||||
)}
|
||||
</Popup>
|
||||
</View>
|
||||
)
|
||||
})
|
||||
|
||||
@@ -3,78 +3,100 @@ import { memo, useCallback, useEffect, useMemo, useState } from 'react'
|
||||
import styles from './index.module.scss'
|
||||
import classnames from 'classnames'
|
||||
import BottomBtns from '@/components/BottomBtns'
|
||||
import { formatPriceDiv } from '@/common/fotmat'
|
||||
import { formatPriceDiv } from '@/common/format'
|
||||
import Taro from '@tarojs/taro'
|
||||
|
||||
interface propsObj {
|
||||
obj: any,
|
||||
cancle?: (arg: any, obj: any) => void,
|
||||
nextBuy?: (arg: any, obj: any) => void,
|
||||
toPay?: (arg: any, obj: any) => void
|
||||
obj: any
|
||||
cancle?: (arg: any, obj: any) => void
|
||||
nextBuy?: (arg: any, obj: any) => void
|
||||
toPay?: (arg: any, obj: any) => void
|
||||
}
|
||||
|
||||
|
||||
export default memo((props: propsObj) => {
|
||||
const navTo = (e) => {
|
||||
Taro.navigateTo({
|
||||
url: '/pages/orderDetails/index?id=' + props?.obj?.id
|
||||
})
|
||||
}
|
||||
const navTo = (e) => {
|
||||
Taro.navigateTo({
|
||||
url: '/pages/orderDetails/index?id=' + props?.obj?.id,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
return (
|
||||
<View className={styles.itemBox} onClick={(e) => navTo(e)}>
|
||||
<View className={styles.topItem}>
|
||||
<View className={styles.orderNo}>单号:{props?.obj?.order_no}</View>
|
||||
<View className={styles.status}>{props?.obj?.status_name}</View>
|
||||
</View>
|
||||
<View className={styles.pussName}>{props?.obj?.purchaser_name}</View>
|
||||
<View className={styles.line}></View>
|
||||
<View className={styles.contBox}>
|
||||
<View className={styles.leftCont} style={{ backgroundColor: `rgb(${props?.obj?.product_list[0]?.product_colors[0]?.rgb?.r} ${props?.obj?.product_list[0]?.product_colors[0]?.rgb?.g} ${props?.obj?.product_list[0]?.product_colors[0]?.rgb?.b})` }}>
|
||||
<View className={styles.leftContNums}>颜色 ({props?.obj?.total_colors})</View>
|
||||
</View>
|
||||
<View className={styles.rightCont}>
|
||||
<View className={styles.rightTop}>
|
||||
<View className={styles.productBox}>
|
||||
<View className={styles.productName}>{props?.obj?.product_list[0]?.code} {props?.obj?.product_list[0]?.name}</View>
|
||||
<View className={styles.productMode}>{props?.obj?.sale_mode === 0 ? '大货' : props?.obj?.sale_mode === 1 ? '剪版' : '散剪'}</View>
|
||||
</View>
|
||||
<View className={styles.shipMode}>{props?.obj?.shipment_mode_name}</View>
|
||||
</View>
|
||||
<View className={styles.colorsBox}>
|
||||
<View className={styles.colorNameOne}>{props?.obj?.product_list[0]?.product_colors[0]?.code} {props?.obj?.product_list[0]?.product_colors[0]?.name}</View>
|
||||
<View className={styles.colorName}>x{props?.obj?.sale_mode === 0 ? props?.obj?.product_list[0]?.product_colors[0]?.roll : props?.obj?.product_list[0]?.product_colors[0]?.length / 100} {props?.obj?.sale_mode === 0 ? '条' : 'm'}</View>
|
||||
<View className={styles.colorNameTwo}>¥ {props?.obj?.product_list[0]?.product_colors[0]?.sale_price / 100}/kg</View>
|
||||
</View>
|
||||
{
|
||||
props?.obj?.product_list[0]?.product_colors?.length > 1 && <>
|
||||
<View className={styles.colorsBox}>
|
||||
<View className={styles.colorNameOne}>{props?.obj?.product_list[0]?.product_colors[1]?.code} {props?.obj?.product_list[0]?.product_colors[1]?.name}</View>
|
||||
<View className={styles.colorName}>x{props?.obj?.sale_mode === 0 ? props?.obj?.product_list[0]?.product_colors[1]?.roll : props?.obj?.product_list[0]?.product_colors[1]?.length / 100} {props?.obj?.sale_mode === 0 ? '条' : 'm'}</View>
|
||||
<View className={styles.colorNameTwo}>¥ {props?.obj?.product_list[0]?.product_colors[1]?.sale_price / 100}/kg</View>
|
||||
</View>
|
||||
</>
|
||||
}
|
||||
</View>
|
||||
</View>
|
||||
<View className={styles.lineOne}></View>
|
||||
<View className={styles.bottomMsg}>
|
||||
<View className={styles.msgLeft}>布料信息:</View>
|
||||
<View className={styles.msgRight}>{props?.obj?.total_fabrics} 种面料,{props?.obj?.total_colors} 种颜色,共 {props?.obj?.sale_mode === 0 ? props?.obj?.total_number : props?.obj?.total_number / 100} {props?.obj?.sale_mode === 0 ? '条' : 'm'}</View>
|
||||
</View>
|
||||
<View className={styles.bottomMsg}>
|
||||
<View className={styles.msgLeft}>预估金额:</View>
|
||||
<View className={styles.msgRightOne}>¥{formatPriceDiv(props?.obj?.estimate_amount)}</View>
|
||||
</View>
|
||||
<View className={styles.bottomBox}>
|
||||
<BottomBtns
|
||||
obj={props?.obj}
|
||||
cancle={(e) => props?.cancle?.(e, props?.obj)}
|
||||
nextBuy={(e) => props?.nextBuy?.(e, props?.obj)}
|
||||
toPay={(e) => props?.toPay?.(e, props?.obj)}
|
||||
></BottomBtns>
|
||||
</View>
|
||||
return (
|
||||
<View className={styles.itemBox} onClick={(e) => navTo(e)}>
|
||||
<View className={styles.topItem}>
|
||||
<View className={styles.orderNo}>单号:{props?.obj?.order_no}</View>
|
||||
<View className={styles.status}>{props?.obj?.status_name}</View>
|
||||
</View>
|
||||
<View className={styles.pussName}>{props?.obj?.purchaser_name}</View>
|
||||
<View className={styles.line}></View>
|
||||
<View className={styles.contBox}>
|
||||
<View
|
||||
className={styles.leftCont}
|
||||
style={{
|
||||
backgroundColor: `rgb(${props?.obj?.product_list[0]?.product_colors[0]?.rgb?.r} ${props?.obj?.product_list[0]?.product_colors[0]?.rgb?.g} ${props?.obj?.product_list[0]?.product_colors[0]?.rgb?.b})`,
|
||||
}}>
|
||||
<View className={styles.leftContNums}>颜色 ({props?.obj?.total_colors})</View>
|
||||
</View>
|
||||
)
|
||||
})
|
||||
<View className={styles.rightCont}>
|
||||
<View className={styles.rightTop}>
|
||||
<View className={styles.productBox}>
|
||||
<View className={styles.productName}>
|
||||
{props?.obj?.product_list[0]?.code} {props?.obj?.product_list[0]?.name}
|
||||
</View>
|
||||
<View className={styles.productMode}>{props?.obj?.sale_mode === 0 ? '大货' : props?.obj?.sale_mode === 1 ? '剪版' : '散剪'}</View>
|
||||
</View>
|
||||
<View className={styles.shipMode}>{props?.obj?.shipment_mode_name}</View>
|
||||
</View>
|
||||
<View className={styles.colorsBox}>
|
||||
<View className={styles.colorNameOne}>
|
||||
{props?.obj?.product_list[0]?.product_colors[0]?.code} {props?.obj?.product_list[0]?.product_colors[0]?.name}
|
||||
</View>
|
||||
<View className={styles.colorName}>
|
||||
x
|
||||
{props?.obj?.sale_mode === 0
|
||||
? props?.obj?.product_list[0]?.product_colors[0]?.roll
|
||||
: props?.obj?.product_list[0]?.product_colors[0]?.length / 100}{' '}
|
||||
{props?.obj?.sale_mode === 0 ? '条' : 'm'}
|
||||
</View>
|
||||
<View className={styles.colorNameTwo}>¥ {props?.obj?.product_list[0]?.product_colors[0]?.sale_price / 100}/kg</View>
|
||||
</View>
|
||||
{props?.obj?.product_list[0]?.product_colors?.length > 1 && (
|
||||
<>
|
||||
<View className={styles.colorsBox}>
|
||||
<View className={styles.colorNameOne}>
|
||||
{props?.obj?.product_list[0]?.product_colors[1]?.code} {props?.obj?.product_list[0]?.product_colors[1]?.name}
|
||||
</View>
|
||||
<View className={styles.colorName}>
|
||||
x
|
||||
{props?.obj?.sale_mode === 0
|
||||
? props?.obj?.product_list[0]?.product_colors[1]?.roll
|
||||
: props?.obj?.product_list[0]?.product_colors[1]?.length / 100}{' '}
|
||||
{props?.obj?.sale_mode === 0 ? '条' : 'm'}
|
||||
</View>
|
||||
<View className={styles.colorNameTwo}>¥ {props?.obj?.product_list[0]?.product_colors[1]?.sale_price / 100}/kg</View>
|
||||
</View>
|
||||
</>
|
||||
)}
|
||||
</View>
|
||||
</View>
|
||||
<View className={styles.lineOne}></View>
|
||||
<View className={styles.bottomMsg}>
|
||||
<View className={styles.msgLeft}>布料信息:</View>
|
||||
<View className={styles.msgRight}>
|
||||
{props?.obj?.total_fabrics} 种面料,{props?.obj?.total_colors} 种颜色,共{' '}
|
||||
{props?.obj?.sale_mode === 0 ? props?.obj?.total_number : props?.obj?.total_number / 100} {props?.obj?.sale_mode === 0 ? '条' : 'm'}
|
||||
</View>
|
||||
</View>
|
||||
<View className={styles.bottomMsg}>
|
||||
<View className={styles.msgLeft}>预估金额:</View>
|
||||
<View className={styles.msgRightOne}>¥{formatPriceDiv(props?.obj?.estimate_amount)}</View>
|
||||
</View>
|
||||
<View className={styles.bottomBox}>
|
||||
<BottomBtns
|
||||
obj={props?.obj}
|
||||
cancle={(e) => props?.cancle?.(e, props?.obj)}
|
||||
nextBuy={(e) => props?.nextBuy?.(e, props?.obj)}
|
||||
toPay={(e) => props?.toPay?.(e, props?.obj)}></BottomBtns>
|
||||
</View>
|
||||
</View>
|
||||
)
|
||||
})
|
||||
|
||||
+186
-158
@@ -1,11 +1,11 @@
|
||||
import { View, Input, Button } from '@tarojs/components'
|
||||
import { useCallback, useEffect, useMemo, useRef, useState, } from 'react'
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
||||
import { mpenumsaleorderstatus, OrderListApi } from '@/api/order'
|
||||
import OrderStatusList from './components/orderStatusList'
|
||||
import Search from '@/components/search'
|
||||
import { dataLoadingStatus, getFilterData } from '@/common/util'
|
||||
import styles from "./index.module.scss"
|
||||
import classnames from "classnames";
|
||||
import styles from './index.module.scss'
|
||||
import classnames from 'classnames'
|
||||
import Popup from '@/components/popup'
|
||||
import InfiniteScroll from '@/components/infiniteScroll'
|
||||
import Taro, { faceVerifyForPay, useDidShow } from '@tarojs/taro'
|
||||
@@ -17,10 +17,10 @@ import {
|
||||
orderPaymentpreCollectOrderorderPaymentMethodInfo,
|
||||
orderPaymentorderPaymentSubmission,
|
||||
orderPaymentpreCollectOrderorderPaymentSubmission,
|
||||
GetPayCode
|
||||
GetPayCode,
|
||||
} from '@/api/order'
|
||||
import PayPopup from './components/PayPopup'
|
||||
import { formatDateTime, formatHashTag, formatImgUrl, formatPriceDiv, formatWeightDiv } from '@/common/fotmat'
|
||||
import { formatDateTime, formatHashTag, formatImgUrl, formatPriceDiv, formatWeightDiv } from '@/common/format'
|
||||
|
||||
export default () => {
|
||||
//页码和页数
|
||||
@@ -37,16 +37,13 @@ export default () => {
|
||||
const getOrderList = async () => {
|
||||
let res = await listFetchData({
|
||||
...getFilterData(searchField),
|
||||
...getFilterData(searchObj)
|
||||
...getFilterData(searchObj),
|
||||
})
|
||||
setOrderData((e) => ({ ...e, list: res.data?.list, total: res.data?.total }))
|
||||
setshowPopup(false)
|
||||
setRefresherTriggeredStatus(() => false)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//列表下拉刷新
|
||||
const [refresherTriggeredStatus, setRefresherTriggeredStatus] = useState(false)
|
||||
const getRefresherRefresh = async () => {
|
||||
@@ -56,7 +53,10 @@ export default () => {
|
||||
}
|
||||
//数据加载状态
|
||||
const statusMore = useMemo(() => {
|
||||
console.log({ list: orderData.list, total: orderData.total, status: orderState.loading }, '{ list: orderData.list, total: orderData.total, status: orderState.loading }')
|
||||
console.log(
|
||||
{ list: orderData.list, total: orderData.total, status: orderState.loading },
|
||||
'{ list: orderData.list, total: orderData.total, status: orderState.loading }',
|
||||
)
|
||||
return dataLoadingStatus({ list: orderData.list, total: orderData.total, status: orderState.loading })
|
||||
}, [orderData, orderState])
|
||||
|
||||
@@ -108,12 +108,10 @@ export default () => {
|
||||
setshowPopup(false)
|
||||
}
|
||||
|
||||
|
||||
useDidShow(() => {
|
||||
|
||||
//获取选择的客户
|
||||
let pages = Taro.getCurrentPages();
|
||||
let currPage = pages[pages.length - 1]; // 获取当前页面
|
||||
let pages = Taro.getCurrentPages()
|
||||
let currPage = pages[pages.length - 1] // 获取当前页面
|
||||
console.log(currPage.data, '8888')
|
||||
|
||||
setsearchObj((e) => ({
|
||||
@@ -126,12 +124,12 @@ export default () => {
|
||||
})
|
||||
|
||||
interface filterObj {
|
||||
purchaser_id?: string | number,
|
||||
clientName?: string,
|
||||
sale_user_id?: string | number,
|
||||
saleuserName?: string,
|
||||
orderNo?: string | undefined,
|
||||
sale_mode?: Number | undefined,
|
||||
purchaser_id?: string | number
|
||||
clientName?: string
|
||||
sale_user_id?: string | number
|
||||
saleuserName?: string
|
||||
orderNo?: string | undefined
|
||||
sale_mode?: Number | undefined
|
||||
shipment_mode?: Number | undefined
|
||||
}
|
||||
|
||||
@@ -143,17 +141,17 @@ export default () => {
|
||||
saleuserName: '',
|
||||
orderNo: '',
|
||||
sale_mode: undefined,
|
||||
shipment_mode: undefined
|
||||
shipment_mode: undefined,
|
||||
})
|
||||
// 跳转选择客户
|
||||
const navTo = (index) => {
|
||||
if (index === 1) {
|
||||
Taro.navigateTo({
|
||||
url: '/pages/customerPage/index?clientId=' + searchObj?.purchaser_id
|
||||
url: '/pages/customerPage/index?clientId=' + searchObj?.purchaser_id,
|
||||
})
|
||||
} else {
|
||||
Taro.navigateTo({
|
||||
url: '/pages/saleuserPage/index?saleuserId=' + searchObj?.sale_user_id
|
||||
url: '/pages/saleuserPage/index?saleuserId=' + searchObj?.sale_user_id,
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -163,10 +161,15 @@ export default () => {
|
||||
}
|
||||
|
||||
//订单类型
|
||||
const [modeList, setModeList] = useState<any[]>([{ id: -1, name: '不限' }, { id: 0, name: '大货' }, { id: 1, name: '剪版' }, { id: 2, name: '散剪' }])
|
||||
const [modeList, setModeList] = useState<any[]>([
|
||||
{ id: -1, name: '不限' },
|
||||
{ id: 0, name: '大货' },
|
||||
{ id: 1, name: '剪版' },
|
||||
{ id: 2, name: '散剪' },
|
||||
])
|
||||
//选择订单类型
|
||||
const handCheckMode = (item) => {
|
||||
modeList.map(it => {
|
||||
modeList.map((it) => {
|
||||
if (it.id === item.id) {
|
||||
it.checked = true
|
||||
} else {
|
||||
@@ -179,10 +182,14 @@ export default () => {
|
||||
}
|
||||
|
||||
///发货方式类型
|
||||
const [deliveryList, setdeliveryList] = useState<any[]>([{ id: -1, name: '不限' }, { id: 1, name: '自提' }, { id: 2, name: '物流' }])
|
||||
const [deliveryList, setdeliveryList] = useState<any[]>([
|
||||
{ id: -1, name: '不限' },
|
||||
{ id: 1, name: '自提' },
|
||||
{ id: 2, name: '物流' },
|
||||
])
|
||||
//选择发货方式类型
|
||||
const handCheckDelivery = (item) => {
|
||||
deliveryList.map(it => {
|
||||
deliveryList.map((it) => {
|
||||
if (it.id === item.id) {
|
||||
it.checked = true
|
||||
} else {
|
||||
@@ -195,7 +202,8 @@ export default () => {
|
||||
}
|
||||
//是否不允许确认筛选
|
||||
const isDisabled = useMemo(() => {
|
||||
if (searchObj.clientName !== '' ||
|
||||
if (
|
||||
searchObj.clientName !== '' ||
|
||||
searchObj.orderNo !== '' ||
|
||||
searchObj.saleuserName !== '' ||
|
||||
searchObj.sale_mode !== undefined ||
|
||||
@@ -216,7 +224,7 @@ export default () => {
|
||||
saleuserName: '',
|
||||
orderNo: '',
|
||||
sale_mode: undefined,
|
||||
shipment_mode: undefined
|
||||
shipment_mode: undefined,
|
||||
})
|
||||
}
|
||||
//确认筛选
|
||||
@@ -230,9 +238,9 @@ export default () => {
|
||||
setsearchObj((e) => ({ ...e, orderNo: res.result }))
|
||||
},
|
||||
fail(res) {
|
||||
console.log(res);
|
||||
console.log(res)
|
||||
},
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
@@ -242,68 +250,68 @@ export default () => {
|
||||
const { fetchData: cancelFetch } = mpsaleOrdercancel()
|
||||
//取消订单
|
||||
const cancle = async (e, item) => {
|
||||
e.stopPropagation();
|
||||
e.stopPropagation()
|
||||
Taro.showModal({
|
||||
content: "确定要取消吗?",
|
||||
confirmText: "确认",
|
||||
cancelText: "取消",
|
||||
content: '确定要取消吗?',
|
||||
confirmText: '确认',
|
||||
cancelText: '取消',
|
||||
success: async function (res) {
|
||||
if (res.confirm) {
|
||||
Taro.showLoading({
|
||||
title: '请稍等...',
|
||||
mask: true
|
||||
mask: true,
|
||||
})
|
||||
const res = await cancelFetch({ id: item.id })
|
||||
if (res.msg === 'success') {
|
||||
Taro.showToast({
|
||||
title: '取消成功'
|
||||
title: '取消成功',
|
||||
})
|
||||
Taro.hideLoading()
|
||||
getOrderList()
|
||||
} else {
|
||||
Taro.showToast({
|
||||
title: res.msg,
|
||||
icon: 'error'
|
||||
icon: 'error',
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
})
|
||||
}
|
||||
//再次购买
|
||||
const { fetchData: buyFetch } = mpshoppingCartproductColorlist()
|
||||
const nextBuy = async (e, item) => {
|
||||
e.stopPropagation();
|
||||
e.stopPropagation()
|
||||
Taro.showLoading({
|
||||
title: '请稍等...',
|
||||
mask: true
|
||||
mask: true,
|
||||
})
|
||||
let arr: any = []
|
||||
item.product_list.forEach(item => {
|
||||
item.product_colors.forEach(it => {
|
||||
item.product_list.forEach((item) => {
|
||||
item.product_colors.forEach((it) => {
|
||||
arr.push({
|
||||
length: it.length,
|
||||
roll: it.roll,
|
||||
product_color_id: it.id
|
||||
product_color_id: it.id,
|
||||
})
|
||||
})
|
||||
})
|
||||
let query = {
|
||||
purchaser_id: item.purchaser_id,
|
||||
sale_mode: item.sale_mode,
|
||||
color_list: arr
|
||||
color_list: arr,
|
||||
}
|
||||
const res = await buyFetch(query)
|
||||
if (res.msg === 'success') {
|
||||
Taro.showToast({
|
||||
title: '加入购物车成功!'
|
||||
title: '加入购物车成功!',
|
||||
})
|
||||
Taro.hideLoading()
|
||||
getOrderList()
|
||||
} else {
|
||||
Taro.showToast({
|
||||
title: res.msg,
|
||||
icon: 'error'
|
||||
icon: 'error',
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -314,103 +322,97 @@ export default () => {
|
||||
const [payList, setPayList] = useState<any[]>([
|
||||
{
|
||||
id: 2,
|
||||
iconfont: "icon-xianxiahuizong",
|
||||
name: "预存款",
|
||||
fonts: "可用额度 ",
|
||||
money: "",
|
||||
iconfont: 'icon-xianxiahuizong',
|
||||
name: '预存款',
|
||||
fonts: '可用额度 ',
|
||||
money: '',
|
||||
isCheck: false,
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
iconfont: "icon-xianxiahuizong",
|
||||
name: "货到付款",
|
||||
fonts: "发货后3天内付款",
|
||||
iconfont: 'icon-xianxiahuizong',
|
||||
name: '货到付款',
|
||||
fonts: '发货后3天内付款',
|
||||
isCheck: false,
|
||||
money: "",
|
||||
money: '',
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
iconfont: "icon-xianxiahuizong",
|
||||
name: "x天账期",
|
||||
fonts: "可用额度 ",
|
||||
money: "",
|
||||
iconfont: 'icon-xianxiahuizong',
|
||||
name: 'x天账期',
|
||||
fonts: '可用额度 ',
|
||||
money: '',
|
||||
isCheck: false,
|
||||
},
|
||||
{
|
||||
iconfont: "icon-saomiao",
|
||||
name: "扫码支付",
|
||||
iconfont: 'icon-saomiao',
|
||||
name: '扫码支付',
|
||||
},
|
||||
])
|
||||
const toPay = async (e, item) => {
|
||||
e.stopPropagation();
|
||||
e.stopPropagation()
|
||||
|
||||
setItemObj(item)
|
||||
if (item.status !== 10) {
|
||||
let res = await infoOneFetch({ id: item.should_collect_order_id })
|
||||
payList.map((item) => {
|
||||
if (item.id === 3) {
|
||||
item.name = `${res.data.account_period}天账期`;
|
||||
item.fonts = `可用额度${formatPriceDiv(
|
||||
res.data.account_period_credit_available_line
|
||||
).toLocaleString()}`;
|
||||
item.name = `${res.data.account_period}天账期`
|
||||
item.fonts = `可用额度${formatPriceDiv(res.data.account_period_credit_available_line).toLocaleString()}`
|
||||
}
|
||||
if (item.id === 2) {
|
||||
item.fonts = `可用额度${formatPriceDiv(
|
||||
res.data.advance_deposit_balance
|
||||
).toLocaleString()}`;
|
||||
item.fonts = `可用额度${formatPriceDiv(res.data.advance_deposit_balance).toLocaleString()}`
|
||||
}
|
||||
return item;
|
||||
});
|
||||
return item
|
||||
})
|
||||
setPayList([...payList])
|
||||
if (item.is_shipper_picks_up) {
|
||||
const obj = payList.filter((item) => {
|
||||
return item.id === 6;
|
||||
});
|
||||
console.log(obj, "456456");
|
||||
return item.id === 6
|
||||
})
|
||||
console.log(obj, '456456')
|
||||
if (obj.length === 0) {
|
||||
payList.unshift({
|
||||
id: 6,
|
||||
iconfont: "icon-xianxiahuizong",
|
||||
name: "货主自提",
|
||||
fonts: "",
|
||||
money: "",
|
||||
iconfont: 'icon-xianxiahuizong',
|
||||
name: '货主自提',
|
||||
fonts: '',
|
||||
money: '',
|
||||
isCheck: false,
|
||||
});
|
||||
})
|
||||
setPayList([...payList])
|
||||
}
|
||||
}
|
||||
} else {
|
||||
let res = await infoTwoFetch({ id: item.pre_collect_order_id })
|
||||
const arr: any = [];
|
||||
const arr: any = []
|
||||
arr.push(
|
||||
{
|
||||
id: 2,
|
||||
iconfont: "icon-xianxiahuizong",
|
||||
name: "预存款",
|
||||
fonts: `可用额度${formatPriceDiv(
|
||||
res.data.advance_deposit_balance
|
||||
).toLocaleString()}`,
|
||||
money: "",
|
||||
iconfont: 'icon-xianxiahuizong',
|
||||
name: '预存款',
|
||||
fonts: `可用额度${formatPriceDiv(res.data.advance_deposit_balance).toLocaleString()}`,
|
||||
money: '',
|
||||
isCheck: false,
|
||||
},
|
||||
{
|
||||
iconfont: "icon-saomiao",
|
||||
name: "扫码支付",
|
||||
}
|
||||
);
|
||||
iconfont: 'icon-saomiao',
|
||||
name: '扫码支付',
|
||||
},
|
||||
)
|
||||
if (item.is_shipper_picks_up) {
|
||||
const obj = arr.filter((item) => {
|
||||
return item.id === 6;
|
||||
});
|
||||
return item.id === 6
|
||||
})
|
||||
if (obj.length === 0) {
|
||||
arr.unshift({
|
||||
id: 6,
|
||||
iconfont: "icon-xianxiahuizong",
|
||||
name: "货主自提",
|
||||
fonts: "",
|
||||
money: "",
|
||||
iconfont: 'icon-xianxiahuizong',
|
||||
name: '货主自提',
|
||||
fonts: '',
|
||||
money: '',
|
||||
isCheck: false,
|
||||
});
|
||||
})
|
||||
}
|
||||
}
|
||||
setPayList([...arr])
|
||||
@@ -421,8 +423,10 @@ export default () => {
|
||||
|
||||
//选择支付方式
|
||||
const clickItem = (item) => {
|
||||
if (item.name === '扫码支付') { handScanpay() }
|
||||
payList.map(it => {
|
||||
if (item.name === '扫码支付') {
|
||||
handScanpay()
|
||||
}
|
||||
payList.map((it) => {
|
||||
if (item.id === it.id) {
|
||||
it.checked = true
|
||||
} else {
|
||||
@@ -433,14 +437,13 @@ export default () => {
|
||||
setPayList([...payList])
|
||||
}
|
||||
|
||||
|
||||
//扫码支付
|
||||
const [showSide, setShowSide] = useState(true)
|
||||
const [title, setTitle] = useState('')
|
||||
const [picUrl, setPicUrl] = useState('')
|
||||
const { fetchData: payFetch } = GetPayCode()
|
||||
const handScanpay = async () => {
|
||||
const list: any = [];
|
||||
const list: any = []
|
||||
itemObj.product_list.forEach((item) => {
|
||||
item.product_colors.forEach((it) => {
|
||||
list.push({
|
||||
@@ -451,18 +454,15 @@ export default () => {
|
||||
num: it.roll.toString(),
|
||||
weight: formatWeightDiv(it.actual_weight).toString(),
|
||||
sale_price: (it.sale_price / 100).toString(),
|
||||
total_price:
|
||||
it.actual_amount !== 0
|
||||
? (it.actual_amount / 100).toString()
|
||||
: (it.estimate_amount / 100).toString(),
|
||||
total_price: it.actual_amount !== 0 ? (it.actual_amount / 100).toString() : (it.estimate_amount / 100).toString(),
|
||||
length: (it.length / 100).toString(),
|
||||
weight_error: formatWeightDiv(it.weight_error).toString(),
|
||||
});
|
||||
});
|
||||
});
|
||||
})
|
||||
})
|
||||
})
|
||||
const query = {
|
||||
list: list,
|
||||
title: "面料销售电子确认单",
|
||||
title: '面料销售电子确认单',
|
||||
show_qrcode: true,
|
||||
show_barcode: true,
|
||||
show_wait_pay_amount: true,
|
||||
@@ -482,14 +482,10 @@ export default () => {
|
||||
client: itemObj.purchaser_name,
|
||||
phone: itemObj.target_user_phone,
|
||||
order_total_length: (itemObj.total_number / 100).toString(),
|
||||
order_total_price: (
|
||||
itemObj.bill_total_sale_price / 100
|
||||
).toString(),
|
||||
total_weight_error_discount: (
|
||||
itemObj.total_weight_error_discount / 100
|
||||
).toString(),
|
||||
order_total_price: (itemObj.bill_total_sale_price / 100).toString(),
|
||||
total_weight_error_discount: (itemObj.total_weight_error_discount / 100).toString(),
|
||||
order_total_num: itemObj.total_number.toString(),
|
||||
qrcode: "",
|
||||
qrcode: '',
|
||||
order_total_weight: (itemObj.total_weight / 1000).toString(),
|
||||
estimate_amount: (itemObj.estimate_amount / 100).toString(),
|
||||
total_sale_price: (itemObj.total_sale_price / 100).toString(),
|
||||
@@ -497,10 +493,8 @@ export default () => {
|
||||
show_total_weight_error_discount: true,
|
||||
actual_amount: (itemObj.payment_amount / 100).toString(),
|
||||
wait_pay_amount: (itemObj.wait_pay_amount / 100).toString(),
|
||||
order_total_weight_error: (
|
||||
itemObj.total_weight_error / 1000
|
||||
).toString(),
|
||||
};
|
||||
order_total_weight_error: (itemObj.total_weight_error / 1000).toString(),
|
||||
}
|
||||
const res = await payFetch(query)
|
||||
if (res.data) {
|
||||
console.log(res.data.base64)
|
||||
@@ -510,38 +504,40 @@ export default () => {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//确认交易
|
||||
const { fetchData: payOneFetch } = orderPaymentorderPaymentSubmission()
|
||||
const { fetchData: payTwoFetch } = orderPaymentpreCollectOrderorderPaymentSubmission()
|
||||
const handsurePay = (obj) => {
|
||||
let arr: any = []
|
||||
// if (obj.status !== 10) {
|
||||
arr = payList.filter(item => {
|
||||
arr = payList.filter((item) => {
|
||||
return item.checked
|
||||
})
|
||||
if (!arr.length) {
|
||||
Taro.showToast({
|
||||
title: '请选择后再提交',
|
||||
icon: 'error'
|
||||
icon: 'error',
|
||||
})
|
||||
return false
|
||||
}
|
||||
|
||||
Taro.showModal({
|
||||
content: "确定交易吗?",
|
||||
confirmText: "确认",
|
||||
cancelText: "取消",
|
||||
content: '确定交易吗?',
|
||||
confirmText: '确认',
|
||||
cancelText: '取消',
|
||||
success: async function (res) {
|
||||
if (res.confirm) {
|
||||
Taro.showLoading({
|
||||
title: '请稍等...',
|
||||
mask: true
|
||||
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) })
|
||||
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) })
|
||||
if (restult?.msg === 'success') {
|
||||
Taro.showToast({
|
||||
title: '交易成功'
|
||||
title: '交易成功',
|
||||
})
|
||||
Taro.hideLoading()
|
||||
setShowPay(false)
|
||||
@@ -549,12 +545,11 @@ export default () => {
|
||||
} else {
|
||||
Taro.showToast({
|
||||
title: restult?.msg,
|
||||
icon: 'error'
|
||||
icon: 'error',
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
// }
|
||||
@@ -566,14 +561,14 @@ export default () => {
|
||||
return (
|
||||
<View>
|
||||
<View style={{ background: '#FFFFFF', paddingLeft: '20rpx', paddingBottom: '20rpx', position: 'sticky', top: '0', zIndex: '99' }}>
|
||||
<Search placeholder='搜索商品/名称/颜色/订单号' showBtn={false} changeOnSearch={getSearchData} debounceTime={300} >
|
||||
<Search placeholder='搜索商品/名称/颜色/订单号' showBtn={false} changeOnSearch={getSearchData} debounceTime={300}>
|
||||
<View className={styles.flexBox} onClick={() => showSelctPopup()}>
|
||||
<View className={classnames('iconfont', 'icon-shaixuan', !isDisabled ? styles.icon_shaixuan : styles.activeshaixuan)}></View>
|
||||
<View className={classnames(isDisabled ? styles.shaixuan : styles.activeshai)}>筛选</View>
|
||||
</View>
|
||||
</Search>
|
||||
</View>
|
||||
<View style={{ background: '#FFFFFF', }}>
|
||||
<View style={{ background: '#FFFFFF' }}>
|
||||
<OrderStatusList list={statusList} onSelect={changeStatus} defaultId={-1} />
|
||||
</View>
|
||||
<View className={styles.order_list}>
|
||||
@@ -591,8 +586,7 @@ export default () => {
|
||||
key={index}
|
||||
cancle={(e, item) => cancle(e, item)}
|
||||
nextBuy={(e, item) => nextBuy(e, item)}
|
||||
toPay={(e, item) => toPay(e, item)}
|
||||
></ItemList>
|
||||
toPay={(e, item) => toPay(e, item)}></ItemList>
|
||||
</View>
|
||||
)
|
||||
})}
|
||||
@@ -620,41 +614,76 @@ export default () => {
|
||||
<View className={styles.secondBox}>
|
||||
<View className={styles.secondTopfont}>订单单号</View>
|
||||
<View className={styles.inputBox}>
|
||||
<Input onInput={(e) => { handInput(e) }} placeholderStyle='color:#000000; font-size:26rpx' className={styles.orderInput} value={searchObj.orderNo} placeholder={'请输入或扫描条形码'}></Input>
|
||||
<View className={classnames('iconfont', 'icon-saomiao', styles.saomiao)} onClick={() => { handScan() }}></View>
|
||||
<Input
|
||||
onInput={(e) => {
|
||||
handInput(e)
|
||||
}}
|
||||
placeholderStyle='color:#000000; font-size:26rpx'
|
||||
className={styles.orderInput}
|
||||
value={searchObj.orderNo}
|
||||
placeholder={'请输入或扫描条形码'}></Input>
|
||||
<View
|
||||
className={classnames('iconfont', 'icon-saomiao', styles.saomiao)}
|
||||
onClick={() => {
|
||||
handScan()
|
||||
}}></View>
|
||||
</View>
|
||||
</View>
|
||||
<View className={styles.thirdBox}>
|
||||
<View className={styles.thirdTopfont}>订单类型</View>
|
||||
<View className={styles.flexModebox}>
|
||||
{
|
||||
modeList.map((item, index) => {
|
||||
return (
|
||||
<View onClick={() => { handCheckMode(item) }} className={classnames(item.checked ? styles.activemodeBox : styles.modeBox)} key={index}>{item.name}</View>
|
||||
)
|
||||
})
|
||||
}
|
||||
{modeList.map((item, index) => {
|
||||
return (
|
||||
<View
|
||||
onClick={() => {
|
||||
handCheckMode(item)
|
||||
}}
|
||||
className={classnames(item.checked ? styles.activemodeBox : styles.modeBox)}
|
||||
key={index}>
|
||||
{item.name}
|
||||
</View>
|
||||
)
|
||||
})}
|
||||
</View>
|
||||
</View>
|
||||
<View className={styles.thirdBox}>
|
||||
<View className={styles.thirdTopfont}>发货方式</View>
|
||||
<View className={styles.flexModebox}>
|
||||
{
|
||||
deliveryList.map((item, index) => {
|
||||
return (
|
||||
<View onClick={() => { handCheckDelivery(item) }} className={classnames(item.checked ? styles.activemodeBox : styles.modeBox)} key={index}>{item.name}</View>
|
||||
)
|
||||
})
|
||||
}
|
||||
{deliveryList.map((item, index) => {
|
||||
return (
|
||||
<View
|
||||
onClick={() => {
|
||||
handCheckDelivery(item)
|
||||
}}
|
||||
className={classnames(item.checked ? styles.activemodeBox : styles.modeBox)}
|
||||
key={index}>
|
||||
{item.name}
|
||||
</View>
|
||||
)
|
||||
})}
|
||||
</View>
|
||||
</View>
|
||||
<View>{isDisabled}</View>
|
||||
<View style={{ height: '160rpx' }}></View>
|
||||
|
||||
<View className={styles.bottomBox}>
|
||||
|
||||
<Button className={styles.resetBox} onClick={() => { handReset() }}> 重置</Button >
|
||||
<Button className={classnames(isDisabled ? styles.button : styles.activeButton)} disabled={isDisabled} onClick={() => { handSure?.() }}> 确认</Button >
|
||||
<Button
|
||||
className={styles.resetBox}
|
||||
onClick={() => {
|
||||
handReset()
|
||||
}}>
|
||||
{' '}
|
||||
重置
|
||||
</Button>
|
||||
<Button
|
||||
className={classnames(isDisabled ? styles.button : styles.activeButton)}
|
||||
disabled={isDisabled}
|
||||
onClick={() => {
|
||||
handSure?.()
|
||||
}}>
|
||||
{' '}
|
||||
确认
|
||||
</Button>
|
||||
</View>
|
||||
{/* <View className={styles.areaBox}></View> */}
|
||||
</View>
|
||||
@@ -668,8 +697,7 @@ export default () => {
|
||||
handsurePay={(obj) => handsurePay(obj)}
|
||||
showSide={showSide}
|
||||
title={title}
|
||||
picUrl={picUrl}
|
||||
></PayPopup>
|
||||
</View >
|
||||
picUrl={picUrl}></PayPopup>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user