|
@@ -12,8 +12,6 @@ import {
|
|
|
Select
|
|
|
} from 'antd'
|
|
|
import MyPopconfirm from '@/components/MyPopconfirm'
|
|
|
-import { D1GselectNum } from '@/pages/D_storeManage/D1storage/D1goods/data'
|
|
|
-import { nweSelect1 } from './data'
|
|
|
import TextArea from 'antd/es/input/TextArea'
|
|
|
import ZupOne from '@/components/ZupOne'
|
|
|
import ZRichTexts from '@/components/ZRichTexts'
|
|
@@ -21,19 +19,100 @@ import MyTable from '@/components/MyTable'
|
|
|
import { Y33tableC } from '@/utils/tableData'
|
|
|
import ImageLazy from '@/components/ImageLazy'
|
|
|
import YtableVideo from '@/components/YtableVideo'
|
|
|
+import { selectObj } from '@/utils/select'
|
|
|
+import dayjs from 'dayjs'
|
|
|
+import { getTokenInfo } from '@/utils/storage'
|
|
|
+import { useSelector } from 'react-redux'
|
|
|
+import { RootState } from '@/store'
|
|
|
+import { cascaderArr } from './data'
|
|
|
+import Z3upFiles from '@/components/Z3upFiles'
|
|
|
+import { GoodFileType } from './type'
|
|
|
+import { baseURL } from '@/utils/http'
|
|
|
+import { fileImgArr, fileVideoArr } from '@/store/action/layout'
|
|
|
+import { API_C2dels } from '@/store/action/C2files'
|
|
|
+import { API_goodsAdd, API_goodsInfo } from '@/store/action/C1ledger'
|
|
|
+import { C1GoodType } from '@/pages/C_goodsManage/C1ledger/type'
|
|
|
+import { MessageFu } from '@/utils/message'
|
|
|
+
|
|
|
+// 级联的数据转换成字符串
|
|
|
+const cascaderChArr = [
|
|
|
+ 'dictType',
|
|
|
+ 'dictAge',
|
|
|
+ 'pcsUnit',
|
|
|
+ 'dictTexture1',
|
|
|
+ 'dictTexture2',
|
|
|
+ 'dictTexture3',
|
|
|
+ 'dictTorn',
|
|
|
+ 'sizeUnit',
|
|
|
+ 'qualityDictScope',
|
|
|
+ 'qualityUnit',
|
|
|
+ 'inDictDateScope',
|
|
|
+ 'source'
|
|
|
+]
|
|
|
|
|
|
type Props = {
|
|
|
closeFu: () => void
|
|
|
nowSta: { key: string; id: string }
|
|
|
+ isEdit: boolean
|
|
|
+ succFu: (obj: C1GoodType, type: '新增' | '编辑') => void
|
|
|
}
|
|
|
|
|
|
-function B3GaddNew({ nowSta, closeFu }: Props) {
|
|
|
- useEffect(() => {
|
|
|
- FormBoxRef.current?.setFieldsValue({
|
|
|
- aaaa: '藏品总登记号'
|
|
|
- })
|
|
|
+function B3GaddNew({ nowSta, closeFu, succFu }: Props) {
|
|
|
+ const { dictAll } = useSelector((state: RootState) => state.Z1dict)
|
|
|
+
|
|
|
+ // 制档日期 / 制档人
|
|
|
+ const [txtArr, setTxtArr] = useState([getTokenInfo().user.realName, dayjs().format('YYYY-MM-DD')])
|
|
|
+
|
|
|
+ // 编辑进来获取详情
|
|
|
+ const getInfo = useCallback(async (id: number) => {
|
|
|
+ const res = await API_goodsInfo(id)
|
|
|
+ if (res.code === 0) {
|
|
|
+ // dateMaking inGoodsDate 2个日期需要格式处理一下
|
|
|
+ const obj = res.data
|
|
|
+ if (obj.dateMaking) obj.dateMaking = dayjs(obj.dateMaking)
|
|
|
+ if (obj.inGoodsDate) obj.inGoodsDate = dayjs(obj.inGoodsDate)
|
|
|
+
|
|
|
+ setTxtArr([obj.creatorName, dayjs(obj.createTime).format('YYYY-MM-DD')])
|
|
|
+
|
|
|
+ cascaderChArr.forEach(v => {
|
|
|
+ if (obj[v]) obj[v] = obj[v].split(',')
|
|
|
+ })
|
|
|
+ FormBoxRef.current?.setFieldsValue(obj)
|
|
|
+
|
|
|
+ // 设置封面图
|
|
|
+ ZupThumbRef.current?.setFileComFileFu({
|
|
|
+ fileName: '',
|
|
|
+ filePath: obj.thumbPc,
|
|
|
+ thumb: obj.thumb
|
|
|
+ })
|
|
|
+
|
|
|
+ // 设置富文本
|
|
|
+ if (obj.rtf) ZRichTextRef.current?.ritxtShowFu(JSON.parse(obj.rtf))
|
|
|
+
|
|
|
+ // 设置附件 待完善 附件类型 和用途
|
|
|
+ setTable(obj.file || [])
|
|
|
+ }
|
|
|
}, [])
|
|
|
|
|
|
+ useEffect(() => {
|
|
|
+ if (nowSta.id !== 'null') {
|
|
|
+ getInfo(Number(nowSta.id))
|
|
|
+ } else {
|
|
|
+ FormBoxRef.current?.setFieldsValue({
|
|
|
+ numName: '藏品总登记号'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }, [getInfo, nowSta.id])
|
|
|
+
|
|
|
+ // 所有级联的数据平铺
|
|
|
+ const cascaderObj = useMemo(() => {
|
|
|
+ let obj: any = {}
|
|
|
+ if (dictAll && dictAll.length) {
|
|
|
+ obj = cascaderArr(dictAll)
|
|
|
+ }
|
|
|
+ return obj
|
|
|
+ }, [dictAll])
|
|
|
+
|
|
|
// 设置表单ref
|
|
|
const FormBoxRef = useRef<FormInstance>(null)
|
|
|
|
|
@@ -43,24 +122,29 @@ function B3GaddNew({ nowSta, closeFu }: Props) {
|
|
|
// 封面图的ref
|
|
|
const ZupThumbRef = useRef<any>(null)
|
|
|
|
|
|
- // 设置封面图
|
|
|
- // ZupThumbRef.current?.setFileComFileFu({
|
|
|
- // fileName: '',
|
|
|
- // filePath: info.thumb
|
|
|
- // })
|
|
|
-
|
|
|
- // const coverUrl1 = ZupThumbRef.current?.fileComFileResFu()
|
|
|
-
|
|
|
- // thumb: coverUrl1.filePath,
|
|
|
-
|
|
|
// 富文本的ref
|
|
|
const ZRichTextRef = useRef<any>(null)
|
|
|
|
|
|
- // 设置富文本
|
|
|
- // ZRichTextRef.current?.ritxtShowFu(JSON.parse(data.rtf))
|
|
|
-
|
|
|
- // const rtf = ZRichTextRef.current?.fatherBtnOkFu() || { flag: true }
|
|
|
- // rtf: JSON.stringify(rtf.val || ''),
|
|
|
+ // 上传附件的ref
|
|
|
+ const filesRef = useRef<any>(null)
|
|
|
+
|
|
|
+ // 附件表格
|
|
|
+ const [table, setTable] = useState<GoodFileType[]>([])
|
|
|
+
|
|
|
+ // 附件删除记录id
|
|
|
+ const fileDelIdArr = useRef<number[]>([])
|
|
|
+
|
|
|
+ const tableFu = useCallback(
|
|
|
+ (key: 'type' | 'effect', id: number, val: any) => {
|
|
|
+ setTable(
|
|
|
+ table.map(v => ({
|
|
|
+ ...v,
|
|
|
+ [key]: id === v.id ? val : v[key]
|
|
|
+ }))
|
|
|
+ )
|
|
|
+ },
|
|
|
+ [table]
|
|
|
+ )
|
|
|
|
|
|
// 相关附件的操作
|
|
|
const startBtn = useMemo(() => {
|
|
@@ -68,13 +152,16 @@ function B3GaddNew({ nowSta, closeFu }: Props) {
|
|
|
{
|
|
|
width: 100,
|
|
|
title: '缩略图/视频',
|
|
|
- render: (item: any) => {
|
|
|
- return item.type === '图像' ? (
|
|
|
+ render: (item: GoodFileType) => {
|
|
|
+ const fileNameArr = item.fileName.split('.')
|
|
|
+ const fileNameLast = fileNameArr[fileNameArr.length - 1]
|
|
|
+
|
|
|
+ return fileImgArr.includes(fileNameLast) ? (
|
|
|
<div className='tableImgAuto'>
|
|
|
- <ImageLazy width={60} height={60} srcBig={item.src} src={item.src} offline={true} />
|
|
|
+ <ImageLazy width={60} height={60} srcBig={item.filePath} src={item.thumb} />
|
|
|
</div>
|
|
|
- ) : item.type === '视频' ? (
|
|
|
- <YtableVideo item={item} />
|
|
|
+ ) : fileVideoArr.includes(fileNameLast) ? (
|
|
|
+ <YtableVideo src={item.filePath} />
|
|
|
) : (
|
|
|
' - '
|
|
|
)
|
|
@@ -82,45 +169,58 @@ function B3GaddNew({ nowSta, closeFu }: Props) {
|
|
|
},
|
|
|
{
|
|
|
title: '附件类型',
|
|
|
- render: (item: any) => <Select style={{ width: 120 }} placeholder='请选择' />
|
|
|
+ render: (item: GoodFileType) => (
|
|
|
+ <Select
|
|
|
+ style={{ width: 120 }}
|
|
|
+ placeholder='请选择'
|
|
|
+ value={item.type}
|
|
|
+ onChange={e => tableFu('type', item.id, e)}
|
|
|
+ options={selectObj['附件类型']}
|
|
|
+ fieldNames={{ label: 'name', value: 'key' }}
|
|
|
+ />
|
|
|
+ )
|
|
|
},
|
|
|
{
|
|
|
title: '附件用途',
|
|
|
- render: (item: any) => (
|
|
|
+ render: (item: GoodFileType) => (
|
|
|
<Cascader
|
|
|
- options={[
|
|
|
- { value: '年代1', label: '年代11', children: [{ value: 1, label: 'xxx' }] },
|
|
|
- { value: '其他', label: '其他' }
|
|
|
- ]}
|
|
|
- changeOnSelect
|
|
|
+ options={cascaderObj['附件用途']}
|
|
|
+ value={item.effect ? item.effect.split(',') : []}
|
|
|
+ onChange={e => tableFu('effect', item.id, e.join(','))}
|
|
|
placeholder='请选择'
|
|
|
- // fieldNames={{ label: 'name', value: 'id', children: 'children' }}
|
|
|
+ fieldNames={{ label: 'name', value: 'id', children: 'children' }}
|
|
|
/>
|
|
|
)
|
|
|
}
|
|
|
]
|
|
|
- }, [])
|
|
|
+ }, [cascaderObj, tableFu])
|
|
|
|
|
|
const tableLastBtn = useMemo(() => {
|
|
|
return [
|
|
|
{
|
|
|
width: 120,
|
|
|
title: '操作',
|
|
|
- render: (item: any) => {
|
|
|
+ render: (item: GoodFileType) => {
|
|
|
return (
|
|
|
<>
|
|
|
<Button size='small' type='text'>
|
|
|
- <a href={item.src} download target='_blank' rel='noreferrer'>
|
|
|
+ <a href={baseURL + item.filePath} download target='_blank' rel='noreferrer'>
|
|
|
下载
|
|
|
</a>
|
|
|
</Button>
|
|
|
- <MyPopconfirm txtK='删除' onConfirm={() => {}} />
|
|
|
+ <MyPopconfirm
|
|
|
+ txtK='删除'
|
|
|
+ onConfirm={() => {
|
|
|
+ setTable(table.filter(v => v.id !== item.id))
|
|
|
+ fileDelIdArr.current.push(item.id)
|
|
|
+ }}
|
|
|
+ />
|
|
|
</>
|
|
|
)
|
|
|
}
|
|
|
}
|
|
|
]
|
|
|
- }, [])
|
|
|
+ }, [table])
|
|
|
|
|
|
// 没有通过校验
|
|
|
const onFinishFailed = useCallback(() => {
|
|
@@ -128,13 +228,73 @@ function B3GaddNew({ nowSta, closeFu }: Props) {
|
|
|
}, [])
|
|
|
|
|
|
// 通过校验点击确定
|
|
|
- const onFinish = useCallback(async (values: any) => {}, [])
|
|
|
+ const onFinish = useCallback(
|
|
|
+ async (values: any) => {
|
|
|
+ // 删除附件
|
|
|
+ if (fileDelIdArr.current.length) {
|
|
|
+ await API_C2dels(fileDelIdArr.current)
|
|
|
+ }
|
|
|
+
|
|
|
+ // 封面图
|
|
|
+ const coverUrl1 = ZupThumbRef.current?.fileComFileResFu()
|
|
|
+
|
|
|
+ // 富文本
|
|
|
+ const rtf = ZRichTextRef.current?.fatherBtnOkFu() || { flag: true }
|
|
|
+
|
|
|
+ // 附件
|
|
|
+ let fileIds = ''
|
|
|
+ let fileSet: any = null
|
|
|
+
|
|
|
+ if (table.length) {
|
|
|
+ fileIds = table.map(v => v.id).join(',')
|
|
|
+
|
|
|
+ fileSet = table.map(v => ({
|
|
|
+ effect: v.effect,
|
|
|
+ id: v.id,
|
|
|
+ type: v.type
|
|
|
+ }))
|
|
|
+ }
|
|
|
+
|
|
|
+ // 2个日期的格式处理
|
|
|
+ let inGoodsDate = ''
|
|
|
+ if (values.inGoodsDate) inGoodsDate = dayjs(values.inGoodsDate).format('YYYY-MM-DD')
|
|
|
+ let dateMaking = ''
|
|
|
+ if (values.dateMaking) dateMaking = dayjs(values.dateMaking).format('YYYY-MM-DD')
|
|
|
+
|
|
|
+ const obj = {
|
|
|
+ ...values,
|
|
|
+ thumb: coverUrl1.thumb,
|
|
|
+ thumbPc: coverUrl1.filePath,
|
|
|
+ rtf: JSON.stringify(rtf.val || ''),
|
|
|
+ fileIds,
|
|
|
+ fileSet,
|
|
|
+ inGoodsDate,
|
|
|
+ dateMaking,
|
|
|
+ id: nowSta.id === 'null' ? null : Number(nowSta.id)
|
|
|
+ }
|
|
|
+
|
|
|
+ // 级联的数据转换成字符串
|
|
|
+ cascaderChArr.forEach(v => {
|
|
|
+ if (values[v]) {
|
|
|
+ obj[v] = values[v].join(',')
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ const res = await API_goodsAdd(obj, nowSta.id === 'null' ? '新增' : '编辑')
|
|
|
+ if (res.code === 0) {
|
|
|
+ MessageFu.success(nowSta.id === 'null' ? '新增成功' : '编辑成功')
|
|
|
+ succFu(res.data, nowSta.id === 'null' ? '新增' : '编辑')
|
|
|
+ closeFu()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ [closeFu, nowSta.id, succFu, table]
|
|
|
+ )
|
|
|
|
|
|
return (
|
|
|
<Modal
|
|
|
wrapClassName={styles.B3GaddNew}
|
|
|
open={true}
|
|
|
- title='新增藏品'
|
|
|
+ title={`${nowSta.id !== 'null' ? '编辑' : '新增'}藏品`}
|
|
|
footer={
|
|
|
[] // 设置footer为空,去掉 取消 确定默认按钮
|
|
|
}
|
|
@@ -152,32 +312,29 @@ function B3GaddNew({ nowSta, closeFu }: Props) {
|
|
|
|
|
|
<div className='B3Nbox'>
|
|
|
<div className='B3Nrow B3Nrow0'>
|
|
|
- <Form.Item label='藏品编号' name='aaaa' rules={[{ required: true, message: '' }]}>
|
|
|
- <Select
|
|
|
- style={{ width: 140 }}
|
|
|
- options={D1GselectNum.filter(v => v.label !== '全部')}
|
|
|
- />
|
|
|
+ <Form.Item label='藏品编号' name='numName' rules={[{ required: true, message: '' }]}>
|
|
|
+ <Select style={{ width: 140 }} options={selectObj['藏品编号类型']} />
|
|
|
</Form.Item>
|
|
|
|
|
|
- <Form.Item name='prefix' rules={[{ required: true, message: '请输入内容' }]}>
|
|
|
+ <Form.Item name='num' rules={[{ required: true, message: '请输入内容' }]}>
|
|
|
<Input maxLength={30} showCount placeholder='请输入内容' />
|
|
|
</Form.Item>
|
|
|
</div>
|
|
|
|
|
|
<div className='B3Nrow'>
|
|
|
- <Form.Item label='分类号' name='bbbb'>
|
|
|
+ <Form.Item label='分类号' name='numType'>
|
|
|
<Input maxLength={30} showCount placeholder='请输入内容' />
|
|
|
</Form.Item>
|
|
|
</div>
|
|
|
|
|
|
<div className='B3Nrow'>
|
|
|
<div className='B3Nrowll'>制档人:</div>
|
|
|
- <div className='B3Nrowrr'>这是一段文本</div>
|
|
|
+ <div className='B3Nrowrr'>{txtArr[0]}</div>
|
|
|
</div>
|
|
|
|
|
|
<div className='B3Nrow'>
|
|
|
<div className='B3Nrowll'>制档日期:</div>
|
|
|
- <div className='B3Nrowrr'>2025年3月13日11:25:23</div>
|
|
|
+ <div className='B3Nrowrr'>{txtArr[1]}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
@@ -187,40 +344,36 @@ function B3GaddNew({ nowSta, closeFu }: Props) {
|
|
|
<div className='B3Nrow'>
|
|
|
<Form.Item
|
|
|
label='藏品名称'
|
|
|
- name='bbbb'
|
|
|
+ name='name'
|
|
|
rules={[{ required: true, message: '请输入藏品名称' }]}
|
|
|
>
|
|
|
<Input maxLength={30} showCount placeholder='请输入内容' />
|
|
|
</Form.Item>
|
|
|
</div>
|
|
|
<div className='B3Nrow'>
|
|
|
- <Form.Item label='藏品原名' name='bbbb'>
|
|
|
+ <Form.Item label='藏品原名' name='namePrimitive'>
|
|
|
<Input maxLength={30} showCount placeholder='请输入内容' />
|
|
|
</Form.Item>
|
|
|
</div>
|
|
|
<div className='B3Nrow'>
|
|
|
<Form.Item
|
|
|
label='文物级别'
|
|
|
- name='bbbb'
|
|
|
+ name='dictLevel'
|
|
|
rules={[{ required: true, message: '请选择文物级别' }]}
|
|
|
>
|
|
|
- <Select options={nweSelect1} placeholder='请选择' />
|
|
|
+ <Select options={selectObj['文物级别']} placeholder='请选择' />
|
|
|
</Form.Item>
|
|
|
</div>
|
|
|
<div className='B3Nrow'>
|
|
|
<Form.Item
|
|
|
label='文物类别'
|
|
|
- name='wwww'
|
|
|
+ name='dictType'
|
|
|
rules={[{ required: true, message: '请选择文物类别' }]}
|
|
|
>
|
|
|
<Cascader
|
|
|
- options={[
|
|
|
- { value: '年代1', label: '年代11', children: [{ value: 1, label: 'xxx' }] },
|
|
|
- { value: '其他', label: '其他' }
|
|
|
- ]}
|
|
|
- changeOnSelect
|
|
|
+ options={cascaderObj['文物类别']}
|
|
|
placeholder='请选择'
|
|
|
- // fieldNames={{ label: 'name', value: 'id', children: 'children' }}
|
|
|
+ fieldNames={{ label: 'name', value: 'id', children: 'children' }}
|
|
|
allowClear={false}
|
|
|
/>
|
|
|
</Form.Item>
|
|
@@ -228,17 +381,14 @@ function B3GaddNew({ nowSta, closeFu }: Props) {
|
|
|
<div className='B3Nrow'>
|
|
|
<Form.Item
|
|
|
label='年代'
|
|
|
- name='age'
|
|
|
+ name='dictAge'
|
|
|
rules={[{ required: true, message: '请选择年代' }]}
|
|
|
>
|
|
|
<Cascader
|
|
|
- options={[
|
|
|
- { value: '年代1', label: '年代11', children: [{ value: 1, label: 'xxx' }] },
|
|
|
- { value: '其他', label: '其他' }
|
|
|
- ]}
|
|
|
+ options={[...cascaderObj['年代'], { name: '其他', id: '其他' }]}
|
|
|
onChange={value => setAgeAc(value[0] === '其他')}
|
|
|
placeholder='请选择'
|
|
|
- // fieldNames={{ label: 'name', value: 'id', children: 'children' }}
|
|
|
+ fieldNames={{ label: 'name', value: 'id', children: 'children' }}
|
|
|
allowClear={false}
|
|
|
/>
|
|
|
</Form.Item>
|
|
@@ -247,7 +397,7 @@ function B3GaddNew({ nowSta, closeFu }: Props) {
|
|
|
<div className='B3Nrow'>
|
|
|
<Form.Item
|
|
|
label='具体年代'
|
|
|
- name='ageTxt'
|
|
|
+ name='ageInfo'
|
|
|
rules={[{ required: ageAc, message: '请输入内容' }]}
|
|
|
>
|
|
|
<Input maxLength={30} showCount placeholder='请输入内容' />
|
|
@@ -255,18 +405,18 @@ function B3GaddNew({ nowSta, closeFu }: Props) {
|
|
|
</div>
|
|
|
|
|
|
<div className='B3Nrow'>
|
|
|
- <Form.Item label='制作时间' name='xxxx'>
|
|
|
+ <Form.Item label='制作时间' name='dateMaking'>
|
|
|
<DatePicker placeholder='请选择日期' />
|
|
|
</Form.Item>
|
|
|
<div className='B3NrowDing'>
|
|
|
- <Form.Item label='作者' name='bbbb'>
|
|
|
+ <Form.Item label='作者' name='author'>
|
|
|
<Input maxLength={30} showCount placeholder='请输入内容' />
|
|
|
</Form.Item>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<div className='B3Nrow'>
|
|
|
- <Form.Item label='作者介绍' name='bbbb'>
|
|
|
+ <Form.Item label='作者介绍' name='authorDesc'>
|
|
|
<TextArea maxLength={500} showCount placeholder='请输入内容' />
|
|
|
</Form.Item>
|
|
|
</div>
|
|
@@ -274,24 +424,23 @@ function B3GaddNew({ nowSta, closeFu }: Props) {
|
|
|
<div className='B3Nrow B3NrowNumOrCas'>
|
|
|
<Form.Item
|
|
|
label='数量'
|
|
|
- name='qqqq'
|
|
|
+ name='pcs'
|
|
|
rules={[{ required: true, message: '请输入正整数' }]}
|
|
|
>
|
|
|
- <InputNumber min={1} precision={0} placeholder='请输入正整数' />
|
|
|
+ <InputNumber min={1} max={99999999} precision={0} placeholder='请输入正整数' />
|
|
|
</Form.Item>
|
|
|
|
|
|
- <Form.Item name='prefix' rules={[{ required: true, message: '请选择单位' }]}>
|
|
|
+ <Form.Item name='pcsUnit' rules={[{ required: true, message: '请选择单位' }]}>
|
|
|
<Cascader
|
|
|
- options={[]}
|
|
|
- changeOnSelect
|
|
|
- placeholder='请选择单位'
|
|
|
- // fieldNames={{ label: 'name', value: 'id', children: 'children' }}
|
|
|
+ options={cascaderObj['数量单位']}
|
|
|
+ placeholder='请选择'
|
|
|
+ fieldNames={{ label: 'name', value: 'id', children: 'children' }}
|
|
|
allowClear={false}
|
|
|
/>
|
|
|
</Form.Item>
|
|
|
</div>
|
|
|
<div className='B3Nrow'>
|
|
|
- <Form.Item label='实际数量' name='bbbb'>
|
|
|
+ <Form.Item label='实际数量' name='pcsActual'>
|
|
|
<Input maxLength={30} showCount placeholder='请输入内容' />
|
|
|
</Form.Item>
|
|
|
</div>
|
|
@@ -303,38 +452,26 @@ function B3GaddNew({ nowSta, closeFu }: Props) {
|
|
|
<span className='B3Nred'> * </span>质地
|
|
|
</div>
|
|
|
}
|
|
|
- name='ee0'
|
|
|
+ name='dictTexture1'
|
|
|
>
|
|
|
<Cascader
|
|
|
- options={[
|
|
|
- { value: '年代1', label: '年代11', children: [{ value: 1, label: 'xxx' }] },
|
|
|
- { value: '其他', label: '其他' }
|
|
|
- ]}
|
|
|
- changeOnSelect
|
|
|
+ options={cascaderObj['质地']}
|
|
|
placeholder='请选择'
|
|
|
- // fieldNames={{ label: 'name', value: 'id', children: 'children' }}
|
|
|
+ fieldNames={{ label: 'name', value: 'id', children: 'children' }}
|
|
|
/>
|
|
|
</Form.Item>
|
|
|
- <Form.Item name='ee1'>
|
|
|
+ <Form.Item name='dictTexture2'>
|
|
|
<Cascader
|
|
|
- options={[
|
|
|
- { value: '年代1', label: '年代11', children: [{ value: 1, label: 'xxx' }] },
|
|
|
- { value: '其他', label: '其他' }
|
|
|
- ]}
|
|
|
- changeOnSelect
|
|
|
+ options={cascaderObj['复合或组合质地']}
|
|
|
placeholder='请选择'
|
|
|
- // fieldNames={{ label: 'name', value: 'id', children: 'children' }}
|
|
|
+ fieldNames={{ label: 'name', value: 'id', children: 'children' }}
|
|
|
/>
|
|
|
</Form.Item>
|
|
|
- <Form.Item name='ee2' rules={[{ required: true, message: '请选择质地3' }]}>
|
|
|
+ <Form.Item name='dictTexture3' rules={[{ required: true, message: '请选择质地3' }]}>
|
|
|
<Cascader
|
|
|
- options={[
|
|
|
- { value: '年代1', label: '年代11', children: [{ value: 1, label: 'xxx' }] },
|
|
|
- { value: '其他', label: '其他' }
|
|
|
- ]}
|
|
|
- changeOnSelect
|
|
|
+ options={cascaderObj['单一质地']}
|
|
|
placeholder='请选择'
|
|
|
- // fieldNames={{ label: 'name', value: 'id', children: 'children' }}
|
|
|
+ fieldNames={{ label: 'name', value: 'id', children: 'children' }}
|
|
|
allowClear={false}
|
|
|
/>
|
|
|
</Form.Item>
|
|
@@ -342,17 +479,13 @@ function B3GaddNew({ nowSta, closeFu }: Props) {
|
|
|
<div className='B3NrowDing'>
|
|
|
<Form.Item
|
|
|
label='完残程度'
|
|
|
- name='ee3'
|
|
|
+ name='dictTorn'
|
|
|
rules={[{ required: true, message: '请选择完残程度' }]}
|
|
|
>
|
|
|
<Cascader
|
|
|
- options={[
|
|
|
- { value: '年代1', label: '年代11', children: [{ value: 1, label: 'xxx' }] },
|
|
|
- { value: '其他', label: '其他' }
|
|
|
- ]}
|
|
|
- changeOnSelect
|
|
|
+ options={cascaderObj['完残程度']}
|
|
|
placeholder='请选择'
|
|
|
- // fieldNames={{ label: 'name', value: 'id', children: 'children' }}
|
|
|
+ fieldNames={{ label: 'name', value: 'id', children: 'children' }}
|
|
|
allowClear={false}
|
|
|
/>
|
|
|
</Form.Item>
|
|
@@ -368,8 +501,8 @@ function B3GaddNew({ nowSta, closeFu }: Props) {
|
|
|
isLook={false}
|
|
|
fileCheck={false}
|
|
|
size={5}
|
|
|
- dirCode={'xxxxx'}
|
|
|
- myUrl='xxxxxxx'
|
|
|
+ dirCode='goodsAdd'
|
|
|
+ myUrl='cms/goods/upload'
|
|
|
format={['image/jpeg', 'image/png']}
|
|
|
formatTxt='png、jpg和jpeg'
|
|
|
checkTxt='请上传封面图!'
|
|
@@ -380,43 +513,43 @@ function B3GaddNew({ nowSta, closeFu }: Props) {
|
|
|
</div>
|
|
|
|
|
|
<div className='B3Nrow'>
|
|
|
- <Form.Item label='完残情况' name='bbbb'>
|
|
|
+ <Form.Item label='完残情况' name='torn'>
|
|
|
<TextArea maxLength={500} showCount placeholder='请输入内容' />
|
|
|
</Form.Item>
|
|
|
</div>
|
|
|
|
|
|
<div className='B3Nrow'>
|
|
|
- <Form.Item label='保存状态' name='bbbb'>
|
|
|
+ <Form.Item label='保存状态' name='preserveState'>
|
|
|
<TextArea maxLength={500} showCount placeholder='请输入内容' />
|
|
|
</Form.Item>
|
|
|
</div>
|
|
|
|
|
|
<div className='B3Nrow'>
|
|
|
- <Form.Item label='色泽' name='bbbb'>
|
|
|
+ <Form.Item label='色泽' name='color'>
|
|
|
<TextArea maxLength={500} showCount placeholder='请输入内容' />
|
|
|
</Form.Item>
|
|
|
</div>
|
|
|
|
|
|
<div className='B3Nrow'>
|
|
|
- <Form.Item label='用途' name='bbbb'>
|
|
|
+ <Form.Item label='用途' name='uses'>
|
|
|
<TextArea maxLength={500} showCount placeholder='请输入内容' />
|
|
|
</Form.Item>
|
|
|
</div>
|
|
|
|
|
|
<div className='B3Nrow'>
|
|
|
- <Form.Item label='形状描述' name='bbbb'>
|
|
|
+ <Form.Item label='形状描述' name='shape'>
|
|
|
<TextArea maxLength={500} showCount placeholder='请输入内容' />
|
|
|
</Form.Item>
|
|
|
</div>
|
|
|
|
|
|
<div className='B3Nrow B3Nrow2'>
|
|
|
- <Form.Item label='著者' name='bbbb'>
|
|
|
+ <Form.Item label='著者' name='pressAuthor'>
|
|
|
<Input maxLength={30} showCount placeholder='请输入内容' />
|
|
|
</Form.Item>
|
|
|
- <Form.Item label='版本' name='bbbb'>
|
|
|
+ <Form.Item label='版本' name='pressVersion'>
|
|
|
<Input maxLength={30} showCount placeholder='请输入内容' />
|
|
|
</Form.Item>
|
|
|
- <Form.Item label='存卷' name='bbbb'>
|
|
|
+ <Form.Item label='存卷' name='pressFile'>
|
|
|
<Input maxLength={30} showCount placeholder='请输入内容' />
|
|
|
</Form.Item>
|
|
|
</div>
|
|
@@ -427,10 +560,10 @@ function B3GaddNew({ nowSta, closeFu }: Props) {
|
|
|
<div className='formRight'>
|
|
|
<ZRichTexts
|
|
|
check={false}
|
|
|
- dirCode={'xxxxxxxx'}
|
|
|
+ dirCode='goodsAdd'
|
|
|
+ myUrl='cms/goods/upload'
|
|
|
isLook={false}
|
|
|
ref={ZRichTextRef}
|
|
|
- myUrl='xxxxxxxxxx'
|
|
|
isOne={true}
|
|
|
upAudioBtnNone={true}
|
|
|
/>
|
|
@@ -441,27 +574,24 @@ function B3GaddNew({ nowSta, closeFu }: Props) {
|
|
|
{/* =====上传附件==== */}
|
|
|
<div className='B3Nbox B3Nbox1'>
|
|
|
<div className='B3Ntit'>
|
|
|
- 相关附件  <Button type='primary'>上传附件</Button>
|
|
|
+ <div className='B3Ntitll'>相关附件</div>
|
|
|
+ <Z3upFiles
|
|
|
+ max={1000}
|
|
|
+ isLook={false}
|
|
|
+ ref={filesRef}
|
|
|
+ fileCheck={false}
|
|
|
+ dirCode='goodsAdd'
|
|
|
+ myUrl='cms/goods/upload'
|
|
|
+ lookData={[]}
|
|
|
+ size={500}
|
|
|
+ noShowList={true}
|
|
|
+ fileRes={obj => setTable([obj, ...table])}
|
|
|
+ />
|
|
|
</div>
|
|
|
|
|
|
{/* 表格 */}
|
|
|
<MyTable
|
|
|
- list={[
|
|
|
- {
|
|
|
- id: 1,
|
|
|
- type: '图像',
|
|
|
- src: 'https://houseoss.4dkankan.com/project/DEMO/staticResource/touxiang.jpg'
|
|
|
- },
|
|
|
- {
|
|
|
- id: 2,
|
|
|
- type: '视频',
|
|
|
- src: 'https://houseoss.4dkankan.com/project/DEMO/staticResource/loop.mp4'
|
|
|
- },
|
|
|
- {
|
|
|
- id: 3,
|
|
|
- type: '3D'
|
|
|
- }
|
|
|
- ]}
|
|
|
+ list={table}
|
|
|
columnsTemp={Y33tableC('新增')}
|
|
|
lastBtn={tableLastBtn}
|
|
|
startBtn={startBtn}
|
|
@@ -475,26 +605,37 @@ function B3GaddNew({ nowSta, closeFu }: Props) {
|
|
|
<div className='formRow formRow2'>
|
|
|
<div className='formLeft'>尺寸:</div>
|
|
|
<div className='formRight formRightSize'>
|
|
|
- <Form.Item label='通长' name='qqqq'>
|
|
|
- <InputNumber min={0} precision={2} placeholder='请输入数字,最多两位小数' />
|
|
|
+ <Form.Item label='通长' name='sizeL'>
|
|
|
+ <InputNumber
|
|
|
+ min={0}
|
|
|
+ max={99999999}
|
|
|
+ precision={2}
|
|
|
+ placeholder='请输入数字,最多两位小数'
|
|
|
+ />
|
|
|
</Form.Item>
|
|
|
|
|
|
- <Form.Item label='通宽' name='qqqq'>
|
|
|
- <InputNumber min={0} precision={2} placeholder='请输入数字,最多两位小数' />
|
|
|
+ <Form.Item label='通宽' name='sizeW'>
|
|
|
+ <InputNumber
|
|
|
+ min={0}
|
|
|
+ max={99999999}
|
|
|
+ precision={2}
|
|
|
+ placeholder='请输入数字,最多两位小数'
|
|
|
+ />
|
|
|
</Form.Item>
|
|
|
- <Form.Item label='通高' name='qqqq'>
|
|
|
- <InputNumber min={0} precision={2} placeholder='请输入数字,最多两位小数' />
|
|
|
+ <Form.Item label='通高' name='sizeH'>
|
|
|
+ <InputNumber
|
|
|
+ min={0}
|
|
|
+ max={99999999}
|
|
|
+ precision={2}
|
|
|
+ placeholder='请输入数字,最多两位小数'
|
|
|
+ />
|
|
|
</Form.Item>
|
|
|
|
|
|
- <Form.Item name='eee9'>
|
|
|
+ <Form.Item name='sizeUnit'>
|
|
|
<Cascader
|
|
|
- options={[
|
|
|
- { value: '年代1', label: '年代11', children: [{ value: 1, label: 'xxx' }] },
|
|
|
- { value: '其他', label: '其他' }
|
|
|
- ]}
|
|
|
- changeOnSelect
|
|
|
- placeholder='请选择单位'
|
|
|
- // fieldNames={{ label: 'name', value: 'id', children: 'children' }}
|
|
|
+ options={cascaderObj['尺寸单位']}
|
|
|
+ placeholder='请选择'
|
|
|
+ fieldNames={{ label: 'name', value: 'id', children: 'children' }}
|
|
|
/>
|
|
|
</Form.Item>
|
|
|
</div>
|
|
@@ -503,33 +644,39 @@ function B3GaddNew({ nowSta, closeFu }: Props) {
|
|
|
<div className='B3Nrow'>
|
|
|
<Form.Item
|
|
|
label='质量范围'
|
|
|
- name='bbbb'
|
|
|
+ name='qualityDictScope'
|
|
|
rules={[{ required: true, message: '请选择质量范围' }]}
|
|
|
>
|
|
|
- <Select placeholder='请选择' />
|
|
|
+ <Cascader
|
|
|
+ options={cascaderObj['质量范围']}
|
|
|
+ placeholder='请选择'
|
|
|
+ fieldNames={{ label: 'name', value: 'id', children: 'children' }}
|
|
|
+ allowClear={false}
|
|
|
+ />
|
|
|
</Form.Item>
|
|
|
|
|
|
<div className='B3NrowDing B3NrowDing2'>
|
|
|
- <Form.Item label='具体质量' name='qqqq'>
|
|
|
- <InputNumber min={0} precision={2} placeholder='请输入数字,最多两位小数' />
|
|
|
+ <Form.Item label='具体质量' name='quality'>
|
|
|
+ <InputNumber
|
|
|
+ min={0}
|
|
|
+ max={99999999}
|
|
|
+ precision={2}
|
|
|
+ placeholder='请输入数字,最多两位小数'
|
|
|
+ />
|
|
|
</Form.Item>
|
|
|
|
|
|
- <Form.Item name='prefix'>
|
|
|
+ <Form.Item name='qualityUnit'>
|
|
|
<Cascader
|
|
|
- options={[
|
|
|
- { value: '年代1', label: '年代11', children: [{ value: 1, label: 'xxx' }] },
|
|
|
- { value: '其他', label: '其他' }
|
|
|
- ]}
|
|
|
- changeOnSelect
|
|
|
- placeholder='请选择单位'
|
|
|
- // fieldNames={{ label: 'name', value: 'id', children: 'children' }}
|
|
|
+ options={cascaderObj['质量单位']}
|
|
|
+ placeholder='请选择'
|
|
|
+ fieldNames={{ label: 'name', value: 'id', children: 'children' }}
|
|
|
/>
|
|
|
</Form.Item>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<div className='B3Nrow'>
|
|
|
- <Form.Item label='具体尺寸' name='bbbb'>
|
|
|
+ <Form.Item label='具体尺寸' name='sizeInfo'>
|
|
|
<TextArea maxLength={500} showCount placeholder='请输入内容' />
|
|
|
</Form.Item>
|
|
|
</div>
|
|
@@ -539,18 +686,18 @@ function B3GaddNew({ nowSta, closeFu }: Props) {
|
|
|
|
|
|
<div className='B3Nbox'>
|
|
|
<div className='B3Nrow'>
|
|
|
- <Form.Item label='入馆凭证号' name='bbbb'>
|
|
|
+ <Form.Item label='入馆凭证号' name='inHouseNum'>
|
|
|
<Input maxLength={30} showCount placeholder='请输入内容' />
|
|
|
</Form.Item>
|
|
|
</div>
|
|
|
<div className='B3Nrow'>
|
|
|
- <Form.Item label='入藏凭证号' name='bbbb'>
|
|
|
+ <Form.Item label='入藏凭证号' name='inGoodsNum'>
|
|
|
<Input maxLength={30} showCount placeholder='请输入内容' />
|
|
|
</Form.Item>
|
|
|
</div>
|
|
|
|
|
|
<div className='B3Nrow'>
|
|
|
- <Form.Item label='入藏日期' name='bbbb'>
|
|
|
+ <Form.Item label='入藏日期' name='inGoodsDate'>
|
|
|
<DatePicker placeholder='请选择日期' />
|
|
|
</Form.Item>
|
|
|
</div>
|
|
@@ -559,14 +706,13 @@ function B3GaddNew({ nowSta, closeFu }: Props) {
|
|
|
<Form.Item
|
|
|
label='入藏日期范围'
|
|
|
className='B3NlongTxt'
|
|
|
- name='bbbb'
|
|
|
+ name='inDictDateScope'
|
|
|
rules={[{ required: true, message: '请选择入藏日期范围' }]}
|
|
|
>
|
|
|
<Cascader
|
|
|
- changeOnSelect
|
|
|
- options={[]}
|
|
|
+ options={cascaderObj['入藏日期范围']}
|
|
|
placeholder='请选择'
|
|
|
- // fieldNames={{ label: 'name', value: 'id', children: 'children' }}
|
|
|
+ fieldNames={{ label: 'name', value: 'id', children: 'children' }}
|
|
|
allowClear={false}
|
|
|
/>
|
|
|
</Form.Item>
|
|
@@ -575,37 +721,36 @@ function B3GaddNew({ nowSta, closeFu }: Props) {
|
|
|
<div className='B3Nrow formRow2'>
|
|
|
<Form.Item
|
|
|
label='来源'
|
|
|
- name='bbbb'
|
|
|
+ name='source'
|
|
|
rules={[{ required: true, message: '请选择来源' }]}
|
|
|
>
|
|
|
<Cascader
|
|
|
- changeOnSelect
|
|
|
- options={[]}
|
|
|
+ options={cascaderObj['来源']}
|
|
|
placeholder='请选择'
|
|
|
- // fieldNames={{ label: 'name', value: 'id', children: 'children' }}
|
|
|
+ fieldNames={{ label: 'name', value: 'id', children: 'children' }}
|
|
|
allowClear={false}
|
|
|
/>
|
|
|
</Form.Item>
|
|
|
</div>
|
|
|
|
|
|
<div className='B3Nrow'>
|
|
|
- <Form.Item label='来源详情' name='bbbb'>
|
|
|
+ <Form.Item label='来源详情' name='sourceInfo'>
|
|
|
<TextArea maxLength={500} showCount placeholder='请输入内容' />
|
|
|
</Form.Item>
|
|
|
</div>
|
|
|
|
|
|
<div className='B3Nrow'>
|
|
|
- <Form.Item label='征集经过' name='bbbb'>
|
|
|
+ <Form.Item label='征集经过' name='sourcePass'>
|
|
|
<TextArea maxLength={500} showCount placeholder='请输入内容' />
|
|
|
</Form.Item>
|
|
|
</div>
|
|
|
<div className='B3Nrow'>
|
|
|
- <Form.Item label='铭记题跋' name='bbbb'>
|
|
|
+ <Form.Item label='铭记题跋' name='sourcePreface'>
|
|
|
<TextArea maxLength={500} showCount placeholder='请输入内容' />
|
|
|
</Form.Item>
|
|
|
</div>
|
|
|
<div className='B3Nrow'>
|
|
|
- <Form.Item label='鉴藏印记' name='bbbb'>
|
|
|
+ <Form.Item label='鉴藏印记' name='sourceStamp'>
|
|
|
<TextArea maxLength={500} showCount placeholder='请输入内容' />
|
|
|
</Form.Item>
|
|
|
</div>
|
|
@@ -615,12 +760,12 @@ function B3GaddNew({ nowSta, closeFu }: Props) {
|
|
|
|
|
|
<div className='B3Nbox'>
|
|
|
<div className='B3Nrow'>
|
|
|
- <Form.Item label='著作及有关书目' className='B3NlongTxt2' name='bbbb'>
|
|
|
+ <Form.Item label='著作及有关书目' className='B3NlongTxt2' name='historyWork'>
|
|
|
<TextArea maxLength={500} showCount placeholder='请输入内容' />
|
|
|
</Form.Item>
|
|
|
</div>
|
|
|
<div className='B3Nrow'>
|
|
|
- <Form.Item label='流传经历' name='yyyy'>
|
|
|
+ <Form.Item label='流传经历' name='historyUndergo'>
|
|
|
<TextArea maxLength={500} showCount placeholder='请输入内容' />
|
|
|
</Form.Item>
|
|
|
</div>
|