|
@@ -30,17 +30,7 @@ const placeholderEnum = {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const OpreateLock = props => {
|
|
const OpreateLock = props => {
|
|
|
- const {
|
|
|
|
|
- onConfirm,
|
|
|
|
|
- onCancel,
|
|
|
|
|
- loading,
|
|
|
|
|
- type,
|
|
|
|
|
- longleId,
|
|
|
|
|
- keyNum,
|
|
|
|
|
- prodList,
|
|
|
|
|
- upgradeProduct,
|
|
|
|
|
- ...resetModalProps
|
|
|
|
|
- } = props
|
|
|
|
|
|
|
+ const { onConfirm, onCancel, loading, type, longleId, keyNum, prodList, upgradeProduct, ...resetModalProps } = props
|
|
|
const [form] = Form.useForm()
|
|
const [form] = Form.useForm()
|
|
|
const dispatch = useDispatch()
|
|
const dispatch = useDispatch()
|
|
|
const scrollRef = useRef()
|
|
const scrollRef = useRef()
|
|
@@ -226,10 +216,7 @@ const OpreateLock = props => {
|
|
|
|
|
|
|
|
const handleListScroll = () => {
|
|
const handleListScroll = () => {
|
|
|
// 未滚动到底部
|
|
// 未滚动到底部
|
|
|
- if (
|
|
|
|
|
- scrollRef.current.scrollHeight - scrollRef.current.clientHeight <=
|
|
|
|
|
- scrollRef.current.scrollTop
|
|
|
|
|
- ) {
|
|
|
|
|
|
|
+ if (scrollRef.current.scrollHeight - scrollRef.current.clientHeight <= scrollRef.current.scrollTop) {
|
|
|
// 已到底部
|
|
// 已到底部
|
|
|
if (state.current * state.pageSize > state.total) {
|
|
if (state.current * state.pageSize > state.total) {
|
|
|
setState({ ...state, noMore: true })
|
|
setState({ ...state, noMore: true })
|
|
@@ -271,8 +258,7 @@ const OpreateLock = props => {
|
|
|
</Button>
|
|
</Button>
|
|
|
</div>
|
|
</div>
|
|
|
)
|
|
)
|
|
|
- }
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ }>
|
|
|
{type === lockTypeEnum.SALE ? (
|
|
{type === lockTypeEnum.SALE ? (
|
|
|
<div className="text-center mb-6">
|
|
<div className="text-center mb-6">
|
|
|
<Radio.Group value={state.sellStatus} buttonStyle="solid" onChange={checkGroupOnChange}>
|
|
<Radio.Group value={state.sellStatus} buttonStyle="solid" onChange={checkGroupOnChange}>
|
|
@@ -283,13 +269,8 @@ const OpreateLock = props => {
|
|
|
</div>
|
|
</div>
|
|
|
) : null}
|
|
) : null}
|
|
|
{type === lockTypeEnum.CHANGE || type === lockTypeEnum.SALE ? (
|
|
{type === lockTypeEnum.CHANGE || type === lockTypeEnum.SALE ? (
|
|
|
- <div
|
|
|
|
|
- className={styles.modalContainer}
|
|
|
|
|
- ref={scrollRef}
|
|
|
|
|
- onScroll={handleListScroll}
|
|
|
|
|
- style={{ paddingBottom: 0 }}
|
|
|
|
|
- >
|
|
|
|
|
- <div className={styles.modalContent}>
|
|
|
|
|
|
|
+ <div className={styles.modalContainer} style={{ paddingBottom: 0 }}>
|
|
|
|
|
+ <div className={styles.modalContent} ref={scrollRef} onScroll={handleListScroll}>
|
|
|
<Spin spinning={state.loading}>
|
|
<Spin spinning={state.loading}>
|
|
|
{type === lockTypeEnum.SALE &&
|
|
{type === lockTypeEnum.SALE &&
|
|
|
state.client.map((item, index) => (
|
|
state.client.map((item, index) => (
|
|
@@ -303,8 +284,7 @@ const OpreateLock = props => {
|
|
|
title="确认选择ta"
|
|
title="确认选择ta"
|
|
|
onConfirm={() => connectClient(item.id)}
|
|
onConfirm={() => connectClient(item.id)}
|
|
|
okText="确认"
|
|
okText="确认"
|
|
|
- cancelText="取消"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ cancelText="取消">
|
|
|
<Button type="primary" size="small">
|
|
<Button type="primary" size="small">
|
|
|
选择ta
|
|
选择ta
|
|
|
</Button>
|
|
</Button>
|
|
@@ -322,8 +302,7 @@ const OpreateLock = props => {
|
|
|
title="确认选择ta"
|
|
title="确认选择ta"
|
|
|
onConfirm={() => connectLongle(item.id)}
|
|
onConfirm={() => connectLongle(item.id)}
|
|
|
okText="确认"
|
|
okText="确认"
|
|
|
- cancelText="取消"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ cancelText="取消">
|
|
|
<Button type="primary" size="small">
|
|
<Button type="primary" size="small">
|
|
|
更换
|
|
更换
|
|
|
</Button>
|
|
</Button>
|
|
@@ -356,8 +335,7 @@ const OpreateLock = props => {
|
|
|
return Promise.resolve(value)
|
|
return Promise.resolve(value)
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
- ]}
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ ]}>
|
|
|
<Select
|
|
<Select
|
|
|
placeholder="请选择产品"
|
|
placeholder="请选择产品"
|
|
|
onDropdownVisibleChange={async e => {
|
|
onDropdownVisibleChange={async e => {
|