diff --git a/package.json b/package.json index 5690759..180ec68 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "@supabase/supabase-js": "^2.38.4", "antd": "^5.11.0", "dnd-kit": "^0.0.2", + "html2pdf": "^0.0.11", "lodash": "^4.17.21", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 55189c1..ce2776e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -38,6 +38,9 @@ importers: dnd-kit: specifier: ^0.0.2 version: 0.0.2 + html2pdf: + specifier: ^0.0.11 + version: 0.0.11 lodash: specifier: ^4.17.21 version: 4.17.21 @@ -1386,6 +1389,9 @@ packages: resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} engines: {node: '>= 0.4'} + html2pdf@0.0.11: + resolution: {integrity: sha512-Kx3I5r7lazHZzZv5lDk59jQoTxqaEGlf2BcGNvzWGPQVu0hE8jYCk4hboksuaCvmMJPa0S0A+156ZbE71Wdo2w==} + ignore@5.3.2: resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} engines: {node: '>= 4'} @@ -4137,6 +4143,8 @@ snapshots: dependencies: function-bind: 1.1.2 + html2pdf@0.0.11: {} + ignore@5.3.2: {} immutable@5.0.3: {} diff --git a/src/pages/company/quotation/detail/index.jsx b/src/pages/company/quotation/detail/index.jsx index 222df4d..8e508fa 100644 --- a/src/pages/company/quotation/detail/index.jsx +++ b/src/pages/company/quotation/detail/index.jsx @@ -172,7 +172,7 @@ const QuotationForm = () => { if (data?.attributes) { const formData = { quataName: data.attributes.quataName, - customers: data.attributes.customers || [], + customers: data.attributes.customers.map((customer) => customer.id) || [], description: data.attributes.description, currency: data.attributes.currency || "CNY", sections: data.attributes.sections.map((section) => ({ @@ -716,7 +716,7 @@ const QuotationForm = () => { 客户名称} - rules={[{ required: true, message: "请选择至少一个客��" }]} + rules={[{ required: true, message: "请选择至少一个客户" }]} >