|
@@ -6,24 +6,11 @@ import { apiSoftwareAddLonglelog, apiDelLonglelog } from '@/services/product'
|
|
|
import { ProductLabel } from '@/pages/Product/Lock/LockStore'
|
|
import { ProductLabel } from '@/pages/Product/Lock/LockStore'
|
|
|
import LockModal, { lockTypeEnum } from './LockModal'
|
|
import LockModal, { lockTypeEnum } from './LockModal'
|
|
|
import ClientDetail from '@/pages/Customer/Client/components/ClientDetail'
|
|
import ClientDetail from '@/pages/Customer/Client/components/ClientDetail'
|
|
|
|
|
+import LocksDetail from '@/pages/Product/Lock/LockStore/components/LocksDetail'
|
|
|
import { servicelogEnum, showProductsStatus, showNewLongleStatus, showMarkStatus } from './consts'
|
|
import { servicelogEnum, showProductsStatus, showNewLongleStatus, showMarkStatus } from './consts'
|
|
|
import { useDispatch, useAccess } from 'umi'
|
|
import { useDispatch, useAccess } from 'umi'
|
|
|
import { useModal } from '@/components/Modal'
|
|
import { useModal } from '@/components/Modal'
|
|
|
|
|
|
|
|
-const RenderLongleCon = ({ longleService }) => {
|
|
|
|
|
- return (
|
|
|
|
|
- <>
|
|
|
|
|
- {showProductsStatus.includes(longleService.status) ? (
|
|
|
|
|
- <ProductLabel data={longleService.product} />
|
|
|
|
|
- ) : null}
|
|
|
|
|
- {showNewLongleStatus.includes(longleService.status) ? (
|
|
|
|
|
- <span>{longleService.NewKeyNum}</span>
|
|
|
|
|
- ) : null}
|
|
|
|
|
- {showMarkStatus.includes(longleService.status) ? <span>{longleService.mark}</span> : null}
|
|
|
|
|
- </>
|
|
|
|
|
- )
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
const LockTabList = props => {
|
|
const LockTabList = props => {
|
|
|
const {
|
|
const {
|
|
|
// longleLog,
|
|
// longleLog,
|
|
@@ -93,6 +80,56 @@ const LockTabList = props => {
|
|
|
toggleDrawer()
|
|
toggleDrawer()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // 点击新软件锁详情
|
|
|
|
|
+ const showLongleClick = newLongleId => {
|
|
|
|
|
+ console.log(newLongleId)
|
|
|
|
|
+ toggleDrawer()
|
|
|
|
|
+ setDrawerProps({
|
|
|
|
|
+ zIndex: 1001,
|
|
|
|
|
+ closable: true,
|
|
|
|
|
+ onClose: () => toggleDrawer(),
|
|
|
|
|
+ bodyStyle: {
|
|
|
|
|
+ height: '100vh',
|
|
|
|
|
+ overflowY: 'hidden'
|
|
|
|
|
+ },
|
|
|
|
|
+ children: <LocksDetail dataId={newLongleId} />
|
|
|
|
|
+ })
|
|
|
|
|
+ toggleDrawer(true)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ const RenderLongleCon = ({ longleService }) => {
|
|
|
|
|
+ const { NewKeyNum } = longleService
|
|
|
|
|
+ if (!NewKeyNum) return null
|
|
|
|
|
+ let newLongleService
|
|
|
|
|
+ if (!Array.isArray(NewKeyNum)) {
|
|
|
|
|
+ newLongleService = NewKeyNum.split('->')
|
|
|
|
|
+ }
|
|
|
|
|
+ return (
|
|
|
|
|
+ <>
|
|
|
|
|
+ {showProductsStatus.includes(longleService.status) ? (
|
|
|
|
|
+ <ProductLabel data={longleService.product} />
|
|
|
|
|
+ ) : null}
|
|
|
|
|
+ {showNewLongleStatus.includes(longleService.status) ? (
|
|
|
|
|
+ <>
|
|
|
|
|
+ {newLongleService[1] ? (
|
|
|
|
|
+ <>
|
|
|
|
|
+ {newLongleService[0]} {'->'}{' '}
|
|
|
|
|
+ <span
|
|
|
|
|
+ className="textPurple text-hex-967bbd cursor-pointer"
|
|
|
|
|
+ onClick={() => showLongleClick(longleService.newLongleId)}>
|
|
|
|
|
+ {newLongleService[1]}
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </>
|
|
|
|
|
+ ) : (
|
|
|
|
|
+ <>{newLongleService[0]}</>
|
|
|
|
|
+ )}
|
|
|
|
|
+ </>
|
|
|
|
|
+ ) : null}
|
|
|
|
|
+ {showMarkStatus.includes(longleService.status) ? <span>{longleService.mark}</span> : null}
|
|
|
|
|
+ </>
|
|
|
|
|
+ )
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// 删除软件锁日志
|
|
// 删除软件锁日志
|
|
|
const delLonglelog = async id => {
|
|
const delLonglelog = async id => {
|
|
|
const { code = -1 } = await apiDelLonglelog({
|
|
const { code = -1 } = await apiDelLonglelog({
|