|
|
@@ -17,7 +17,6 @@ import { useParams } from 'react-router-dom'
|
|
|
import { openLink } from '@/utils/history'
|
|
|
import { FileUpInfoType } from '../data'
|
|
|
import SelectGoods from '../SelectGoods'
|
|
|
-import AddClues from '../AddClues'
|
|
|
|
|
|
type Props = {
|
|
|
// 上传附件的信息(不需要新增藏品的不用传)
|
|
|
@@ -53,9 +52,6 @@ function SonGoodsList({
|
|
|
|
|
|
const [openInfo, setOpenInfo] = useState({} as GoodsType)
|
|
|
|
|
|
- // 打开线索弹窗-查看详情
|
|
|
- const [clueInfo, setClueInfo] = useState({} as GoodsType)
|
|
|
-
|
|
|
const tableLastBtn = useMemo(() => {
|
|
|
return [
|
|
|
{
|
|
|
@@ -165,8 +161,17 @@ function SonGoodsList({
|
|
|
//需要过滤掉已经有id的-不替换数据,没有id的替换数据 因为数据可能已经在另外一个弹窗更新了
|
|
|
const nowIds = snaps.map(v => v.id)
|
|
|
let dataRes = data.map((v, i) => {
|
|
|
- if (nowIds.includes(v.id)) return snaps[i]
|
|
|
- else return v
|
|
|
+ if (nowIds.includes(v.id)) {
|
|
|
+ if (v.id2 && delSnapIdsRef.current.includes(v.id2)) {
|
|
|
+ delSnapIdsRef.current = delSnapIdsRef.current.filter(c => c !== v.id2)
|
|
|
+ }
|
|
|
+ return snaps[i]
|
|
|
+ } else {
|
|
|
+ if (v.id2 && !delSnapIdsRef.current.includes(v.id2)) {
|
|
|
+ delSnapIdsRef.current.push(v.id2)
|
|
|
+ }
|
|
|
+ return v
|
|
|
+ }
|
|
|
})
|
|
|
|
|
|
dataRes.forEach(v => {
|
|
|
@@ -184,18 +189,6 @@ function SonGoodsList({
|
|
|
}}
|
|
|
/>
|
|
|
) : null}
|
|
|
-
|
|
|
- {/* 线索查看详情 */}
|
|
|
- {clueInfo.id ? (
|
|
|
- <AddClues
|
|
|
- info={clueInfo}
|
|
|
- closeFu={() => setClueInfo({} as GoodsType)}
|
|
|
- succFu={() => {}}
|
|
|
- moduleId={0}
|
|
|
- fileUpInfo={{} as FileUpInfoType}
|
|
|
- isLook={true}
|
|
|
- />
|
|
|
- ) : null}
|
|
|
</div>
|
|
|
)
|
|
|
}
|