From 894f6e8173a29c5c8867674686a90c978beade22 Mon Sep 17 00:00:00 2001 From: Ycc Date: Thu, 12 Jun 2025 09:50:14 +0800 Subject: [PATCH] sync --- src/main.jsx | 10 +++++----- src/views/trainticket/index.jsx | 12 ++++++------ src/views/trainticket/invoice.jsx | 32 ++++++++++--------------------- src/views/trainticket/plan.jsx | 21 +++++++++++++------- 4 files changed, 35 insertions(+), 40 deletions(-) diff --git a/src/main.jsx b/src/main.jsx index 89f74dc..4c8c50c 100644 --- a/src/main.jsx +++ b/src/main.jsx @@ -45,7 +45,7 @@ import { isNotEmpty } from '@/utils/commons' import ProductsManage from '@/views/products/Manage'; import ProductsDetail from '@/views/products/Detail'; import ProductsAudit from '@/views/products/Audit'; -import { PERM_ACCOUNT_MANAGEMENT, PERM_ROLE_NEW, PERM_OVERSEA, PERM_AIR_TICKET, PERM_PRODUCTS_MANAGEMENT, PERM_PRODUCTS_OFFER_PUT } from '@/config' +import { PERM_ACCOUNT_MANAGEMENT, PERM_ROLE_NEW, PERM_OVERSEA,PERM_TRAIN_TICKET, PERM_AIR_TICKET, PERM_PRODUCTS_MANAGEMENT, PERM_PRODUCTS_OFFER_PUT } from '@/config' import './i18n' @@ -79,10 +79,10 @@ const initRouter = async () => { { path: 'airticket/invoice',element:}, { path: 'airticket/invoicepaid',element:}, - { path: 'trainticket',element: }, - { path: 'trainticket/plan/:coli_sn/:gri_sn',element:}, - { path: 'trainticket/invoice',element:}, - { path: 'trainticket/invoicepaid',element:}, + { path: 'trainticket',element: }, + { path: 'trainticket/plan/:coli_sn/:gri_sn',element:}, + { path: 'trainticket/invoice',element:}, + { path: 'trainticket/invoicepaid',element:}, { path: "products",element: }, { path: "products/:travel_agency_id/:use_year/:audit_state/audit",element:}, diff --git a/src/views/trainticket/index.jsx b/src/views/trainticket/index.jsx index 01f3cff..cc6a295 100644 --- a/src/views/trainticket/index.jsx +++ b/src/views/trainticket/index.jsx @@ -1,5 +1,5 @@ import { useState, useEffect } from "react"; -import { Grid, Divider, Layout, Spin, Input, Col, Row, Space, List, Table, Button } from "antd"; +import { Grid, Divider, Layout, Spin, Input, Col, Row, Space, List, Table, Button, Typography } from "antd"; import { PhoneOutlined, CustomerServiceOutlined, AudioOutlined, AuditOutlined } from "@ant-design/icons"; import { useParams, useHref, useNavigate, NavLink } from "react-router-dom"; import { isEmpty, formatColonTime } from "@/utils/commons"; @@ -16,11 +16,11 @@ const planListColumns = [ key: "GRI_No", dataIndex: "GRI_No", // sorter: (a, b) => b.GRI_No - a.GRI_No, - }, - { - title: "组团人", - key: "WL", - dataIndex: "WL", + render: (text, record) => ( + + {record.GRI_No} {record.WL} + + ), }, { title: "人数", diff --git a/src/views/trainticket/invoice.jsx b/src/views/trainticket/invoice.jsx index 0aefc75..65fcec0 100644 --- a/src/views/trainticket/invoice.jsx +++ b/src/views/trainticket/invoice.jsx @@ -47,42 +47,36 @@ const Invoice = props => { }, { title: "出发", - key: "FromCity", - dataIndex: "FromCity", + key: "FromAirport", + dataIndex: "FromAirport", render: (text, record) => (record.CostType == "出票" ? `${record.FromCity}` : "-"), }, { title: "抵达", - key: "ToCity", - dataIndex: "ToCity", + key: "ToAirport", + dataIndex: "ToAirport", render: (text, record) => (record.CostType == "出票" ? `${record.ToCity}` : "-"), }, { - title: "航班", + title: "车次", key: "FlightNo", dataIndex: "FlightNo", render: (text, record) => (record.CostType == "出票" ? text : "-"), }, { - title: "PNR", - key: "PNR", - dataIndex: "PNR", - render: (text, record) => (record.CostType == "出票" ? text : "-"), - }, - { - title: "票号", + title: "取票号", key: "TicketNo", dataIndex: "TicketNo", render: (text, record) => (record.CostType == "出票" ? text : "-"), }, { - title: "机票类型", + title: "车票类型", key: "FlightType", dataIndex: "FlightType", render: (text, record) => (record.CostType == "出票" ? text : "-"), }, { - title: "机票价格", + title: "车票价格", children: [ { title: vEIFlightBill && vEIFlightBill.reduce((acc, curr) => acc + curr.Cost, 0), @@ -101,12 +95,6 @@ const Invoice = props => { }, ], }, - { - title: "折扣", - key: "Discount", - dataIndex: "Discount", - render: (text, record) => (record.CostType == "出票" ? text : "-"), - }, { title: "审核状态", children: [ @@ -230,7 +218,7 @@ const Invoice = props => { - + @@ -238,7 +226,7 @@ const Invoice = props => { - acc + curr.Cost, 0)} /> + acc + curr.Cost, 0)} /> acc + curr.ServiceFee, 0)} /> diff --git a/src/views/trainticket/plan.jsx b/src/views/trainticket/plan.jsx index 97148cf..03cc5a8 100644 --- a/src/views/trainticket/plan.jsx +++ b/src/views/trainticket/plan.jsx @@ -66,7 +66,7 @@ const TrainticketPlan = props => { return ( seatTable && seatTable.map(item => { - return { label: `${item.name}-${item.code}`, value: `${item.name}-${item.code}` }; + return { label: `${item.name}`, value: `${item.name}` }; }) ); }; @@ -187,7 +187,7 @@ const TrainticketPlan = props => { - + @@ -208,8 +208,7 @@ const TrainticketPlan = props => { - + @@ -321,7 +320,11 @@ const TrainticketPlan = props => { ticket_form.resetFields(); if (isEmpty(ticket.CostType)) ticket.CostType = "出票"; ticket.CostType == "出票" ? setisTicketType(true) : setisTicketType(false); //如果是出票类型,显示票号、折扣等选项 - isEmpty(ticket.CLC_SN) ? setisAddNew(true) : setisAddNew(false); //如果是新增窗口 + const isNew = isEmpty(ticket.CLC_SN); // 判断是否为新增状态 + setisAddNew(isNew); + if (isNew) { + ticket.ServiceFee = "60"; // // 新增时设置服务费默认值为60 + } ticket_form.setFieldsValue(ticket); if (isEmpty(ticket.Memo)) ticket_form.setFieldsValue({ Memo: "" }); }; @@ -476,7 +479,7 @@ const TrainticketPlan = props => { title="请确认要增加车票记录" description="" onConfirm={() => { - postFlightDetail("", gri_sn, travelAgencyId, { FlightNo: "新的记录", FlightStatus: 1 ,ServiceType:2}, []); //新增加一条记录 + postFlightDetail("", gri_sn, travelAgencyId, { FlightNo: "新的记录", FlightStatus: 1, ServiceType: 2 }, []); //新增加一条记录 getPlanDetail(travelAgencyId, gri_sn); //计划详情,含费用列表 }} okText="是" @@ -575,10 +578,14 @@ const TrainticketPlan = props => { {isTicketType && ( <> - ({ + value: `${String(index + 1).padStart(2, "0")}车`, + label: `${String(index + 1).padStart(2, "0")}车`, + }))} />