From bd5269f3f712393a202469f30321465658f7aff0 Mon Sep 17 00:00:00 2001 From: Jimmy Liow Date: Thu, 15 Aug 2024 11:59:28 +0800 Subject: [PATCH 1/7] =?UTF-8?q?feat:=20=E7=BC=96=E8=BE=91=E8=B4=A6?= =?UTF-8?q?=E5=8F=B7=E6=90=9C=E7=B4=A2=E4=BE=9B=E5=BA=94=E5=95=86=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E9=98=B2=E6=8A=96=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/account/Management.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/account/Management.jsx b/src/views/account/Management.jsx index 6f88084..2d337d6 100644 --- a/src/views/account/Management.jsx +++ b/src/views/account/Management.jsx @@ -1,7 +1,7 @@ import SearchForm from '@/components/SearchForm' import useAccountStore, { fetchRoleList, fetchTravelAgencyByName, genRandomPassword } from '@/stores/Account' import useFormStore from '@/stores/Form' -import { isEmpty } from '@/utils/commons' +import { isEmpty, debounce } from '@/utils/commons' import { ExclamationCircleFilled } from '@ant-design/icons' import { App, Button, Col, Form, Input, Modal, Row, Select, Space, Table, Typography, Switch } from 'antd' import dayjs from 'dayjs' @@ -299,7 +299,7 @@ function Management() { loading={dataLoading} showSearch filterOption={false} - onSearch={handleTravelAgencySearch} + onSearch={debounce(handleTravelAgencySearch, 800)} notFoundContent={null} > From be31765e447622795d9c9263f712612de4cab712 Mon Sep 17 00:00:00 2001 From: Lei OT Date: Thu, 15 Aug 2024 14:01:53 +0800 Subject: [PATCH 2/7] =?UTF-8?q?fix:=20=E4=BA=A7=E5=93=81=E7=AE=A1=E7=90=86?= =?UTF-8?q?:=20=E5=A4=B4=E9=83=A8,=20=E5=AE=A1=E6=A0=B8=E5=8F=91=E5=B8=83/?= =?UTF-8?q?=E6=8B=92=E7=BB=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/stores/Products/Index.js | 14 ++++++++++++++ src/views/products/Detail/Header.jsx | 12 ++++++------ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/src/stores/Products/Index.js b/src/stores/Products/Index.js index add4d20..33e128a 100644 --- a/src/stores/Products/Index.js +++ b/src/stores/Products/Index.js @@ -82,6 +82,20 @@ export const postProductsQuoteAuditAction = async (auditState, quoteRow) => { // return errcode !== 0 ? {} : result; }; +export const postAgencyProductsAuditAction = async (auditState, agency) => { + const postbody = { + audit_state: auditState, + travel_agency_id: agency.travel_agency_id, + use_year: agency.use_year, + }; + const formData = new FormData(); + Object.keys(postbody).forEach((key) => { + formData.append(key, postbody[key]); + }); + const json = await postForm(`${HT_HOST}/Service_BaseInfoWeb/agency_products_audit`, formData); + return json; +}; + /** * 供应商提交审核 */ diff --git a/src/views/products/Detail/Header.jsx b/src/views/products/Detail/Header.jsx index debeba0..42d7f27 100644 --- a/src/views/products/Detail/Header.jsx +++ b/src/views/products/Detail/Header.jsx @@ -4,7 +4,7 @@ import { App, Button, Divider, Popconfirm, Select } from 'antd'; import { ReloadOutlined } from '@ant-design/icons'; import { useProductsAuditStatesMapVal } from '@/hooks/useProductsSets'; import { useTranslation } from 'react-i18next'; -import useProductsStore, { postProductsQuoteAuditAction, postAgencyAuditAction } from '@/stores/Products/Index'; +import useProductsStore, { postAgencyProductsAuditAction, postAgencyAuditAction } from '@/stores/Products/Index'; import { isEmpty, objectMapper } from '@/utils/commons'; import useAuthStore from '@/stores/Auth'; import RequireAuth from '@/components/RequireAuth'; @@ -74,8 +74,8 @@ const Header = ({ refresh, ...props }) => { setParam((pre) => ({ ...pre, ...{ pick_agency: value } })); }; - const handleAuditItem = (state, row) => { - postProductsQuoteAuditAction(state, { id: row.id, travel_agency_id: activeAgency.travel_agency_id }) + const handleAuditAgency = (state) => { + postAgencyProductsAuditAction(state, { travel_agency_id: activeAgency.travel_agency_id, use_year: switchParams.use_year }) .then((json) => { if (json.errcode === 0) { message.success(json.errmsg); @@ -157,15 +157,15 @@ const Header = ({ refresh, ...props }) => { )} - - {/* */} - From 5aec058060dde70b2379496985d5d570c4064d49 Mon Sep 17 00:00:00 2001 From: Jimmy Liow Date: Thu, 15 Aug 2024 14:09:00 +0800 Subject: [PATCH 3/7] 2.0.0-beta.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1806dcd..459544b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "global-highlights-hub", "private": true, - "version": "2.0.0-beta.3", + "version": "2.0.0-beta.4", "type": "module", "scripts": { "dev": "vite", From 40053efbe89c963dff13e40b6b12bba58284f5cc Mon Sep 17 00:00:00 2001 From: Lei OT Date: Fri, 16 Aug 2024 14:07:08 +0800 Subject: [PATCH 4/7] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E4=BB=B7=E6=A0=BC?= =?UTF-8?q?,=20=E9=87=8D=E7=BD=AE=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/stores/Products/Index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/stores/Products/Index.js b/src/stores/Products/Index.js index 182be8c..98f4cc0 100644 --- a/src/stores/Products/Index.js +++ b/src/stores/Products/Index.js @@ -277,6 +277,7 @@ export const useProductsStore = create( return { ...prevQuotation, + audit_state_id: -1, adult_cost: formValues.adult_cost, child_cost: formValues.child_cost, currency: formValues.currency, From 03173157c756306604d2750d980fc9d227a6ca2c Mon Sep 17 00:00:00 2001 From: Lei OT Date: Fri, 16 Aug 2024 14:16:11 +0800 Subject: [PATCH 5/7] style: --- src/views/products/Audit.jsx | 3 ++- tailwind.config.js | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/views/products/Audit.jsx b/src/views/products/Audit.jsx index d0af5d4..ca95ccd 100644 --- a/src/views/products/Audit.jsx +++ b/src/views/products/Audit.jsx @@ -55,7 +55,8 @@ const PriceTable = ({ productType, dataSource, refresh }) => { const trCls = tri%2 !== 0 ? ' bg-stone-50' : ''; // 奇偶行 const [infoI, quoteI] = r.rowSpanI; const bigTrCls = quoteI === 0 && tri !== 0 ? 'border-collapse border-double border-0 border-t-4 border-stone-300' : ''; // 合并行双下划线 - const editedCls = (r.audit_state_id === 0 && isNotEmpty(r.lastedit_changed)) ? 'bg-red-100' : ''; // 待审核, 变更: 红色 + const editedCls = (r.audit_state_id === 0 && isNotEmpty(r.lastedit_changed)) ? '!bg-red-100' : ''; // 待审核, 变更: 红色 + const editedCls_ = isNotEmpty(r.lastedit_changed) ? (r.audit_state_id === 0 ? '!bg-red-100' : '!bg-sky-100') : ''; return [trCls, bigTrCls, editedCls].join(' '); }; diff --git a/tailwind.config.js b/tailwind.config.js index 14d963b..ae60bd0 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -6,6 +6,8 @@ export default { 'text-primary', 'text-danger', 'text-muted', + 'bg-red-100', + 'bg-sky-100', ], darkMode: 'media', theme: { From b285526dcbef386edf1a60c14ff79e47bb7576f8 Mon Sep 17 00:00:00 2001 From: Jimmy Liow Date: Tue, 20 Aug 2024 13:46:35 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=86=85=E9=83=A8?= =?UTF-8?q?=E6=B5=8B=E8=AF=95144=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.js b/src/config.js index 256e171..786bbfe 100644 --- a/src/config.js +++ b/src/config.js @@ -1,7 +1,7 @@ export const PROJECT_NAME = "GHHub"; // mode: test,内部测试使用 -export const HT_HOST = import.meta.env.MODE === 'test' ? 'http://202.103.68.144:890' : import.meta.env.PROD ? "https://p9axztuwd7x8a7.mycht.cn" : 'http://202.103.68.144:890' +export const HT_HOST = import.meta.env.MODE === 'test' ? 'http://120.79.9.217:10024' : import.meta.env.PROD ? 'https://p9axztuwd7x8a7.mycht.cn' : 'http://202.103.68.144:890' export const DATE_FORMAT = "YYYY-MM-DD"; From 663dbfcc50c901bf4ca821c375d235364a06badb Mon Sep 17 00:00:00 2001 From: Jimmy Liow Date: Tue, 20 Aug 2024 13:47:41 +0800 Subject: [PATCH 7/7] 2.0.0-beta.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 459544b..e6681c7 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "global-highlights-hub", "private": true, - "version": "2.0.0-beta.4", + "version": "2.0.0-beta.5", "type": "module", "scripts": { "dev": "vite",