diff --git a/public/locales/en/products.json b/public/locales/en/products.json index 02689b7..b468364 100644 --- a/public/locales/en/products.json +++ b/public/locales/en/products.json @@ -56,7 +56,7 @@ "productProject": "Product project", "Code": "Code", "City": "City", - "Remarks": "Remarks", + "Remarks": "Memo", "tourTime": "Tour time", "recommendationRate": "Recommends rate", "Name": "Name", @@ -129,7 +129,7 @@ "DisplayToC": "Display Type", "KM": "KM", "Description": "Description", - "Remarks": "Remarks" + "Remarks": "Memo" }, "LgcModal": { diff --git a/src/hooks/useProductsSets.js b/src/hooks/useProductsSets.js index b83efad..b4e9abb 100644 --- a/src/hooks/useProductsSets.js +++ b/src/hooks/useProductsSets.js @@ -101,7 +101,7 @@ export const useProductsAuditStatesMapVal = (value) => { export const useProductsTypesFieldsets = (type) => { const [isPermitted] = useAuthStore((state) => [state.isPermitted]); const infoDefault = [['city'], ['title']]; - const infoAdmin = ['title', 'code', 'remarks', 'dept']; // 'display_to_c' + const infoAdmin = ['title', 'product_title', 'code', 'remarks', 'dept']; // 'display_to_c' const infoDisplay = isPermitted(PERM_PRODUCTS_MANAGEMENT) ? ['display_to_c'] : []; const infoRecDisplay = isPermitted(PERM_PRODUCTS_MANAGEMENT) ? ['recommends_rate'] : []; const infoTypesMap = { diff --git a/src/views/products/Detail/ProductInfo.jsx b/src/views/products/Detail/ProductInfo.jsx index 99806fc..87f148e 100644 --- a/src/views/products/Detail/ProductInfo.jsx +++ b/src/views/products/Detail/ProductInfo.jsx @@ -64,7 +64,7 @@ const ProductInfo = ({ ...props }) => { travel_agency_id: activeAgency.travel_agency_id, info: readyToSubInfo, lgc_details: Object.values(mergedLgc), - quotation: values.quotation, + quotation: values.quotation, // || editingProduct.quotation, // 没改动, 就用原来的 }).catch(ex => { setLoading(false); notification.error({ @@ -77,6 +77,7 @@ const ProductInfo = ({ ...props }) => { setLoading(false); success ? message.success(t('Success')) : message.error(t('Failed')); // 保存后更新数据 + // result.quotation = isEmpty(result.quotation) ? editingProduct.quotation : result.quotation; appendNewProduct(result); setEditingProduct(result); }; diff --git a/src/views/products/Detail/ProductInfoForm.jsx b/src/views/products/Detail/ProductInfoForm.jsx index c99cdef..68ef83f 100644 --- a/src/views/products/Detail/ProductInfoForm.jsx +++ b/src/views/products/Detail/ProductInfoForm.jsx @@ -35,6 +35,7 @@ const InfoForm = ({ onSubmit, onReset, onValuesChange, editable: _editable, show form.setFieldValue('dept', { value: editingProduct?.info?.dept_id, label: editingProduct?.info?.dept_name }); const lgc_details_mapped = (editingProduct?.lgc_details || []).reduce((r, c) => ({ ...r, [c.lgc]: c }), {}); form.setFieldValue('lgc_details_mapped', lgc_details_mapped); + form.setFieldValue('quotation', editingProduct?.quotation); const editable0 = isEmpty(editingProduct) ? false : _editable; // 空对象未操作 setEditable(editable0); @@ -135,7 +136,7 @@ const InfoForm = ({ onSubmit, onReset, onValuesChange, editable: _editable, show )} -