From be49d9cd02f38e43a336f29b4c89afbce7b04837 Mon Sep 17 00:00:00 2001 From: LiaoYijun Date: Fri, 15 Aug 2025 10:47:00 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E5=88=A0=E9=99=A4=E6=8A=A5=E4=BB=B7?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=20Popconfirm=EF=BC=9B=E6=96=B0=E6=8A=A5?= =?UTF-8?q?=E4=BB=B7=E9=BB=98=E8=AE=A4=E4=B8=8D=E5=88=86=E4=BA=BA=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../products/Detail/ProductInfoQuotation.jsx | 63 ++++++++----------- 1 file changed, 27 insertions(+), 36 deletions(-) diff --git a/src/views/products/Detail/ProductInfoQuotation.jsx b/src/views/products/Detail/ProductInfoQuotation.jsx index 54fbe5d..47cd2e0 100644 --- a/src/views/products/Detail/ProductInfoQuotation.jsx +++ b/src/views/products/Detail/ProductInfoQuotation.jsx @@ -13,6 +13,7 @@ import { DatePicker, Space, App, + Popconfirm, Tooltip, } from "antd"; import { useTranslation } from "react-i18next"; @@ -20,7 +21,6 @@ import { CloseOutlined, StarTwoTone, PlusOutlined, - ExclamationCircleFilled, QuestionCircleOutlined, } from "@ant-design/icons"; import { useDatePresets } from "@/hooks/useDatePresets"; @@ -179,7 +179,7 @@ const ProductInfoQuotation = ({ editable, ...props }) => { const [isBatchSetupModalOpen, setBatchSetupModalOpen] = useState(false); const [groupAllSize, setGroupAllSize] = useState(false); const [groupMaxUnlimit, setGroupMaxUnlimit] = useState(false); - const { modal, notification } = App.useApp(); + const { notification } = App.useApp(); const [quotationForm] = Form.useForm(); const [batchSetupForm] = Form.useForm(); @@ -206,6 +206,7 @@ const ProductInfoQuotation = ({ editable, ...props }) => { }; const onNewQuotation = () => { + setGroupAllSize(false); // 新报价不分人等 const emptyQuotation = newEmptyQuotation(defaultUseDates); quotationForm.setFieldsValue(emptyQuotation); setQuotationModalOpen(true); @@ -224,24 +225,6 @@ const ProductInfoQuotation = ({ editable, ...props }) => { setBatchSetupModalOpen(false); }; - const onDeleteQuotation = (quotation) => { - modal.confirm({ - title: "请确认", - icon: , - content: "你要删除这条价格吗?", - onOk() { - deleteQuotation(quotation).catch((ex) => { - notification.error({ - message: "Notification", - description: ex.message, - placement: "top", - duration: 4, - }); - }); - }, - }); - }; - const quotationColumns = [ // { title: 'id', dataIndex: 'id', width: 40, className: 'italic text-gray-400' }, // test: 0 // { title: 'WPI_SN', dataIndex: 'WPI_SN', width: 40, className: 'italic text-gray-400' }, // test: 0 @@ -256,10 +239,7 @@ const ProductInfoQuotation = ({ editable, ...props }) => { title: ( <> {t("products:unit_name")}{" "} - + @@ -282,7 +262,7 @@ const ProductInfoQuotation = ({ editable, ...props }) => { {t("products:use_dates")}{" "} @@ -290,7 +270,6 @@ const ProductInfoQuotation = ({ editable, ...props }) => { ), dataIndex: "use_dates", - // width: '6rem', render: (_, record) => `${record.use_dates_start}-${record.use_dates_end}`, }, @@ -301,25 +280,37 @@ const ProductInfoQuotation = ({ editable, ...props }) => { dataIndex: "operation", width: "10rem", render: (_, quotation) => { - // const _rowEditable = [-1,3].includes(quotation.audit_state_id); - const _rowEditable = true; // test: 0 return ( - + + ); },