From 2983dceab1d94e291d7ddb50dda709b468b9b90f Mon Sep 17 00:00:00 2001 From: YCC Date: Thu, 25 May 2023 14:28:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=98=BE=E7=A4=BA=E8=BD=AC=E4=B9=89=E5=90=8E?= =?UTF-8?q?=E7=9A=84html?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/stores/Invoice.js | 7 ------- src/utils/commons.js | 10 +++++++++- src/views/feedback/Index.jsx | 6 +++--- src/views/invoice/Index.jsx | 25 +++++++++---------------- src/views/notice/Detail.jsx | 4 +++- 5 files changed, 24 insertions(+), 28 deletions(-) diff --git a/src/stores/Invoice.js b/src/stores/Invoice.js index 97ddd23..885a9b9 100644 --- a/src/stores/Invoice.js +++ b/src/stores/Invoice.js @@ -74,7 +74,6 @@ class Invoice { FKState: data.FKState, }; }); - this.invoicePage.total = json.Result[0].TotalCount; } else { this.invoiceList = []; } @@ -222,12 +221,6 @@ class Invoice { }); } - invoicePage = { - current: 1, - size: 10, - total: 0, - }; - /* 测试数据 */ //账单列表范例数据 testData = [ diff --git a/src/utils/commons.js b/src/utils/commons.js index 82bfc79..2dd6b0d 100644 --- a/src/utils/commons.js +++ b/src/utils/commons.js @@ -121,4 +121,12 @@ export function clickUrl(url) { httpLink.href = url; httpLink.target = "_blank"; httpLink.click(); -} \ No newline at end of file +} + +export function escape2Html(str) { + var temp = document.createElement("div"); + temp.innerHTML = str; + var output = temp.innerText || temp.textContent; + temp = null; + return output; + } \ No newline at end of file diff --git a/src/views/feedback/Index.jsx b/src/views/feedback/Index.jsx index 2bba0b2..7e96d9f 100644 --- a/src/views/feedback/Index.jsx +++ b/src/views/feedback/Index.jsx @@ -31,6 +31,7 @@ const feedbackListColumns = [ { title: "Post Survey", dataIndex: "Average", + render: (text, record) => (text ? text : ""),//为0显示为空 sorter: (a, b) => b.Average - a.Average, }, { @@ -47,8 +48,7 @@ function Index() { const showTotal = total => `Total ${feedbackList.length} items`; useEffect(() => { - feedbackStore.searchFeedbackList(authStore.login.travelAgencyId, referenceNo, search_date_start.format(config.DATE_FORMAT), search_date_end.format(config.DATE_FORMAT) + " 23:59") - .catch(ex => { + feedbackStore.searchFeedbackList(authStore.login.travelAgencyId, referenceNo, search_date_start.format(config.DATE_FORMAT), search_date_end.format(config.DATE_FORMAT) + " 23:59").catch(ex => { // notification.error({ // message: `Error`, // description: ex.message, @@ -56,7 +56,7 @@ function Index() { // duration: 4, // }); console.log(ex.message); - }); + }); }, []); return ( diff --git a/src/views/invoice/Index.jsx b/src/views/invoice/Index.jsx index d4c927e..4f6bccf 100644 --- a/src/views/invoice/Index.jsx +++ b/src/views/invoice/Index.jsx @@ -12,10 +12,8 @@ const { Title } = Typography; function Index() { const { authStore, invoiceStore } = useStore(); - const { invoiceList, invoicePage, search_date_start, search_date_end } = invoiceStore; + const { invoiceList, search_date_start, search_date_end } = invoiceStore; const [groupNo, onGroupNoChange] = useState(""); - const [arrivalDateRange, onDateRangeChange] = useState([]); - const [dataLoading, setDataLoading] = useState(false); const { notification } = App.useApp(); const showTotal = total => `Total ${invoiceList.length} items`; @@ -26,24 +24,19 @@ function Index() { key: "GroupName", render: (text, record) => {text}, }, - { + { title: "Arrival Date", key: "LeftGDate", dataIndex: "LeftGDate", render: (text, record) => (isNotEmpty(text) ? formatDate(new Date(text)) : ""), }, { - title: "人数", - key: "PersonNum", - dataIndex: "PersonNum", - }, - { - title: "团总额", + title: "Total Amount", key: "AllMoney", dataIndex: "AllMoney", }, { - title: "账单状态", + title: "Status", key: "status", render: BillStatus, }, @@ -66,22 +59,22 @@ function Index() { initial={1} items={[ { - title: "提交", + title: "Submitted", //status: 'finish', icon: , }, { - title: "顾问", + title: "Travel Advisor", // status: 'finish', icon: , }, { - title: "财务", + title: "Finance Dept", //status: 'process', icon: , }, { - title: "Done", + title: "Paid", //status: 'wait', icon: , }, @@ -120,7 +113,7 @@ function Index() { - +
diff --git a/src/views/notice/Detail.jsx b/src/views/notice/Detail.jsx index 5c98f8c..2006a07 100644 --- a/src/views/notice/Detail.jsx +++ b/src/views/notice/Detail.jsx @@ -27,7 +27,9 @@ function Detail() { {noticeInfo.CCP_BLTitle}{noticeInfo.CCP_LastEditTime} - {noticeInfo.CCP_BLContent} + +
+
Back