From 4bdf085a350b9b625e2b0a56cdc6ac615504a050 Mon Sep 17 00:00:00 2001 From: Jimmy Liow Date: Thu, 4 Jul 2024 14:12:09 +0800 Subject: [PATCH 1/6] =?UTF-8?q?feat:=20=E5=BC=80=E5=8F=91=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E4=B8=8D=E5=8A=A0=E8=BD=BD=20PageSpy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 6 +++++- src/pageSpy/index.jsx | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 38d3a02..1f070c7 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,12 @@ Global Highlights Hub 海外供应商平台 npm version [ | major | minor | patch | premajor | preminor | prepatch | prerelease | from-git] npm version premajor --no-git-tag-version -npm version prerelease --no-git-tag-version +1.0.0 -> 2.0.0-0 +--preid beta | alpha | rc +npm version prerelease --preid beta --no-git-tag-version +2.0.0-0 -> 2.0.0-1 -> 2.0.0-2 ..n -> 2.0.0-n npm version patch --no-git-tag-version +2.0.0-n -> 2.0.0 "push:tag": "npm version patch && git.exe push --progress "origin" main:main" "push:tag": "npm version patch && git push origin master" diff --git a/src/pageSpy/index.jsx b/src/pageSpy/index.jsx index 0bfcd65..10c4c03 100644 --- a/src/pageSpy/index.jsx +++ b/src/pageSpy/index.jsx @@ -3,7 +3,7 @@ import { PROJECT_NAME } from '@/config'; export const loadPageSpy = (title) => { - if (window.$pageSpy) return + if (import.meta.env.DEV || window.$pageSpy) return const PageSpySrc = [ 'https://page-spy.mycht.cn/page-spy/index.min.js', From eca38ae6116335aa991cb0fb9f4ec284b6c0522b Mon Sep 17 00:00:00 2001 From: Jimmy Liow Date: Thu, 4 Jul 2024 14:14:58 +0800 Subject: [PATCH 2/6] 2.0.0-alpha.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 79be5b1..ac1a9b2 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "global-highlights-hub", "private": true, - "version": "2.0.0-0", + "version": "2.0.0-alpha.0", "type": "module", "scripts": { "dev": "vite", From 4fb6273ed10c01acb04c033b48df241d0289ff60 Mon Sep 17 00:00:00 2001 From: Lei OT Date: Thu, 4 Jul 2024 14:16:17 +0800 Subject: [PATCH 3/6] # --- src/views/products/Detail.jsx | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/views/products/Detail.jsx b/src/views/products/Detail.jsx index 57cd8e7..1b8ba14 100644 --- a/src/views/products/Detail.jsx +++ b/src/views/products/Detail.jsx @@ -307,7 +307,7 @@ function Detail() { const handleBatchImportOK = () => { setBatchImportPriceVisible(false); } - + const EditableCell = ({ editing, dataIndex, title, inputType, record, children, handleDateSelect, ...restProps }) => { let inputNode = inputType === 'number' ? : ; @@ -422,14 +422,14 @@ const handleBatchImportOK = () => { const editable = isEditing(record); return editable ? ( - handleSave(record.id)} style={{ marginRight: 8 }}>{t('products:save')} - {t('products:cancel')} + handleSave(record.id)} style={{ marginRight: 8 }}>{t('Save')} + {t('Cancel')} ) : ( - edit(record)} style={{ marginRight: 8 }}>{t('products:edit')} - handleDelete(record.id)}> - {t('products:delete')} + edit(record)} style={{ marginRight: 8 }}>{t('Edit')} + handleDelete(record.id)}> + {t('Delete')} ); @@ -514,7 +514,7 @@ const handleBatchImportOK = () => { if (selectedNodeid === node.key) return; const fatherKey = node.key.split('-')[0]; setSelectedCategory(productProject[fatherKey]) - + console.log("remainderLanguage",remainderLanguage) let initialQuotationData = null; let infoData = null; @@ -596,16 +596,16 @@ const handleBatchImportOK = () => { style={{ width: "80%" }} title={ 供应商 }, + // { title: 供应商 }, { title: 综费 }, { title: '文章列表' } ]} /> } > -

{t('products:productProject')}

+

{t('products:EditComponents.info')}

{selectedCategory.map((item, index) => ( - + {item.code === "duration" ? ( @@ -621,6 +621,7 @@ const handleBatchImportOK = () => {
{tags.map(tag => ( handleTagClick(tag)} color={tag === selectedTag ? 'blue' : undefined} @@ -681,7 +682,7 @@ const handleBatchImportOK = () => { - + @@ -692,7 +693,7 @@ const handleBatchImportOK = () => { + + {/* {t('Cancel')} */} ) : ( @@ -534,6 +540,8 @@ const handleBatchImportOK = () => { setSelectedCategory(productProject[fatherKey]) console.log("remainderLanguage",remainderLanguage) + setEditingProduct(node._raw); + let initialQuotationData = null; let infoData = null; let lgcDetailsData = null; @@ -594,8 +602,8 @@ const handleBatchImportOK = () => { return (
- - + + {
供应商 }, { title: 综费 }, - { title: '文章列表' } + { title: editingProduct?.info?.title || t('New') } ]} /> } > @@ -624,7 +632,7 @@ const handleBatchImportOK = () => { {selectedCategory.map((item, index) => ( - + {item.code === "duration" ? ( ) : ( @@ -684,12 +692,12 @@ const handleBatchImportOK = () => { /> - + {/* */} - + {/* */}

{t('products:supplierQuotation')}

- { - - - - + + + + + {/* */} + + {/* */} - - - @@ -730,7 +738,7 @@ const handleBatchImportOK = () => { )} - + { batchImportPriceVisible && ( From 06db76ce86e1e6758890392bbf7d47e8dc1a31b8 Mon Sep 17 00:00:00 2001 From: Lei OT Date: Thu, 4 Jul 2024 17:18:16 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/locales/en/products.json | 2 +- public/locales/zh/products.json | 2 +- src/main.jsx | 1 + src/views/products/Manage.jsx | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/public/locales/en/products.json b/public/locales/en/products.json index 7380d76..03bdb46 100644 --- a/public/locales/en/products.json +++ b/public/locales/en/products.json @@ -13,7 +13,7 @@ "EditComponents": { "info": "Product Information", "Quotation": "Quotation", - "Extras": "Add-on" + "Extras": "Components" }, "auditState": { "New": "New", diff --git a/public/locales/zh/products.json b/public/locales/zh/products.json index c0cd87e..dd07133 100644 --- a/public/locales/zh/products.json +++ b/public/locales/zh/products.json @@ -13,7 +13,7 @@ "EditComponents": { "info": "产品信息", "Quotation": "报价", - "Extras": "附加项目" + "Extras": "绑定项目" }, "auditState": { "New": "新增", diff --git a/src/main.jsx b/src/main.jsx index 9129087..ec6f14b 100644 --- a/src/main.jsx +++ b/src/main.jsx @@ -72,6 +72,7 @@ const initRouter = async () => { { path: "products",element: }, { path: "products/:travel_agency_id/:use_year/:audit_state/audit",element:}, { path: "products/:travel_agency_id/:use_year/:audit_state/edit",element:}, + { path: "products/edit",element:}, ] }, { diff --git a/src/views/products/Manage.jsx b/src/views/products/Manage.jsx index 524a4ea..0a58e1d 100644 --- a/src/views/products/Manage.jsx +++ b/src/views/products/Manage.jsx @@ -77,6 +77,7 @@ function Index() { agency: { col: 4 }, dates: { label: t('products:CreateDate') }, keyword: { label: t('products:Title'), col: 4 }, + year: { col: 4 }, }, sort: { agency: 1, audit_state: 2, keyword: 100 }, }}