|
@@ -1,28 +1,32 @@
|
|
-import React, { useCallback, useMemo, useRef, useState } from 'react'
|
|
|
|
|
|
+import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
|
import style from './index.module.scss'
|
|
import style from './index.module.scss'
|
|
-import { pageTitTxtObj } from '@/pages/D_storeManage/D4impStor/D4edit'
|
|
|
|
import { useParams } from 'react-router-dom'
|
|
import { useParams } from 'react-router-dom'
|
|
import X3auditInfo from '@/pages/X_stock/X3auditInfo'
|
|
import X3auditInfo from '@/pages/X_stock/X3auditInfo'
|
|
import { Button, Input, Radio, Select } from 'antd'
|
|
import { Button, Input, Radio, Select } from 'antd'
|
|
import { statusObj } from '@/utils/tableData'
|
|
import { statusObj } from '@/utils/tableData'
|
|
-import ZRichTexts from '@/components/ZRichTexts'
|
|
|
|
-import MyTable from '@/components/MyTable'
|
|
|
|
-import { F1_GOOD_COLUMNS } from '../constants'
|
|
|
|
|
|
+import MyTable, { MyTableMethods } from '@/components/MyTable'
|
|
|
|
+import { F1_GOOD_COLUMNS, F1_SON_TYPE_NAME_OPTS, F1_SON_TYPE_OPTS } from '../constants'
|
|
import ZGaddNow from '@/components/ZGaddNow'
|
|
import ZGaddNow from '@/components/ZGaddNow'
|
|
import MyPopconfirm from '@/components/MyPopconfirm'
|
|
import MyPopconfirm from '@/components/MyPopconfirm'
|
|
import history, { btnFlagFu2, openGoodsInfoFu } from '@/utils/history'
|
|
import history, { btnFlagFu2, openGoodsInfoFu } from '@/utils/history'
|
|
import {
|
|
import {
|
|
- D4_APIdel,
|
|
|
|
- D4_APIgetInfo,
|
|
|
|
- D4_APIrevocation,
|
|
|
|
- D4_APIsaveApply,
|
|
|
|
- D4_APIsaveAudit,
|
|
|
|
- D4_APIsaveCreate,
|
|
|
|
- D4_APIsaveDraft
|
|
|
|
-} from '@/store/action/D4impStor'
|
|
|
|
|
|
+ F1_APIcreate,
|
|
|
|
+ F1_APIdel,
|
|
|
|
+ F1_APIgetInfo,
|
|
|
|
+ F1_APIrevocation,
|
|
|
|
+ F1_APIsaveApply,
|
|
|
|
+ F1_APIsaveAudit,
|
|
|
|
+ F1_APIsaveCreate,
|
|
|
|
+ F1_APIsaveDraft
|
|
|
|
+} from '@/store/action/F1exhibition'
|
|
import { MessageFu } from '@/utils/message'
|
|
import { MessageFu } from '@/utils/message'
|
|
-import { FourTableType } from '@/pages/B_enterTibet/B1collect/type'
|
|
|
|
import { EXbtnFu } from '@/utils/EXBtn'
|
|
import { EXbtnFu } from '@/utils/EXBtn'
|
|
|
|
+import { F1_SON_TYPE_ENUM, F1_SON_TYPE_NAME_ENUM, F1exhibitionItemType } from '../types'
|
|
|
|
+import ZflowTable from '@/components/ZflowTable'
|
|
|
|
+import { pageTitTxtObj } from '@/pages/D_storeManage/D4impStor/D4edit'
|
|
|
|
+import { C1GoodType } from '@/pages/A3_ledger/C1ledger/type'
|
|
|
|
+import { areAllCheckersFilled } from '@/utils/objects'
|
|
|
|
+import dayjs from 'dayjs'
|
|
|
|
|
|
function F1edit() {
|
|
function F1edit() {
|
|
const { key, id } = useParams<any>()
|
|
const { key, id } = useParams<any>()
|
|
@@ -33,15 +37,19 @@ function F1edit() {
|
|
// 审批意见的ref
|
|
// 审批意见的ref
|
|
const ZAuditRef = useRef<any>(null)
|
|
const ZAuditRef = useRef<any>(null)
|
|
// 顶部数据
|
|
// 顶部数据
|
|
- const [topInfo, setTopInfo] = useState({} as FourTableType)
|
|
|
|
- // 富文本的ref
|
|
|
|
- const ZRichTextRef = useRef<any>(null)
|
|
|
|
|
|
+ const [topInfo, setTopInfo] = useState({} as F1exhibitionItemType)
|
|
// 点击新增
|
|
// 点击新增
|
|
const [nowSta, setNowSta] = useState({ key: '', id: '' })
|
|
const [nowSta, setNowSta] = useState({ key: '', id: '' })
|
|
// 申请记录
|
|
// 申请记录
|
|
const [auditsShow, setAuditsShow] = useState(false)
|
|
const [auditsShow, setAuditsShow] = useState(false)
|
|
- // 上传附件的ref
|
|
|
|
- const filesRef = useRef<any>(null)
|
|
|
|
|
|
+ // 藏品清单快照数据
|
|
|
|
+ const [snaps, setSnaps] = useState<C1GoodType[]>([])
|
|
|
|
+ const delSnapIdsRef = useRef<number[]>([])
|
|
|
|
+
|
|
|
|
+ const snapsID2ref = useRef<{ goodsId: number; id: number }[]>([])
|
|
|
|
+
|
|
|
|
+ const pageDisabled = ['3', '4'].includes(key)
|
|
|
|
+ const tableRef = useRef<MyTableMethods | null>(null)
|
|
|
|
|
|
const pageTitTxt = useMemo(() => {
|
|
const pageTitTxt = useMemo(() => {
|
|
return Reflect.get(pageTitTxtObj, key)
|
|
return Reflect.get(pageTitTxtObj, key)
|
|
@@ -56,32 +64,50 @@ function F1edit() {
|
|
<Button size='small' type='text' onClick={() => openGoodsInfoFu(item.id)}>
|
|
<Button size='small' type='text' onClick={() => openGoodsInfoFu(item.id)}>
|
|
查看
|
|
查看
|
|
</Button>
|
|
</Button>
|
|
- {['3', '4'].includes(key) ? null : (
|
|
|
|
|
|
+ {pageDisabled ? null : (
|
|
<MyPopconfirm
|
|
<MyPopconfirm
|
|
txtK='删除'
|
|
txtK='删除'
|
|
- onConfirm={() =>
|
|
|
|
- setTopInfo({
|
|
|
|
- ...topInfo,
|
|
|
|
- goods: topInfo.goods.filter(v => v.id !== item.id)
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
|
|
+ onConfirm={() => setSnaps(snaps.filter(v => v.id !== item.id))}
|
|
/>
|
|
/>
|
|
)}
|
|
)}
|
|
</>
|
|
</>
|
|
)
|
|
)
|
|
}
|
|
}
|
|
]
|
|
]
|
|
- }, [])
|
|
|
|
|
|
+ }, [pageDisabled, snaps])
|
|
|
|
|
|
// 获取详情
|
|
// 获取详情
|
|
const getInfoFu = useCallback(
|
|
const getInfoFu = useCallback(
|
|
- async (id2?: number) => {
|
|
|
|
- const res = await D4_APIgetInfo(id2 || id)
|
|
|
|
|
|
+ async (iid = id) => {
|
|
|
|
+ const res = await F1_APIgetInfo(iid)
|
|
if (res.code === 0) {
|
|
if (res.code === 0) {
|
|
- setTopInfo(res.data)
|
|
|
|
|
|
+ const data = res.data
|
|
|
|
+ setTopInfo(data)
|
|
|
|
+ // 藏品清单快照信息id对比
|
|
|
|
+ const arrTemp: any = []
|
|
|
|
+ const snapsTemp = data.snaps || []
|
|
|
|
+
|
|
|
|
+ snapsTemp.forEach((v: any) => {
|
|
|
|
+ const { cusForm, ...obj } = JSON.parse(v.snap || '{}')
|
|
|
|
+ if (obj.id) obj.id2 = v.id
|
|
|
|
+ if (cusForm) {
|
|
|
|
+ if (cusForm[`${v.goodsId}-lendDate`]) {
|
|
|
|
+ cusForm[`${v.goodsId}-lendDate`] = dayjs(cusForm[`${v.goodsId}-lendDate`])
|
|
|
|
+ }
|
|
|
|
+ if (cusForm[`${v.goodsId}-expectedReturnDate`]) {
|
|
|
|
+ cusForm[`${v.goodsId}-expectedReturnDate`] = dayjs(
|
|
|
|
+ cusForm[`${v.goodsId}-expectedReturnDate`]
|
|
|
|
+ )
|
|
|
|
+ }
|
|
|
|
+ if (cusForm[`${v.goodsId}-returnDate`]) {
|
|
|
|
+ cusForm[`${v.goodsId}-returnDate`] = dayjs(cusForm[`${v.goodsId}-returnDate`])
|
|
|
|
+ }
|
|
|
|
+ tableRef.current?.form.setFieldsValue(cusForm)
|
|
|
|
+ }
|
|
|
|
|
|
- // 设置富文本
|
|
|
|
- ZRichTextRef.current?.ritxtShowFu(JSON.parse(res.data.rtf || '{}'))
|
|
|
|
|
|
+ arrTemp.push(obj)
|
|
|
|
+ })
|
|
|
|
+ setSnaps(arrTemp)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
[id]
|
|
[id]
|
|
@@ -89,10 +115,10 @@ function F1edit() {
|
|
|
|
|
|
// 查看模式点击删除
|
|
// 查看模式点击删除
|
|
const delFu = useCallback(async () => {
|
|
const delFu = useCallback(async () => {
|
|
- const res = await D4_APIdel(id)
|
|
|
|
|
|
+ const res = await F1_APIdel(id)
|
|
if (res.code === 0) {
|
|
if (res.code === 0) {
|
|
MessageFu.success('删除成功')
|
|
MessageFu.success('删除成功')
|
|
- history.push('/impStor')
|
|
|
|
|
|
+ history.push('/exhibiton')
|
|
}
|
|
}
|
|
}, [id])
|
|
}, [id])
|
|
|
|
|
|
@@ -118,28 +144,28 @@ function F1edit() {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- const rtf1 = ZRichTextRef.current?.fatherBtnOkFu() || { flag: true }
|
|
|
|
- // console.log('申请信息富文本', JSON.stringify(rtf1.val || ''))
|
|
|
|
-
|
|
|
|
- // 上传附件
|
|
|
|
- const filesRes = filesRef.current.filesIdRes()
|
|
|
|
|
|
+ const tableValues = tableRef.current?.form.getFieldsValue()
|
|
const obj = {
|
|
const obj = {
|
|
...topInfo,
|
|
...topInfo,
|
|
- fileIds: filesRes.join(','),
|
|
|
|
- rtf: JSON.stringify(rtf1.val || ''),
|
|
|
|
- goodsIds: topInfo.goods.map(v => v.id).join(','),
|
|
|
|
- goods: topInfo.goods.map(v => ({
|
|
|
|
|
|
+ goodsIds: snaps.map(v => v.id).join(','),
|
|
|
|
+ delSnapIds: delSnapIdsRef.current.length ? delSnapIdsRef.current : '',
|
|
|
|
+ snaps: snaps.map(v => ({
|
|
goodsId: v.id,
|
|
goodsId: v.id,
|
|
- siteId: v.siteId
|
|
|
|
|
|
+ id: v.id2 ? v.id2 : null,
|
|
|
|
+ orderId: topInfo.id,
|
|
|
|
+ snap: JSON.stringify({
|
|
|
|
+ ...v,
|
|
|
|
+ cusForm: tableValues
|
|
|
|
+ })
|
|
}))
|
|
}))
|
|
}
|
|
}
|
|
|
|
|
|
const res =
|
|
const res =
|
|
val === '创建'
|
|
val === '创建'
|
|
- ? await D4_APIsaveCreate(obj)
|
|
|
|
|
|
+ ? await F1_APIsaveCreate(obj)
|
|
: val === '提交'
|
|
: val === '提交'
|
|
- ? await D4_APIsaveApply(obj)
|
|
|
|
- : await D4_APIrevocation(id)
|
|
|
|
|
|
+ ? await F1_APIsaveApply(obj)
|
|
|
|
+ : await F1_APIrevocation(id)
|
|
|
|
|
|
if (res.code === 0) {
|
|
if (res.code === 0) {
|
|
if (sollrDom.current) sollrDom.current.scrollTop = 0
|
|
if (sollrDom.current) sollrDom.current.scrollTop = 0
|
|
@@ -147,7 +173,7 @@ function F1edit() {
|
|
getInfoFu()
|
|
getInfoFu()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- [getInfoFu, id, topInfo]
|
|
|
|
|
|
+ [getInfoFu, id, snaps, topInfo]
|
|
)
|
|
)
|
|
|
|
|
|
// 查看模式下的按钮
|
|
// 查看模式下的按钮
|
|
@@ -214,21 +240,27 @@ function F1edit() {
|
|
}, [delFu, lookBtnFu, lookJumpFu, topInfo])
|
|
}, [delFu, lookBtnFu, lookJumpFu, topInfo])
|
|
|
|
|
|
const checkDataFu = useCallback(() => {
|
|
const checkDataFu = useCallback(() => {
|
|
- if (!topInfo.name) {
|
|
|
|
- MessageFu.warning('申请名称不能为空')
|
|
|
|
|
|
+ if (!topInfo.typeName) {
|
|
|
|
+ MessageFu.warning('展览名称不能为空')
|
|
return true
|
|
return true
|
|
}
|
|
}
|
|
- if (!topInfo.sonTypeName) {
|
|
|
|
- MessageFu.warning('请选择业务类型')
|
|
|
|
|
|
+ if (!topInfo.sonUnit) {
|
|
|
|
+ MessageFu.warning('借展部门不能为空')
|
|
return true
|
|
return true
|
|
}
|
|
}
|
|
- if (!topInfo.storageId) {
|
|
|
|
- MessageFu.warning('请选择入库库房')
|
|
|
|
|
|
+ if (!snaps.length) {
|
|
|
|
+ MessageFu.warning('请选择藏品')
|
|
|
|
+ return true
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ const tableInputVals = tableRef.current?.form.getFieldsValue()
|
|
|
|
+ if (!areAllCheckersFilled('lendDate', tableInputVals)) {
|
|
|
|
+ MessageFu.warning(`请选择借出日期`)
|
|
return true
|
|
return true
|
|
}
|
|
}
|
|
|
|
|
|
return false
|
|
return false
|
|
- }, [topInfo])
|
|
|
|
|
|
+ }, [snaps.length, topInfo.sonUnit, topInfo.typeName])
|
|
|
|
|
|
// 新增的底部按钮点击
|
|
// 新增的底部按钮点击
|
|
const btnClickFu = useCallback(
|
|
const btnClickFu = useCallback(
|
|
@@ -253,7 +285,7 @@ function F1edit() {
|
|
}
|
|
}
|
|
const rtf2 = ZAuditRef.current?.resData()
|
|
const rtf2 = ZAuditRef.current?.resData()
|
|
|
|
|
|
- const res = await D4_APIsaveAudit({
|
|
|
|
|
|
+ const res = await F1_APIsaveAudit({
|
|
orderId: topInfo.id,
|
|
orderId: topInfo.id,
|
|
rtfOpinion: rtf2,
|
|
rtfOpinion: rtf2,
|
|
status: auditSta === '同意' ? 1 : 2
|
|
status: auditSta === '同意' ? 1 : 2
|
|
@@ -265,20 +297,19 @@ function F1edit() {
|
|
history.push(`/exhibition_edit/4/${topInfo.id}`)
|
|
history.push(`/exhibition_edit/4/${topInfo.id}`)
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- const rtf1 = ZRichTextRef.current?.fatherBtnOkFu() || { flag: true }
|
|
|
|
- // console.log('申请信息富文本', JSON.stringify(rtf1.val || ''))
|
|
|
|
-
|
|
|
|
- // 上传附件
|
|
|
|
- const filesRes = filesRef.current.filesIdRes()
|
|
|
|
-
|
|
|
|
|
|
+ const tableValues = tableRef.current?.form.getFieldsValue()
|
|
const obj = {
|
|
const obj = {
|
|
...topInfo,
|
|
...topInfo,
|
|
- fileIds: filesRes.join(','),
|
|
|
|
- rtf: JSON.stringify(rtf1.val || ''),
|
|
|
|
- goodsIds: topInfo.goods.map(v => v.id).join(','),
|
|
|
|
- goods: topInfo.goods.map(v => ({
|
|
|
|
|
|
+ goodsIds: snaps.map(v => v.id).join(','),
|
|
|
|
+ delSnapIds: delSnapIdsRef.current.length ? delSnapIdsRef.current : '',
|
|
|
|
+ snaps: snaps.map(v => ({
|
|
goodsId: v.id,
|
|
goodsId: v.id,
|
|
- siteId: v.siteId
|
|
|
|
|
|
+ id: v.id2 ? v.id2 : null,
|
|
|
|
+ orderId: topInfo.id,
|
|
|
|
+ snap: JSON.stringify({
|
|
|
|
+ ...v,
|
|
|
|
+ cusForm: tableValues
|
|
|
|
+ })
|
|
}))
|
|
}))
|
|
}
|
|
}
|
|
// console.log(123, obj)
|
|
// console.log(123, obj)
|
|
@@ -287,13 +318,13 @@ function F1edit() {
|
|
|
|
|
|
if (val === '草稿') {
|
|
if (val === '草稿') {
|
|
// 存草稿 当前页保存 不跳转
|
|
// 存草稿 当前页保存 不跳转
|
|
- const res = await D4_APIsaveDraft(obj)
|
|
|
|
|
|
+ const res = await F1_APIsaveDraft(obj)
|
|
if (res.code === 0) {
|
|
if (res.code === 0) {
|
|
MessageFu.success('草稿保存成功')
|
|
MessageFu.success('草稿保存成功')
|
|
getInfoFu(topInfo.id)
|
|
getInfoFu(topInfo.id)
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- const res = val === '创建' ? await D4_APIsaveCreate(obj) : await D4_APIsaveApply(obj)
|
|
|
|
|
|
+ const res = val === '创建' ? await F1_APIsaveCreate(obj) : await F1_APIsaveApply(obj)
|
|
if (res.code === 0) {
|
|
if (res.code === 0) {
|
|
MessageFu.success(`${val}成功`)
|
|
MessageFu.success(`${val}成功`)
|
|
// 跳到详情页
|
|
// 跳到详情页
|
|
@@ -302,9 +333,28 @@ function F1edit() {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- [auditSta, checkDataFu, getInfoFu, topInfo]
|
|
|
|
|
|
+ [auditSta, checkDataFu, getInfoFu, snaps, topInfo]
|
|
)
|
|
)
|
|
|
|
|
|
|
|
+ // 创建订单
|
|
|
|
+ const creatFu = useCallback(async () => {
|
|
|
|
+ const res = await F1_APIcreate()
|
|
|
|
+ if (res.code === 0) {
|
|
|
|
+ setTopInfo({
|
|
|
|
+ ...res.data,
|
|
|
|
+ sonType: F1_SON_TYPE_ENUM.IN,
|
|
|
|
+ sonTypeName: F1_SON_TYPE_NAME_ENUM.TEMP
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }, [])
|
|
|
|
+
|
|
|
|
+ useEffect(() => {
|
|
|
|
+ if (key === '1') creatFu()
|
|
|
|
+ else getInfoFu()
|
|
|
|
+
|
|
|
|
+ if (sollrDom.current) sollrDom.current.scrollTop = 0
|
|
|
|
+ }, [creatFu, getInfoFu, key])
|
|
|
|
+
|
|
return (
|
|
return (
|
|
<div className={style.F1edit}>
|
|
<div className={style.F1edit}>
|
|
<div className='pageTitle'>借展管理-{pageTitTxt}</div>
|
|
<div className='pageTitle'>借展管理-{pageTitTxt}</div>
|
|
@@ -312,7 +362,7 @@ function F1edit() {
|
|
<div className='D4main' ref={sollrDom}>
|
|
<div className='D4main' ref={sollrDom}>
|
|
{['3'].includes(key) ? (
|
|
{['3'].includes(key) ? (
|
|
<X3auditInfo
|
|
<X3auditInfo
|
|
- dirCode='D4impStor'
|
|
|
|
|
|
+ dirCode='D4exhibiton'
|
|
myUrl='cms/orderIn/upload'
|
|
myUrl='cms/orderIn/upload'
|
|
auditSta={auditSta}
|
|
auditSta={auditSta}
|
|
auditStaFu={val => setAuDitSta(val)}
|
|
auditStaFu={val => setAuDitSta(val)}
|
|
@@ -330,19 +380,19 @@ function F1edit() {
|
|
<div className='D4rowAll'>
|
|
<div className='D4rowAll'>
|
|
<div className='D4row'>
|
|
<div className='D4row'>
|
|
<div className='D4rowll'>业务单号:</div>
|
|
<div className='D4rowll'>业务单号:</div>
|
|
- <div className='D4rowrr'>这是一段文本</div>
|
|
|
|
|
|
+ <div className='D4rowrr'>{topInfo.num}</div>
|
|
</div>
|
|
</div>
|
|
<div className='D4row'>
|
|
<div className='D4row'>
|
|
<div className='D4rowll'>业务名称:</div>
|
|
<div className='D4rowll'>业务名称:</div>
|
|
- <div className='D4rowrr'>这是一段文本</div>
|
|
|
|
|
|
+ <div className='D4rowrr'>{topInfo.name}</div>
|
|
</div>
|
|
</div>
|
|
<div className='D4row'>
|
|
<div className='D4row'>
|
|
<div className='D4rowll'>发起人:</div>
|
|
<div className='D4rowll'>发起人:</div>
|
|
- <div className='D4rowrr'>这是一段文本</div>
|
|
|
|
|
|
+ <div className='D4rowrr'>{topInfo.creatorName}</div>
|
|
</div>
|
|
</div>
|
|
<div className='D4row'>
|
|
<div className='D4row'>
|
|
<div className='D4rowll'>发起部门:</div>
|
|
<div className='D4rowll'>发起部门:</div>
|
|
- <div className='D4rowrr'>这是一段文本</div>
|
|
|
|
|
|
+ <div className='D4rowrr'>{topInfo.deptName}</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
@@ -354,9 +404,9 @@ function F1edit() {
|
|
</div>
|
|
</div>
|
|
<div className='D4rowrr'>
|
|
<div className='D4rowrr'>
|
|
<Input
|
|
<Input
|
|
- value={topInfo.name}
|
|
|
|
- onChange={e => setTopInfo({ ...topInfo, name: e.target.value.trim() })}
|
|
|
|
- readOnly={['3', '4'].includes(key)}
|
|
|
|
|
|
+ value={topInfo.typeName}
|
|
|
|
+ onChange={e => setTopInfo({ ...topInfo, typeName: e.target.value.trim() })}
|
|
|
|
+ readOnly={pageDisabled}
|
|
placeholder='请输入内容'
|
|
placeholder='请输入内容'
|
|
maxLength={30}
|
|
maxLength={30}
|
|
showCount
|
|
showCount
|
|
@@ -368,9 +418,16 @@ function F1edit() {
|
|
<span> * </span>借展类型:
|
|
<span> * </span>借展类型:
|
|
</div>
|
|
</div>
|
|
<div className='D4rowrr'>
|
|
<div className='D4rowrr'>
|
|
- <Radio.Group>
|
|
|
|
- <Radio>馆内展览</Radio>
|
|
|
|
- <Radio>馆外展览</Radio>
|
|
|
|
|
|
+ <Radio.Group
|
|
|
|
+ value={topInfo.sonType}
|
|
|
|
+ disabled={pageDisabled}
|
|
|
|
+ onChange={e => setTopInfo({ ...topInfo, sonType: e.target.value })}
|
|
|
|
+ >
|
|
|
|
+ {F1_SON_TYPE_OPTS.map(i => (
|
|
|
|
+ <Radio key={i.value} value={i.value}>
|
|
|
|
+ {i.label}
|
|
|
|
+ </Radio>
|
|
|
|
+ ))}
|
|
</Radio.Group>
|
|
</Radio.Group>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -380,16 +437,10 @@ function F1edit() {
|
|
</div>
|
|
</div>
|
|
<div className='D4rowrr'>
|
|
<div className='D4rowrr'>
|
|
<Select
|
|
<Select
|
|
- options={[
|
|
|
|
- {
|
|
|
|
- value: 0,
|
|
|
|
- label: '临时展览'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- value: 1,
|
|
|
|
- label: '固定展览'
|
|
|
|
- }
|
|
|
|
- ]}
|
|
|
|
|
|
+ disabled={pageDisabled}
|
|
|
|
+ value={topInfo.sonTypeName}
|
|
|
|
+ options={F1_SON_TYPE_NAME_OPTS}
|
|
|
|
+ onChange={e => setTopInfo({ ...topInfo, sonTypeName: e })}
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -397,9 +448,9 @@ function F1edit() {
|
|
<div className='D4rowll'>提用审批单号:</div>
|
|
<div className='D4rowll'>提用审批单号:</div>
|
|
<div className='D4rowrr'>
|
|
<div className='D4rowrr'>
|
|
<Input
|
|
<Input
|
|
- value={topInfo.name}
|
|
|
|
- onChange={e => setTopInfo({ ...topInfo, name: e.target.value.trim() })}
|
|
|
|
- readOnly={['3', '4'].includes(key)}
|
|
|
|
|
|
+ value={topInfo.sonNum}
|
|
|
|
+ onChange={e => setTopInfo({ ...topInfo, sonNum: e.target.value.trim() })}
|
|
|
|
+ readOnly={pageDisabled}
|
|
placeholder='请输入内容'
|
|
placeholder='请输入内容'
|
|
maxLength={30}
|
|
maxLength={30}
|
|
showCount
|
|
showCount
|
|
@@ -412,9 +463,9 @@ function F1edit() {
|
|
</div>
|
|
</div>
|
|
<div className='D4rowrr'>
|
|
<div className='D4rowrr'>
|
|
<Input
|
|
<Input
|
|
- value={topInfo.name}
|
|
|
|
- onChange={e => setTopInfo({ ...topInfo, name: e.target.value.trim() })}
|
|
|
|
- readOnly={['3', '4'].includes(key)}
|
|
|
|
|
|
+ value={topInfo.sonUnit}
|
|
|
|
+ onChange={e => setTopInfo({ ...topInfo, sonUnit: e.target.value.trim() })}
|
|
|
|
+ readOnly={pageDisabled}
|
|
placeholder='请输入内容'
|
|
placeholder='请输入内容'
|
|
maxLength={30}
|
|
maxLength={30}
|
|
showCount
|
|
showCount
|
|
@@ -425,124 +476,27 @@ function F1edit() {
|
|
<div className='D4rowll'>提退凭证号:</div>
|
|
<div className='D4rowll'>提退凭证号:</div>
|
|
<div className='D4rowrr'>
|
|
<div className='D4rowrr'>
|
|
<Input
|
|
<Input
|
|
- value={topInfo.name}
|
|
|
|
- onChange={e => setTopInfo({ ...topInfo, name: e.target.value.trim() })}
|
|
|
|
- readOnly={['3', '4'].includes(key)}
|
|
|
|
|
|
+ value={topInfo.sonNum2}
|
|
|
|
+ onChange={e => setTopInfo({ ...topInfo, sonNum2: e.target.value.trim() })}
|
|
|
|
+ readOnly={pageDisabled}
|
|
placeholder='请输入内容'
|
|
placeholder='请输入内容'
|
|
maxLength={30}
|
|
maxLength={30}
|
|
showCount
|
|
showCount
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div className='D4row'>
|
|
|
|
- <div className='D4rowll'>出借经手人:</div>
|
|
|
|
- <div className='D4rowrr'>
|
|
|
|
- <div className='D4row'>
|
|
|
|
- <div className='D4rowll' style={{ width: 50 }}>
|
|
|
|
- 甲方:
|
|
|
|
- </div>
|
|
|
|
- <div className='D4rowrr'>
|
|
|
|
- <Input
|
|
|
|
- value={topInfo.name}
|
|
|
|
- onChange={e => setTopInfo({ ...topInfo, name: e.target.value.trim() })}
|
|
|
|
- readOnly={['3', '4'].includes(key)}
|
|
|
|
- placeholder='请输入内容'
|
|
|
|
- maxLength={30}
|
|
|
|
- showCount
|
|
|
|
- />
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <div className='D4row' style={{ marginBottom: 0 }}>
|
|
|
|
- <div className='D4rowll' style={{ width: 50 }}>
|
|
|
|
- 乙方:
|
|
|
|
- </div>
|
|
|
|
- <div className='D4rowrr'>
|
|
|
|
- <Input
|
|
|
|
- value={topInfo.name}
|
|
|
|
- onChange={e => setTopInfo({ ...topInfo, name: e.target.value.trim() })}
|
|
|
|
- readOnly={['3', '4'].includes(key)}
|
|
|
|
- placeholder='请输入内容'
|
|
|
|
- maxLength={30}
|
|
|
|
- showCount
|
|
|
|
- />
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <div className='D4row'>
|
|
|
|
- <div className='D4rowll'>归还经手人:</div>
|
|
|
|
- <div className='D4rowrr'>
|
|
|
|
- <div className='D4row'>
|
|
|
|
- <div className='D4rowll' style={{ width: 50 }}>
|
|
|
|
- 甲方:
|
|
|
|
- </div>
|
|
|
|
- <div className='D4rowrr'>
|
|
|
|
- <Input
|
|
|
|
- value={topInfo.name}
|
|
|
|
- onChange={e => setTopInfo({ ...topInfo, name: e.target.value.trim() })}
|
|
|
|
- readOnly={['3', '4'].includes(key)}
|
|
|
|
- placeholder='请输入内容'
|
|
|
|
- maxLength={30}
|
|
|
|
- showCount
|
|
|
|
- />
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <div className='D4row' style={{ marginBottom: 0 }}>
|
|
|
|
- <div className='D4rowll' style={{ width: 50 }}>
|
|
|
|
- 乙方:
|
|
|
|
- </div>
|
|
|
|
- <div className='D4rowrr'>
|
|
|
|
- <Input
|
|
|
|
- value={topInfo.name}
|
|
|
|
- onChange={e => setTopInfo({ ...topInfo, name: e.target.value.trim() })}
|
|
|
|
- readOnly={['3', '4'].includes(key)}
|
|
|
|
- placeholder='请输入内容'
|
|
|
|
- maxLength={30}
|
|
|
|
- showCount
|
|
|
|
- />
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <div className='D4row'>
|
|
|
|
- <div className='D4rowll'>记录人:</div>
|
|
|
|
- <div className='D4rowrr'>
|
|
|
|
- <Input
|
|
|
|
- value={topInfo.name}
|
|
|
|
- onChange={e => setTopInfo({ ...topInfo, name: e.target.value.trim() })}
|
|
|
|
- readOnly={['3', '4'].includes(key)}
|
|
|
|
- placeholder='请输入内容'
|
|
|
|
- maxLength={30}
|
|
|
|
- showCount
|
|
|
|
- />
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <div className='D4row D4rowFull' style={{ margin: 0 }}>
|
|
|
|
- <div className='D4rowll'>备注:</div>
|
|
|
|
- <div className='D4rowrr'>
|
|
|
|
- <ZRichTexts
|
|
|
|
- check={false}
|
|
|
|
- dirCode='impStor'
|
|
|
|
- myUrl='cms/orderIn/upload'
|
|
|
|
- isLook={['3', '4'].includes(key)}
|
|
|
|
- ref={ZRichTextRef}
|
|
|
|
- isOne={true}
|
|
|
|
- upAudioBtnNone={true}
|
|
|
|
- />
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div className='D4googsBox'>
|
|
<div className='D4googsBox'>
|
|
<div className='D4Tit2'>
|
|
<div className='D4Tit2'>
|
|
<div className='D4Tit2ll'>参展藏品</div>
|
|
<div className='D4Tit2ll'>参展藏品</div>
|
|
<div className='D4Tit2rr'>
|
|
<div className='D4Tit2rr'>
|
|
- {['3', '4'].includes(key) ? null : (
|
|
|
|
|
|
+ {pageDisabled ? null : (
|
|
<>
|
|
<>
|
|
<Button
|
|
<Button
|
|
type='primary'
|
|
type='primary'
|
|
onClick={() => {
|
|
onClick={() => {
|
|
- setNowSta({ key: '5', id: 'cms/orderIn/goods/getList' })
|
|
|
|
|
|
+ setNowSta({ key: '5', id: 'cms/orderExhibition/goods/getList' })
|
|
}}
|
|
}}
|
|
>
|
|
>
|
|
新增
|
|
新增
|
|
@@ -554,7 +508,8 @@ function F1edit() {
|
|
|
|
|
|
{/* 表格 */}
|
|
{/* 表格 */}
|
|
<MyTable
|
|
<MyTable
|
|
- list={topInfo.goods || []}
|
|
|
|
|
|
+ ref={tableRef}
|
|
|
|
+ list={snaps}
|
|
columnsTemp={F1_GOOD_COLUMNS}
|
|
columnsTemp={F1_GOOD_COLUMNS}
|
|
pagingInfo={false}
|
|
pagingInfo={false}
|
|
lastBtn={tableLastBtn}
|
|
lastBtn={tableLastBtn}
|
|
@@ -562,6 +517,11 @@ function F1edit() {
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
+ {/* 申请流程 */}
|
|
|
|
+ {auditsShow ? (
|
|
|
|
+ <ZflowTable tableArr={topInfo.audits || []} closeFu={() => setAuditsShow(false)} />
|
|
|
|
+ ) : null}
|
|
|
|
+
|
|
{/* 底部按钮 */}
|
|
{/* 底部按钮 */}
|
|
<div className='D4btn'>
|
|
<div className='D4btn'>
|
|
{['3', '4'].includes(key) &&
|
|
{['3', '4'].includes(key) &&
|
|
@@ -593,7 +553,7 @@ function F1edit() {
|
|
</Button>
|
|
</Button>
|
|
) : null}
|
|
) : null}
|
|
|
|
|
|
- <MyPopconfirm txtK='取消' onConfirm={() => history.push('/impStor')} />
|
|
|
|
|
|
+ <MyPopconfirm txtK='取消' onConfirm={() => history.push('/exhibiton')} />
|
|
</>
|
|
</>
|
|
)}
|
|
)}
|
|
</div>
|
|
</div>
|
|
@@ -603,9 +563,17 @@ function F1edit() {
|
|
<ZGaddNow
|
|
<ZGaddNow
|
|
nowSta={nowSta}
|
|
nowSta={nowSta}
|
|
closeFu={() => setNowSta({ key: '', id: '' })}
|
|
closeFu={() => setNowSta({ key: '', id: '' })}
|
|
- dataResFu={data => setTopInfo({ ...topInfo, goods: data })}
|
|
|
|
- oldCheckArr={topInfo.goods || []}
|
|
|
|
- canObj={{ storageId: topInfo.storageId }}
|
|
|
|
|
|
+ dataResFu={data => {
|
|
|
|
+ const dataTemp = [...data]
|
|
|
|
+ dataTemp.forEach(v => {
|
|
|
|
+ // id2表示的是自己这条数据的id id才是goodsId
|
|
|
|
+ const obj = snapsID2ref.current.find(c => c.goodsId === v.id)
|
|
|
|
+
|
|
|
|
+ if (obj) v.id2 = obj.id
|
|
|
|
+ })
|
|
|
|
+ setSnaps(dataTemp)
|
|
|
|
+ }}
|
|
|
|
+ oldCheckArr={snaps}
|
|
/>
|
|
/>
|
|
) : null}
|
|
) : null}
|
|
</div>
|
|
</div>
|