diff --git a/src/views/products/Detail/BatchImportPrice.jsx b/src/views/products/Detail/BatchImportPrice.jsx index ab56f58..3b7bdaa 100644 --- a/src/views/products/Detail/BatchImportPrice.jsx +++ b/src/views/products/Detail/BatchImportPrice.jsx @@ -2,7 +2,7 @@ import { useState } from 'react'; import { Button, Card, Checkbox, Table, Col, Flex, DatePicker, Typography, Form, Input, Row, Select, Space } from 'antd'; import dayjs from "dayjs"; import { useTranslation } from 'react-i18next'; -import { CloseOutlined, StarOutlined } from '@ant-design/icons'; +import { CloseOutlined, StarTwoTone, PlusOutlined } from '@ant-design/icons'; import { useDatePresets } from '@/hooks/useDatePresets'; const { Option } = Select; const { RangePicker } = DatePicker; @@ -268,6 +268,37 @@ const BatchImportPrice = ({ onBatchImportData }) => { ] } + const defaultPriceValue = { + "priceInput": { + "numberStart": 1, + "numberEnd": 2, + "audultPrice": 0, + "childrenPrice": 0 + } + } + + const defaultDefinitionValue = { + "useDate": [ + dayjs().add(1, 'year').subtract(2, "M").startOf("M"), dayjs().add(1, 'year').endOf("M") + ], + "unitName": "每人", + "currency": "CNY", + "weekend": [ + "5", + "6" + ], + "priceList": [ + { + "priceInput": { + "numberStart": 1, + "numberEnd": 2, + "audultPrice": 0, + "childrenPrice": 0 + } + }, + ] + } + return ( @@ -287,7 +318,7 @@ const BatchImportPrice = ({ onBatchImportData }) => { size="small" title={index==0?'旺季':index==1?'淡季':'其他'} key={field.key} - extra={index==0?null: { + extra={index==0?: { remove(field.name) }} />} > @@ -321,11 +352,11 @@ const BatchImportPrice = ({ onBatchImportData }) => { - {index==0?: priceOptList.remove(priceField.name)} />} + {index==0?: priceOptList.remove(priceField.name)} />} ))} - )} @@ -333,8 +364,8 @@ const BatchImportPrice = ({ onBatchImportData }) => { ))} - )}