From 347719f77dc2d62cb17b27b025e7194cffb9e9cb Mon Sep 17 00:00:00 2001 From: Jimmy Liow <18777396951@163.com> Date: Wed, 24 May 2023 15:19:58 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E5=9B=A2=E8=AE=A1=E5=88=92=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E6=90=9C=E7=B4=A2=E4=B8=BA=E7=A1=AE=E8=AE=A4=E7=8A=B6?= =?UTF-8?q?=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/stores/Auth.js | 1 + src/stores/Reservation.js | 3 ++- src/views/reservation/Newest.jsx | 10 ++++++---- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/stores/Auth.js b/src/stores/Auth.js index e248a6e..0c50211 100644 --- a/src/stores/Auth.js +++ b/src/stores/Auth.js @@ -11,6 +11,7 @@ class Auth { makeAutoObservable(this, { rootStore: false }); this.root = root; this.login.token = root.getSession(KEY_LOGIN_TOKEN); + console.info('Auth()'); } valdateUserPassword(usr, pwd) { diff --git a/src/stores/Reservation.js b/src/stores/Reservation.js index ada1565..d276ec4 100644 --- a/src/stores/Reservation.js +++ b/src/stores/Reservation.js @@ -10,7 +10,7 @@ class Reservation { this.root = root; } - fetchReservationList(current) { + fetchReservationList(current, status=null) { const fromDate = this.arrivalDateRange.length == 0 ? null : this.arrivalDateRange[0].format('YYYY-MM-DD'); const thruDate = this.arrivalDateRange.length == 0 ? null : this.arrivalDateRange[1].format('YYYY-MM-DD'); this.reservationPage.current = current; @@ -21,6 +21,7 @@ class Reservation { .append('GroupNo', this.referenceNo) .append('DateStart', fromDate) .append('DateEnd', thruDate) + .append('NotConfirm', status) .append('TotalNum', totalNum) .append('PageSize', this.reservationPage.size) .append('PageIndex', this.reservationPage.current) diff --git a/src/views/reservation/Newest.jsx b/src/views/reservation/Newest.jsx index cfd35e9..3849413 100644 --- a/src/views/reservation/Newest.jsx +++ b/src/views/reservation/Newest.jsx @@ -102,8 +102,9 @@ function Newest() { }); useEffect (() => { - if (location.search !== '?back') { - onSearchClick(); + if (location.search !== '?back') { + // 第一页,未确认计划 + onSearchClick(1, 1); } return () => { console.info('unmount...'); @@ -140,9 +141,10 @@ function Newest() { setDataLoading(false); }; - const onSearchClick = (current=1) => { + // 默认重新搜索第一页,所有状态的计划 + const onSearchClick = (current=1, status=null) => { setDataLoading(true); - reservationStore.fetchReservationList(current) + reservationStore.fetchReservationList(current, status) .catch(ex => { notification.error({ message: `Notification`, From 86af3ada306897826eab3e076a3125ff0741bf7e Mon Sep 17 00:00:00 2001 From: Jimmy Liow <18777396951@163.com> Date: Wed, 24 May 2023 15:23:09 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E6=9C=AA=E7=99=BB=E5=BD=95=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E5=88=B0=E7=99=BB=E9=99=86=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/App.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/App.jsx b/src/views/App.jsx index f26a43d..030dfa9 100644 --- a/src/views/App.jsx +++ b/src/views/App.jsx @@ -41,7 +41,7 @@ function App() { // Check location console.info("href: " + href + '; login.token: ' + loginToken); if (href !== '/login' && isEmpty(loginToken)) { - // navigate('/login'); + navigate('/login'); } }, [href]); From a57a874d86898d0272cb3e88f1d138e1bd04a2e9 Mon Sep 17 00:00:00 2001 From: YCC Date: Wed, 24 May 2023 15:29:49 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E7=BB=9F=E4=B8=80=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=A0=8F=E7=9B=AE=E3=80=82=E4=BF=AE=E6=94=B9=E8=B4=A6=E5=8D=95?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/stores/Feedback.js | 2 +- src/stores/Invoice.js | 429 +++++++++++++++---------------- src/views/feedback/Index.jsx | 16 +- src/views/invoice/Index.jsx | 291 ++++++++++----------- src/views/reservation/Newest.jsx | 1 + 5 files changed, 348 insertions(+), 391 deletions(-) diff --git a/src/stores/Feedback.js b/src/stores/Feedback.js index cf014e0..739c5d0 100644 --- a/src/stores/Feedback.js +++ b/src/stores/Feedback.js @@ -11,7 +11,7 @@ class Feedback { } loading = false; - search_date_start = dayjs().startOf("M"); + search_date_start = dayjs().subtract(2, "M").startOf("M"); search_date_end = dayjs().endOf("M"); feedbackList = []; //反馈列表 feedbackImages = []; //图片列表 diff --git a/src/stores/Invoice.js b/src/stores/Invoice.js index 53e06b0..f06405e 100644 --- a/src/stores/Invoice.js +++ b/src/stores/Invoice.js @@ -1,122 +1,118 @@ -import { makeAutoObservable,runInAction } from "mobx"; -import { fetchJSON,postForm} from "@/utils/request"; -import { prepareUrl,isNotEmpty } from '@/utils/commons'; +import { makeAutoObservable, runInAction } from "mobx"; +import { fetchJSON, postForm } from "@/utils/request"; +import { prepareUrl, isNotEmpty } from "@/utils/commons"; import { HT_HOST } from "@/config"; import { json } from "react-router-dom"; import * as config from "@/config"; import dayjs from "dayjs"; class Invoice { - constructor(root) { - makeAutoObservable(this, { rootStore: false }); - this.root = root; - } - - invoiceList = []; //账单列表 - invoicekImages = []; //图片列表 - invoiceGroupInfo= {}; //账单详细 - invoiceProductList=[];//账单细项 - invoiceZDDetail = []; //报账信息 - invoiceCurrencyList=[];//币种 - invoicePicList = [] //多账单图片列表数组 - invoiceFormData = {'info_money':0,'info_Currency':'','info_date':''}; //存储form数据 - - - - fetchInvoiceList(current,OrderType,GroupNo,DateStart,DateEnd,Orderbytype){ - this.invoicePage.current=current; - const totalNum = current == 1 ? 0 : this.invoicePage.total; - //组合param - const fetchUrl = prepareUrl(HT_HOST + '/service-cusservice/PTSearchGMBPageList') - .append('VEI_SN', this.root.authStore.login.travelAgencyId) // - .append('OrderType',OrderType) - .append('GroupNo',GroupNo) - .append('DateStart',DateStart) - .append('DateEnd',DateEnd) - .append('Orderbytype',Orderbytype) - .append('TimeType',0) - .append('limitmarket',"") - .append('mddgroup',"") - .append('SecuryGroup',"") - .append('TotalNum', totalNum) - .append('PageSize', this.invoicePage.size) - .append('PageIndex', this.invoicePage.current) - .build(); - - return fetchJSON(fetchUrl) - .then(json => { - runInAction(()=>{ - if (json.errcode==0){ - if (isNotEmpty(json.Result)){ - this.invoiceList = json.Result.map((data,index)=>{ - return{ - key:data.GMDSN, - gmd_gri_sn : data.gmd_gri_sn, - gmd_vei_sn : data.gmd_vei_sn, - GetGDate : data.GetGDate, - GMD_FillWorkers_SN : data.GMD_FillWorkers_SN, - GMD_FWks_LastEditTime : data.GMD_FWks_LastEditTime, - GMD_VerifyUser_SN : data.GMD_VerifyUser_SN, - GMD_Dealed : data.GMD_Dealed, - GMD_VRequestVerify : data.GMD_VRequestVerify, - LeftGDate : data.LeftGDate, - GMD_FillWorkers_Name : data.GMD_FillWorkers_Name, - GroupName : data.GroupName, - AllMoney : data.AllMoney, - PersonNum : data.PersonNum, - VName : data.VName, - FKState:data.FKState - } - - }); - this.invoicePage.total = json.Result[0].TotalCount; - } - - // else{ - // this.invoiceList=[]; - // this.invoicePage.total=0; - // } - - }else{ - throw new Error(json.errmsg + ': ' + json.errcode); - } - - }); - - }); - - - } - - - fetchInvoiceDetail(GMDSN,GSN){ - const fetchUrl = prepareUrl(HT_HOST + '/service-cusservice/PTGetZDDetail') - .append('VEI_SN', this.root.authStore.login.travelAgencyId) // - .append('GRI_SN',GSN) - .append('GMD_SN',GMDSN) - .append('LGC',1) - .append('Bill',1) - .build(); - - return fetchJSON(fetchUrl) - .then(json=>{ - runInAction(()=>{ - if(json.errcode==0){ - this.invoiceGroupInfo = json.GroupInfo[0]; - this.invoiceProductList = json.ProductList; - this.invoiceCurrencyList = json.CurrencyList; - this.invoiceZDDetail = json.ZDDetail; - }else{ - throw new Error(json.errmsg + ': ' + json.errcode); - } - }) - return json; - }); + constructor(root) { + makeAutoObservable(this, { rootStore: false }); + this.root = root; + } - } + invoiceList = []; //账单列表 + invoicekImages = []; //图片列表 + invoiceGroupInfo = {}; //账单详细 + invoiceProductList = []; //账单细项 + invoiceZDDetail = []; //报账信息 + invoiceCurrencyList = []; //币种 + invoicePicList = []; //多账单图片列表数组 + invoiceFormData = { info_money: 0, info_Currency: "", info_date: "" }; //存储form数据 + + loading = false; + search_date_start = dayjs().subtract(2, "M").startOf("M"); + search_date_end = dayjs().endOf("M"); + + onDateRangeChange = dates => { + console.log(dates); + this.search_date_start = dates[0]; + this.search_date_end = dates[1]; + }; + + fetchInvoiceList(VEI_SN, GroupNo, DateStart, DateEnd) { + this.loading = true; + const fetchUrl = prepareUrl(HT_HOST + "/service-cusservice/PTSearchGMBPageList") + .append("VEI_SN", VEI_SN) + .append("OrderType", 0) + .append("GroupNo", GroupNo) + .append("DateStart", DateStart) + .append("DateEnd", DateEnd) + .append("Orderbytype", 1) + .append("TimeType", 0) + .append("limitmarket", "") + .append("mddgroup", "") + .append("SecuryGroup", "") + .append("TotalNum", 0) + .append("PageSize", 2000) + .append("PageIndex", 1) + .build(); + + return fetchJSON(fetchUrl).then(json => { + runInAction(() => { + this.loading = false; + if (json.errcode == 0) { + if (isNotEmpty(json.Result)) { + this.invoiceList = json.Result.map((data, index) => { + return { + key: data.GMDSN, + gmd_gri_sn: data.gmd_gri_sn, + gmd_vei_sn: data.gmd_vei_sn, + GetGDate: data.GetGDate, + GMD_FillWorkers_SN: data.GMD_FillWorkers_SN, + GMD_FWks_LastEditTime: data.GMD_FWks_LastEditTime, + GMD_VerifyUser_SN: data.GMD_VerifyUser_SN, + GMD_Dealed: data.GMD_Dealed, + GMD_VRequestVerify: data.GMD_VRequestVerify, + LeftGDate: data.LeftGDate, + GMD_FillWorkers_Name: data.GMD_FillWorkers_Name, + GroupName: data.GroupName, + AllMoney: data.AllMoney, + PersonNum: data.PersonNum, + VName: data.VName, + FKState: data.FKState, + }; + }); + this.invoicePage.total = json.Result[0].TotalCount; + } + + // else{ + // this.invoiceList=[]; + // this.invoicePage.total=0; + // } + } else { + throw new Error(json.errmsg + ": " + json.errcode); + } + }); + }); + } + fetchInvoiceDetail(GMDSN, GSN) { + const fetchUrl = prepareUrl(HT_HOST + "/service-cusservice/PTGetZDDetail") + .append("VEI_SN", this.root.authStore.login.travelAgencyId) + .append("GRI_SN", GSN) + .append("GMD_SN", GMDSN) + .append("LGC", 1) + .append("Bill", 1) + .build(); + + return fetchJSON(fetchUrl).then(json => { + runInAction(() => { + if (json.errcode == 0) { + this.invoiceGroupInfo = json.GroupInfo[0]; + this.invoiceProductList = json.ProductList; + this.invoiceCurrencyList = json.CurrencyList; + this.invoiceZDDetail = json.ZDDetail; + } else { + throw new Error(json.errmsg + ": " + json.errcode); + } + }); + return json; + }); + } - //获取供应商提交的图片 + //获取供应商提交的图片 getInvoicekImages(VEI_SN, GRI_SN) { let url = `/service-fileServer/ListFile`; url += `?GRI_SN=${GRI_SN}&VEI_SN=${VEI_SN}&FilePathName=invoice`; @@ -140,51 +136,48 @@ class Invoice { }); } - //从数据库获取图片列表 - getInvoicekImages_fromData(jsonData){ - let arrLen = jsonData.length; - let arrPicList = jsonData.map((data,index)=>{ - const GMD_Pic = data.GMD_Pic; - let picList = []; - if (isNotEmpty(GMD_Pic)){ - let js_Pic = JSON.parse(GMD_Pic) - picList = js_Pic.map((picData,pic_Index)=>{ - return { - uid: -pic_Index, //用负数,防止添加删除的时候错误 - name: '', - status: "done", - url: picData.url, - } - }); - } - if (data.GMD_Dealed == false && arrLen == (index+1)){ - - this.invoicekImages = picList; - } - return picList; - - }) - - runInAction(()=>{ - this.invoicePicList = arrPicList; - }); - - } - - //获取数据库的表单默认数据回填。 - getFormData(jsonData){ - let arrLen = jsonData.length; - return jsonData.map((data,index)=>{ - if (data.GMD_Dealed == false && arrLen == (index+1)){ //只有最后一条账单未审核通过才显示 - runInAction(() => { - this.invoiceFormData = {'info_money':data.GMD_Cost,'info_Currency':data.GMD_Currency,'info_date':isNotEmpty(data.GMD_PayDate)?dayjs(data.GMD_PayDate):''}; - }); - } - }); - } + //从数据库获取图片列表 + getInvoicekImages_fromData(jsonData) { + let arrLen = jsonData.length; + let arrPicList = jsonData.map((data, index) => { + const GMD_Pic = data.GMD_Pic; + let picList = []; + if (isNotEmpty(GMD_Pic)) { + let js_Pic = JSON.parse(GMD_Pic); + picList = js_Pic.map((picData, pic_Index) => { + return { + uid: -pic_Index, //用负数,防止添加删除的时候错误 + name: "", + status: "done", + url: picData.url, + }; + }); + } + if (data.GMD_Dealed == false && arrLen == index + 1) { + this.invoicekImages = picList; + } + return picList; + }); + + runInAction(() => { + this.invoicePicList = arrPicList; + }); + } + //获取数据库的表单默认数据回填。 + getFormData(jsonData) { + let arrLen = jsonData.length; + return jsonData.map((data, index) => { + if (data.GMD_Dealed == false && arrLen == index + 1) { + //只有最后一条账单未审核通过才显示 + runInAction(() => { + this.invoiceFormData = { info_money: data.GMD_Cost, info_Currency: data.GMD_Currency, info_date: isNotEmpty(data.GMD_PayDate) ? dayjs(data.GMD_PayDate) : "" }; + }); + } + }); + } - removeFeedbackImages(fileurl) { + removeFeedbackImages(fileurl) { let url = `/service-fileServer/FileDelete`; url += `?fileurl=${fileurl}`; return fetch(config.HT_HOST + url) @@ -198,78 +191,68 @@ class Invoice { }); } + postEditInvoiceDetail(GMD_SN, Currency, Cost, PayDate, Pic, Memo) { + let postUrl = HT_HOST + "/service-cusservice/EditSupplierFK"; + let formData = new FormData(); + formData.append("LMI_SN", this.root.authStore.login.userId); + formData.append("GMD_SN", GMD_SN); + formData.append("Currency", Currency); + formData.append("Cost", Cost); + formData.append("PayDate", isNotEmpty(PayDate) ? PayDate : ""); + formData.append("Pic", Pic); + formData.append("Memo", Memo); + + return postForm(postUrl, formData).then(json => { + console.info(json); + return json; + }); + } - postEditInvoiceDetail(GMD_SN,Currency,Cost,PayDate,Pic,Memo){ - let postUrl = HT_HOST + '/service-cusservice/EditSupplierFK'; - let formData = new FormData(); - formData.append('LMI_SN', this.root.authStore.login.userId); - formData.append('GMD_SN', GMD_SN); - formData.append('Currency', Currency); - formData.append('Cost', Cost); - formData.append('PayDate', isNotEmpty(PayDate)?PayDate:'' ); - formData.append('Pic', Pic); - formData.append('Memo', Memo); - - return postForm(postUrl,formData) - .then(json=>{ - console.info(json); - return json; - }); - } - - postAddInvoice(GRI_SN,Currency,Cost,PayDate,Pic,Memo){ - let postUrl = HT_HOST + '/service-cusservice/AddSupplierFK'; - let formData = new FormData(); - formData.append('LMI_SN', this.root.authStore.login.userId); - formData.append('VEI_SN', this.root.authStore.login.travelAgencyId); - formData.append('GRI_SN', GRI_SN); - formData.append('Currency', Currency); - formData.append('Cost', Cost); - formData.append('PayDate', isNotEmpty(PayDate)?PayDate:'' ); - formData.append('Pic', Pic); - formData.append('Memo', Memo); - return postForm(postUrl,formData) - .then(json=>{ - console.info(json); - return json; - }); - } - - - invoicePage = { - current:1, - size:10, - total:0 - } - - /* 测试数据 */ - //账单列表范例数据 - testData= - [ - { - "GSMSN":449865, - "gmd_gri_sn":334233, - "gmd_vei_sn":628, - "GetDate":"2023-04-2 00:33:33", - "GMD_FillWorkers_SN":8617, - "GMD_FWks_LastEditTime":"2023-04-26 12:33:33", - "GMD_VerifyUser_SN":8928, - "GMD_Dealed":1, - "GMD_VRequestVerify":1, - "TotalCount":22, - "LeftGDate":"2023-03-30 00:00:00", - "GMD_FillWorkers_Name":"", - "GroupName":" 中华游230501-CA230402033", - "AllMoney":3539, - "PersonNum":"1大1小", - "VName":"" - } - ] + postAddInvoice(GRI_SN, Currency, Cost, PayDate, Pic, Memo) { + let postUrl = HT_HOST + "/service-cusservice/AddSupplierFK"; + let formData = new FormData(); + formData.append("LMI_SN", this.root.authStore.login.userId); + formData.append("VEI_SN", this.root.authStore.login.travelAgencyId); + formData.append("GRI_SN", GRI_SN); + formData.append("Currency", Currency); + formData.append("Cost", Cost); + formData.append("PayDate", isNotEmpty(PayDate) ? PayDate : ""); + formData.append("Pic", Pic); + formData.append("Memo", Memo); + return postForm(postUrl, formData).then(json => { + console.info(json); + return json; + }); + } + invoicePage = { + current: 1, + size: 10, + total: 0, + }; + + /* 测试数据 */ + //账单列表范例数据 + testData = [ + { + GSMSN: 449865, + gmd_gri_sn: 334233, + gmd_vei_sn: 628, + GetDate: "2023-04-2 00:33:33", + GMD_FillWorkers_SN: 8617, + GMD_FWks_LastEditTime: "2023-04-26 12:33:33", + GMD_VerifyUser_SN: 8928, + GMD_Dealed: 1, + GMD_VRequestVerify: 1, + TotalCount: 22, + LeftGDate: "2023-03-30 00:00:00", + GMD_FillWorkers_Name: "", + GroupName: " 中华游230501-CA230402033", + AllMoney: 3539, + PersonNum: "1大1小", + VName: "", + }, + ]; } export default Invoice; - - - - diff --git a/src/views/feedback/Index.jsx b/src/views/feedback/Index.jsx index f2db471..2bba0b2 100644 --- a/src/views/feedback/Index.jsx +++ b/src/views/feedback/Index.jsx @@ -35,7 +35,7 @@ const feedbackListColumns = [ }, { title: "External Reviews", - dataIndex: "GriName", + dataIndex: "TAGood", }, ]; @@ -49,12 +49,13 @@ function Index() { 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 => { - notification.error({ - message: `Error`, - description: ex.message, - placement: 'top', - duration: 4, - }); + // notification.error({ + // message: `Error`, + // description: ex.message, + // placement: 'top', + // duration: 4, + // }); + console.log(ex.message); }); }, []); @@ -93,6 +94,7 @@ function Index() { + diff --git a/src/views/invoice/Index.jsx b/src/views/invoice/Index.jsx index 37f6342..717af3a 100644 --- a/src/views/invoice/Index.jsx +++ b/src/views/invoice/Index.jsx @@ -2,175 +2,146 @@ import { NavLink } from "react-router-dom"; import { useEffect, useState } from "react"; import { observer } from "mobx-react"; import { toJS } from "mobx"; -import { Row, Col, Space, Button, Table, Input, DatePicker,Typography,App,Steps } from "antd"; +import { Row, Col, Space, Button, Table, Input, DatePicker, Typography, App, Steps } from "antd"; import { useStore } from "@/stores/StoreContext.js"; import * as config from "@/config"; -import { formatDate,isNotEmpty } from "@/utils/commons"; -import { AuditOutlined, SmileOutlined, SolutionOutlined, EditOutlined } from '@ant-design/icons'; +import { formatDate, isNotEmpty } from "@/utils/commons"; +import { AuditOutlined, SmileOutlined, SolutionOutlined, EditOutlined } from "@ant-design/icons"; const { Title } = Typography; function Index() { + const { authStore, invoiceStore } = useStore(); + const { invoiceList, invoicePage, 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`; - const { invoiceStore } = useStore(); - const { invoiceList ,invoicePage } = invoiceStore; - const [groupNo, onGroupNoChange] = useState(''); - const [arrivalDateRange, onDateRangeChange] = useState([]); - const [dataLoading, setDataLoading] = useState(false); - const { notification } = App.useApp(); + const invoiceListColumns = [ + { + title: "Ref.No", + dataIndex: "GroupName", + key: "GroupName", + render: (text, record) => {text}, + }, + { + title: "离团时间", + dataIndex: "GetGDate", + key: "GetGDate", + render: (text, record) => formatDate(new Date(text)), + }, + { + title: "接团时间", + key: "LeftGDate", + dataIndex: "LeftGDate", + render: (text, record) => (isNotEmpty(text) ? formatDate(new Date(text)) : ""), + }, + { + title: "人数", + key: "PersonNum", + dataIndex: "PersonNum", + }, + { + title: "团总额", + key: "AllMoney", + dataIndex: "AllMoney", + }, + { + title: "填表时间", + key: "GMD_FWks_LastEditTime", + dataIndex: "GMD_FWks_LastEditTime", + render: (text, record) => (isNotEmpty(text) ? formatDate(new Date(text)) : ""), + }, + { + title: "填表人", + key: "GMD_FillWorkers_Name", + dataIndex: "GMD_FillWorkers_Name", + }, + { + title: "账单状态", + key: "status", + render: BillStatus, + }, + ]; + function BillStatus(text, record) { + // if (record.GMD_Dealed){ + // return "已审核"; + // }else if (record.GMDFillworkers_SN<1){ + // return "未填写"; + // }else if (record.VRequestVerify){ + // return "未审核"; + // }else{ + // return "未提交"; + // } + let FKState = record.FKState - 1; + return ( + , + }, + { + title: "顾问", + // status: 'finish', + icon: , + }, + { + title: "财务", + //status: 'process', + icon: , + }, + { + title: "Done", + //status: 'wait', + icon: , + }, + ]} + /> + ); + } - const invoiceListColumns = [ - { - title: '团名', - dataIndex: 'GroupName', - key: 'GroupName', - }, - { - title: '离团时间', - dataIndex: 'GetGDate', - key: 'GetGDate', - render:(text,record) =>formatDate(new Date(text)) - }, - { - title: '接团时间', - key: 'LeftGDate', - dataIndex: 'LeftGDate', - render:(text,record) => isNotEmpty(text)?formatDate(new Date(text)):"" - }, - { - title: '人数', - key: 'PersonNum', - dataIndex: 'PersonNum' - }, - { - title: '团总额', - key: 'AllMoney', - dataIndex: 'AllMoney' - }, - { - title: '填表时间', - key: 'GMD_FWks_LastEditTime', - dataIndex: 'GMD_FWks_LastEditTime', - render:(text,record) => isNotEmpty(text)?formatDate(new Date(text)):"" - }, - { - title: '填表人', - key: 'GMD_FillWorkers_Name', - dataIndex: 'GMD_FillWorkers_Name' - }, - { - title: '账单状态', - key: 'status', - render:BillStatus - }, - { - title: 'Action', - key: 'action', - render:(text, record) => Details, - } - ]; - - function BillStatus(text,record){ - // if (record.GMD_Dealed){ - // return "已审核"; - // }else if (record.GMDFillworkers_SN<1){ - // return "未填写"; - // }else if (record.VRequestVerify){ - // return "未审核"; - // }else{ - // return "未提交"; - // } - let FKState = record.FKState-1 - return , - }, - { - title: '顾问', - // status: 'finish', - icon: , - }, - { - title: '财务', - //status: 'process', - icon: , - }, - { - title: 'Done', - //status: 'wait', - icon: , - }, - ]} - /> - - } - - const onSearchClick = (current = 1) => { - setDataLoading(true); - invoiceStore.fetchInvoiceList(current, 0, groupNo, arrivalDateRange[0], arrivalDateRange[1], 1) - .catch(ex => { - notification.error({ - message: `Notification`, - description: ex.message, - placement: 'top', - duration: 4, - }); - }) - .finally(() => { - setDataLoading(false); - }); - } - - return ( - - - 账单管理 - - - { onGroupNoChange(e.target.value) }} /> - - - - Date - { onDateRangeChange(dateRange) }} - /> - - - - - - - - -
{onSearchClick(pagination.current);}} - columns={invoiceListColumns} dataSource={toJS(invoiceList)} - /> - - - - - ) - + return ( + + + + + { + onGroupNoChange(e.target.value); + }} + /> + + + + Arrival Date + + + + + + + + + + +
+ + + + ); } export default observer(Index); diff --git a/src/views/reservation/Newest.jsx b/src/views/reservation/Newest.jsx index d628940..6466b59 100644 --- a/src/views/reservation/Newest.jsx +++ b/src/views/reservation/Newest.jsx @@ -211,6 +211,7 @@ function Newest() { +
Date: Wed, 24 May 2023 15:46:21 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/stores/Auth.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/stores/Auth.js b/src/stores/Auth.js index 0c50211..7f291b6 100644 --- a/src/stores/Auth.js +++ b/src/stores/Auth.js @@ -11,7 +11,9 @@ class Auth { makeAutoObservable(this, { rootStore: false }); this.root = root; this.login.token = root.getSession(KEY_LOGIN_TOKEN); - console.info('Auth()'); + setInterval(() => { + console.info('Auth.check.token.'); + }, 1000); } valdateUserPassword(usr, pwd) { @@ -34,7 +36,6 @@ class Auth { fetchUserDetail(userId) { const fetchUrl = prepareUrl(HT_HOST + '/service-CooperateSOA/GetLinkManInfo') - .append('LMI_SN', userId) .append('token', this.login.token) .build(); From 06da5f6b9a3f205293bc79f232e80019c09c8d33 Mon Sep 17 00:00:00 2001 From: YCC Date: Wed, 24 May 2023 16:12:58 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=B4=A6=E5=8D=95?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E9=A1=B5=EF=BC=8C=E4=B8=8A=E4=BC=A0=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E6=B7=BB=E5=8A=A0token?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/stores/Invoice.js | 7 ++----- src/views/feedback/Detail.jsx | 2 +- src/views/invoice/Detail.jsx | 2 +- src/views/invoice/Index.jsx | 21 ++------------------- 4 files changed, 6 insertions(+), 26 deletions(-) diff --git a/src/stores/Invoice.js b/src/stores/Invoice.js index f06405e..97ddd23 100644 --- a/src/stores/Invoice.js +++ b/src/stores/Invoice.js @@ -75,12 +75,9 @@ class Invoice { }; }); this.invoicePage.total = json.Result[0].TotalCount; + } else { + this.invoiceList = []; } - - // else{ - // this.invoiceList=[]; - // this.invoicePage.total=0; - // } } else { throw new Error(json.errmsg + ": " + json.errcode); } diff --git a/src/views/feedback/Detail.jsx b/src/views/feedback/Detail.jsx index b9cefd6..368cbf3 100644 --- a/src/views/feedback/Detail.jsx +++ b/src/views/feedback/Detail.jsx @@ -170,7 +170,7 @@ function Detail() { name="ghhfile" accept="image/*" multiple={true} - action={config.HT_HOST + `/service-fileServer/FileUpload?GRI_SN=${GRI_SN}&VEI_SN=${authStore.login.travelAgencyId}`} + action={config.HT_HOST + `/service-fileServer/FileUpload?GRI_SN=${GRI_SN}&VEI_SN=${authStore.login.travelAgencyId}&token=${authStore.login.token}`} fileList={fileList} listType="picture-card" onChange={handleChange} diff --git a/src/views/invoice/Detail.jsx b/src/views/invoice/Detail.jsx index 0cd3dfa..f615923 100644 --- a/src/views/invoice/Detail.jsx +++ b/src/views/invoice/Detail.jsx @@ -221,7 +221,7 @@ function Detail() { name="ghhfile" accept="image/*" multiple={true} - action={config.HT_HOST + `/service-fileServer/FileUpload?GRI_SN=${GSN}&VEI_SN=${authStore.login.travelAgencyId}&FilePathName=invoice`} + action={config.HT_HOST + `/service-fileServer/FileUpload?GRI_SN=${GSN}&VEI_SN=${authStore.login.travelAgencyId}&FilePathName=invoice&token=${authStore.login.token}`} fileList={invoicePicList[index]} listType="picture-card" > diff --git a/src/views/invoice/Index.jsx b/src/views/invoice/Index.jsx index 717af3a..d4c927e 100644 --- a/src/views/invoice/Index.jsx +++ b/src/views/invoice/Index.jsx @@ -26,14 +26,8 @@ function Index() { key: "GroupName", render: (text, record) => {text}, }, - { - title: "离团时间", - dataIndex: "GetGDate", - key: "GetGDate", - render: (text, record) => formatDate(new Date(text)), - }, - { - title: "接团时间", + { + title: "Arrival Date", key: "LeftGDate", dataIndex: "LeftGDate", render: (text, record) => (isNotEmpty(text) ? formatDate(new Date(text)) : ""), @@ -48,17 +42,6 @@ function Index() { key: "AllMoney", dataIndex: "AllMoney", }, - { - title: "填表时间", - key: "GMD_FWks_LastEditTime", - dataIndex: "GMD_FWks_LastEditTime", - render: (text, record) => (isNotEmpty(text) ? formatDate(new Date(text)) : ""), - }, - { - title: "填表人", - key: "GMD_FillWorkers_Name", - dataIndex: "GMD_FillWorkers_Name", - }, { title: "账单状态", key: "status",