|
|
@@ -2,6 +2,8 @@ import { message, Tabs } from 'antd'
|
|
|
import React, { useEffect, useState, useRef } from 'react'
|
|
|
import consts from '@/consts'
|
|
|
import { apiAddService } from '@/services/customer'
|
|
|
+import LocksDetail from '@/pages/Product/Lock/LockStore/components/LocksDetail'
|
|
|
+import { useModal } from '@/components/Modal'
|
|
|
import AddRecord from './AddRecord'
|
|
|
import { useDispatch } from 'dva'
|
|
|
import ProTable from '@ant-design/pro-table'
|
|
|
@@ -9,15 +11,37 @@ import ProTable from '@ant-design/pro-table'
|
|
|
const ContanctTabList = ({ clientId, software }) => {
|
|
|
// console.log(clientId)
|
|
|
const dispatch = useDispatch()
|
|
|
+ const { toggleDrawer, setDrawerProps } = useModal()
|
|
|
const [state, setState] = useState({
|
|
|
params: {},
|
|
|
visible: false
|
|
|
})
|
|
|
const tRef = useRef()
|
|
|
+ // 展示软件锁drawer
|
|
|
+ const showLongleDrawer = id => {
|
|
|
+ toggleDrawer()
|
|
|
+ setDrawerProps({
|
|
|
+ closable: true,
|
|
|
+ onClose: () => toggleDrawer(),
|
|
|
+ bodyStyle: {
|
|
|
+ height: '100vh',
|
|
|
+ overflowY: 'hidden'
|
|
|
+ },
|
|
|
+ children: <LocksDetail dataId={id} orderIds={state.orderIds} />
|
|
|
+ })
|
|
|
+ toggleDrawer()
|
|
|
+ }
|
|
|
const columns = [
|
|
|
{
|
|
|
title: '锁号',
|
|
|
- dataIndex: 'keyNum'
|
|
|
+ dataIndex: 'keyNum',
|
|
|
+ render: (clientName, record) => (
|
|
|
+ <span
|
|
|
+ onClick={() => showLongleDrawer(record.id)}
|
|
|
+ className="text-primary cursor-pointer hover:text-[#967bbd]">
|
|
|
+ {clientName}
|
|
|
+ </span>
|
|
|
+ )
|
|
|
},
|
|
|
{
|
|
|
title: '产品',
|