|
|
|
@ -19,8 +19,6 @@ const batchSetupInitialValues = {
|
|
|
|
|
'unitId': '0',
|
|
|
|
|
'currency': 'RMB',
|
|
|
|
|
'weekend': [
|
|
|
|
|
'5',
|
|
|
|
|
'6'
|
|
|
|
|
],
|
|
|
|
|
'priceList': [
|
|
|
|
|
{
|
|
|
|
@ -65,8 +63,6 @@ const batchSetupInitialValues = {
|
|
|
|
|
'unitId': '0',
|
|
|
|
|
'currency': 'RMB',
|
|
|
|
|
'weekend': [
|
|
|
|
|
'5',
|
|
|
|
|
'6'
|
|
|
|
|
],
|
|
|
|
|
'priceList': [
|
|
|
|
|
{
|
|
|
|
@ -122,8 +118,6 @@ const defaultDefinitionValue = {
|
|
|
|
|
'unitId': '0',
|
|
|
|
|
'currency': 'RMB',
|
|
|
|
|
'weekend': [
|
|
|
|
|
'5',
|
|
|
|
|
'6'
|
|
|
|
|
],
|
|
|
|
|
'priceList': [
|
|
|
|
|
defaultPriceValue
|
|
|
|
@ -144,8 +138,8 @@ const ProductInfoQuotation = ({ editable, ...props }) => {
|
|
|
|
|
|
|
|
|
|
const datePresets = useDatePresets()
|
|
|
|
|
|
|
|
|
|
const [quotationList, newEmptyQuotation, appendQuotationList, saveOrUpdateQuotation, deleteQuotationById] =
|
|
|
|
|
useProductsStore((state) => [state.quotationList, state.newEmptyQuotation, state.appendQuotationList, state.saveOrUpdateQuotation, state.deleteQuotationById])
|
|
|
|
|
const [quotationList, newEmptyQuotation, appendQuotationList, saveOrUpdateQuotation, deleteQuotation] =
|
|
|
|
|
useProductsStore((state) => [state.quotationList, state.newEmptyQuotation, state.appendQuotationList, state.saveOrUpdateQuotation, state.deleteQuotation])
|
|
|
|
|
|
|
|
|
|
const triggerChange = (changedValue) => {
|
|
|
|
|
onChange?.(
|
|
|
|
@ -180,13 +174,13 @@ const ProductInfoQuotation = ({ editable, ...props }) => {
|
|
|
|
|
setBatchSetupModalOpen(false)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const onDeleteQuotation = (quotationId) => {
|
|
|
|
|
const onDeleteQuotation = (quotation) => {
|
|
|
|
|
modal.confirm({
|
|
|
|
|
title: '请确认',
|
|
|
|
|
icon: <ExclamationCircleFilled />,
|
|
|
|
|
content: '你要删除这条价格吗?',
|
|
|
|
|
onOk() {
|
|
|
|
|
deleteQuotationById(quotationId)
|
|
|
|
|
deleteQuotation(quotation)
|
|
|
|
|
.catch(ex => {
|
|
|
|
|
notification.error({
|
|
|
|
|
message: 'Notification',
|
|
|
|
@ -236,7 +230,7 @@ const ProductInfoQuotation = ({ editable, ...props }) => {
|
|
|
|
|
return (
|
|
|
|
|
<Space>
|
|
|
|
|
<Button type='link' disabled={!_rowEditable} onClick={() => onQuotationSeleted(quotation)}>{t('Edit')}</Button>
|
|
|
|
|
<Button type='link' danger disabled={!_rowEditable} onClick={() => onDeleteQuotation(quotation.id)}>{t('Delete')}</Button>
|
|
|
|
|
<Button type='link' danger disabled={!_rowEditable} onClick={() => onDeleteQuotation(quotation)}>{t('Delete')}</Button>
|
|
|
|
|
</Space>
|
|
|
|
|
)
|
|
|
|
|
},
|
|
|
|
|