|
|
@@ -1,27 +1,49 @@
|
|
|
import React from 'react'
|
|
|
-import { Row, Col, Divider } from 'antd'
|
|
|
+import { Row, Col, Divider, Alert } from 'antd'
|
|
|
import { ProductLabel } from '@/pages/Product/Lock/LockStore'
|
|
|
import ChangeClient from '@/pages/Product/Lock/LockStore/components/ChangeClient'
|
|
|
import CopyAuthorizeStr from '../CopyAuthorizeStr'
|
|
|
import DownUpdateFile from '../DownUpdateFile'
|
|
|
import { dayjsFormat } from '@/utils/utils'
|
|
|
-import ChangeCompanyInput, {
|
|
|
- ChangeCompMap
|
|
|
-} from '@/pages/Customer/Company/components/ChangeCompany'
|
|
|
+import ChangeCompanyInput, { ChangeCompMap } from '@/pages/Customer/Company/components/ChangeCompany'
|
|
|
|
|
|
const LockForm = props => {
|
|
|
- const { longle, actionPayload } = props
|
|
|
+ const {
|
|
|
+ longle: {
|
|
|
+ client,
|
|
|
+ id,
|
|
|
+ clientId,
|
|
|
+ customerId,
|
|
|
+ customerName,
|
|
|
+ keyNum,
|
|
|
+ staffName,
|
|
|
+ makeDay,
|
|
|
+ product,
|
|
|
+ allotedTime,
|
|
|
+ stockStatus,
|
|
|
+ stockTime,
|
|
|
+ sellStatus,
|
|
|
+ sellTime,
|
|
|
+ preserveStatus,
|
|
|
+ preserveTime,
|
|
|
+ responsible,
|
|
|
+ authorizeStr,
|
|
|
+ updateFile,
|
|
|
+ clientCustomerId
|
|
|
+ },
|
|
|
+ actionPayload
|
|
|
+ } = props
|
|
|
const changeClientInputData = {
|
|
|
- clientName: longle.client,
|
|
|
- longleId: longle.id,
|
|
|
- clientId: longle.clientId
|
|
|
+ clientName: client,
|
|
|
+ longleId: id,
|
|
|
+ clientId: clientId
|
|
|
}
|
|
|
|
|
|
const changeCompanyInputData = {
|
|
|
- customerId: longle.customerId,
|
|
|
- dataId: longle.id,
|
|
|
- customerName: longle.customerName,
|
|
|
- targetName: longle.keyNum,
|
|
|
+ customerId: customerId,
|
|
|
+ dataId: id,
|
|
|
+ customerName: customerName,
|
|
|
+ targetName: keyNum,
|
|
|
title: '软件锁'
|
|
|
}
|
|
|
|
|
|
@@ -52,70 +74,70 @@ const LockForm = props => {
|
|
|
<div>
|
|
|
<Row>
|
|
|
<Col span={16}>
|
|
|
- <h2 className="text-2xl pb-4">{longle.keyNum}</h2>
|
|
|
+ <h2 className="text-2xl pb-4">{keyNum}</h2>
|
|
|
</Col>
|
|
|
<Col span={8} className="text-right text-gray-500">
|
|
|
- {longle.staffName} 创建于 {longle.makeDay}
|
|
|
+ {staffName} 创建于 {makeDay}
|
|
|
</Col>
|
|
|
</Row>
|
|
|
<Row>
|
|
|
<Divider style={{ margin: '12px 0' }} />
|
|
|
<Col span={6}>锁号</Col>
|
|
|
- <Col span={18}>{longle.keyNum}</Col>
|
|
|
+ <Col span={18}>{keyNum}</Col>
|
|
|
<Divider style={{ margin: '12px 0' }} />
|
|
|
<Col span={6}>产品</Col>
|
|
|
<Col span={18}>
|
|
|
- <ProductLabel data={longle.product} />
|
|
|
+ <ProductLabel data={product} />
|
|
|
</Col>
|
|
|
<Divider style={{ margin: '12px 0' }} />
|
|
|
<Col span={6}>期限</Col>
|
|
|
- <Col span={18}>{longle.allotedTime}</Col>
|
|
|
+ <Col span={18}>{allotedTime}</Col>
|
|
|
</Row>
|
|
|
<Row>
|
|
|
<Divider style={{ margin: '12px 0' }} />
|
|
|
<Col span={12}>
|
|
|
<Row>
|
|
|
<Col span={9}>出库状态</Col>
|
|
|
- <Col span={13}>{longleStockStatusNum[longle.stockStatus]}</Col>
|
|
|
+ <Col span={13}>{longleStockStatusNum[stockStatus]}</Col>
|
|
|
</Row>
|
|
|
</Col>
|
|
|
<Col span={12}>
|
|
|
<Row>
|
|
|
<Col span={9}>出库时间</Col>
|
|
|
- <Col span={13}>{dayjsFormat(longle.stockTime, 'YYYY-MM-DD')}</Col>
|
|
|
+ <Col span={13}>{dayjsFormat(stockTime, 'YYYY-MM-DD')}</Col>
|
|
|
</Row>
|
|
|
</Col>
|
|
|
<Divider style={{ margin: '12px 0' }} />
|
|
|
<Col span={12}>
|
|
|
<Row>
|
|
|
<Col span={9}>销售状态</Col>
|
|
|
- <Col span={13}>{longleSellStatusNum[longle.sellStatus]}</Col>
|
|
|
+ <Col span={13}>{longleSellStatusNum[sellStatus]}</Col>
|
|
|
</Row>
|
|
|
</Col>
|
|
|
<Col span={12}>
|
|
|
<Row>
|
|
|
<Col span={9}>销售时间</Col>
|
|
|
- <Col span={13}>{dayjsFormat(longle.sellTime, 'YYYY-MM-DD')}</Col>
|
|
|
+ <Col span={13}>{dayjsFormat(sellTime, 'YYYY-MM-DD')}</Col>
|
|
|
</Row>
|
|
|
</Col>
|
|
|
<Divider style={{ margin: '12px 0' }} />
|
|
|
<Col span={12}>
|
|
|
<Row>
|
|
|
<Col span={9}>维护状态</Col>
|
|
|
- <Col span={13}>{longlePreserveStatusNum[longle.preserveStatus]}</Col>
|
|
|
+ <Col span={13}>{longlePreserveStatusNum[preserveStatus]}</Col>
|
|
|
</Row>
|
|
|
</Col>
|
|
|
<Col span={12}>
|
|
|
<Row>
|
|
|
<Col span={9}>维护时间</Col>
|
|
|
- <Col span={13}>{dayjsFormat(longle.preserveTime, 'YYYY-MM-DD')}</Col>
|
|
|
+ <Col span={13}>{dayjsFormat(preserveTime, 'YYYY-MM-DD')}</Col>
|
|
|
</Row>
|
|
|
</Col>
|
|
|
{/* <Col span={6}>使用状态</Col> */}
|
|
|
{/* <Col span={18}>{longleStatusNum[longle.status]}</Col> */}
|
|
|
<Divider style={{ margin: '12px 0' }} />
|
|
|
<Col span={6}>负责人</Col>
|
|
|
- <Col span={18}>{longle.responsible}</Col>
|
|
|
+ <Col span={18}>{responsible}</Col>
|
|
|
<Divider style={{ margin: '12px 0' }} />
|
|
|
<Col span={6}>单位名称</Col>
|
|
|
<Col span={18}>
|
|
|
@@ -130,11 +152,16 @@ const LockForm = props => {
|
|
|
<Col span={6}>客户</Col>
|
|
|
<Col span={18}>
|
|
|
<ChangeClient actionPayload={actionPayload} dataSource={changeClientInputData} />
|
|
|
+ {clientCustomerId !== customerId && clientCustomerId !== 0 ? (
|
|
|
+ <div className="mt-2">
|
|
|
+ <Alert message="该客户不在软件锁绑定的单位下。" type="warning" showIcon />
|
|
|
+ </div>
|
|
|
+ ) : null}
|
|
|
</Col>
|
|
|
<Divider style={{ margin: '12px 0' }} />
|
|
|
<Col span={6}>注册码</Col>
|
|
|
<Col span={18}>
|
|
|
- <CopyAuthorizeStr authorizeStr={longle.authorizeStr} />
|
|
|
+ <CopyAuthorizeStr authorizeStr={authorizeStr} />
|
|
|
<small>
|
|
|
使用方法:复制以上注册码,打开软件帮助菜单/产品注册/下一步/下一步/选择"手工输入注册码"。将注册码不分段不空格复制粘贴到"注册码"栏内确定即可。
|
|
|
</small>
|
|
|
@@ -143,7 +170,7 @@ const LockForm = props => {
|
|
|
<Divider style={{ margin: '12px 0' }} />
|
|
|
<Col span={6}>升级文件</Col>
|
|
|
<Col span={18}>
|
|
|
- <DownUpdateFile updateFile={longle.updateFile} />
|
|
|
+ <DownUpdateFile updateFile={updateFile} />
|
|
|
<small>
|
|
|
使用方法:下载以上升级文件,打开软件帮助菜单/升级加密锁/下一步/下一步/选择“使用升级文件升级”,再点击下一步完成即可。
|
|
|
</small>
|