main
Ycc 3 weeks ago
parent b845280151
commit 894f6e8173

@ -45,7 +45,7 @@ import { isNotEmpty } from '@/utils/commons'
import ProductsManage from '@/views/products/Manage'; import ProductsManage from '@/views/products/Manage';
import ProductsDetail from '@/views/products/Detail'; import ProductsDetail from '@/views/products/Detail';
import ProductsAudit from '@/views/products/Audit'; 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' import './i18n'
@ -79,10 +79,10 @@ const initRouter = async () => {
{ path: 'airticket/invoice',element:<RequireAuth subject={PERM_AIR_TICKET} result={true}><AirticketInvoice /></RequireAuth>}, { path: 'airticket/invoice',element:<RequireAuth subject={PERM_AIR_TICKET} result={true}><AirticketInvoice /></RequireAuth>},
{ path: 'airticket/invoicepaid',element:<RequireAuth subject={PERM_AIR_TICKET} result={true}><AirticketInvoicePaid /></RequireAuth>}, { path: 'airticket/invoicepaid',element:<RequireAuth subject={PERM_AIR_TICKET} result={true}><AirticketInvoicePaid /></RequireAuth>},
{ path: 'trainticket',element: <RequireAuth subject={PERM_AIR_TICKET} result={true}><Trainticket /></RequireAuth>}, { path: 'trainticket',element: <RequireAuth subject={PERM_TRAIN_TICKET} result={true}><Trainticket /></RequireAuth>},
{ path: 'trainticket/plan/:coli_sn/:gri_sn',element:<RequireAuth subject={PERM_AIR_TICKET} result={true}><TrainticketPlan /></RequireAuth>}, { path: 'trainticket/plan/:coli_sn/:gri_sn',element:<RequireAuth subject={PERM_TRAIN_TICKET} result={true}><TrainticketPlan /></RequireAuth>},
{ path: 'trainticket/invoice',element:<RequireAuth subject={PERM_AIR_TICKET} result={true}><TrainticketInvoice /></RequireAuth>}, { path: 'trainticket/invoice',element:<RequireAuth subject={PERM_TRAIN_TICKET} result={true}><TrainticketInvoice /></RequireAuth>},
{ path: 'trainticket/invoicepaid',element:<RequireAuth subject={PERM_AIR_TICKET} result={true}><TrainticketInvoicePaid /></RequireAuth>}, { path: 'trainticket/invoicepaid',element:<RequireAuth subject={PERM_TRAIN_TICKET} result={true}><TrainticketInvoicePaid /></RequireAuth>},
{ path: "products",element: <RequireAuth subject={PERM_PRODUCTS_MANAGEMENT} result={true}><ProductsManage /></RequireAuth>}, { path: "products",element: <RequireAuth subject={PERM_PRODUCTS_MANAGEMENT} result={true}><ProductsManage /></RequireAuth>},
{ path: "products/:travel_agency_id/:use_year/:audit_state/audit",element:<RequireAuth subject={PERM_PRODUCTS_MANAGEMENT} result={true}><ProductsAudit /></RequireAuth>}, { path: "products/:travel_agency_id/:use_year/:audit_state/audit",element:<RequireAuth subject={PERM_PRODUCTS_MANAGEMENT} result={true}><ProductsAudit /></RequireAuth>},

@ -1,5 +1,5 @@
import { useState, useEffect } from "react"; 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 { PhoneOutlined, CustomerServiceOutlined, AudioOutlined, AuditOutlined } from "@ant-design/icons";
import { useParams, useHref, useNavigate, NavLink } from "react-router-dom"; import { useParams, useHref, useNavigate, NavLink } from "react-router-dom";
import { isEmpty, formatColonTime } from "@/utils/commons"; import { isEmpty, formatColonTime } from "@/utils/commons";
@ -16,11 +16,11 @@ const planListColumns = [
key: "GRI_No", key: "GRI_No",
dataIndex: "GRI_No", dataIndex: "GRI_No",
// sorter: (a, b) => b.GRI_No - a.GRI_No, // sorter: (a, b) => b.GRI_No - a.GRI_No,
}, render: (text, record) => (
{ <Typography.Text title={record.Memo}>
title: "组团人", {record.GRI_No} {record.WL}
key: "WL", </Typography.Text>
dataIndex: "WL", ),
}, },
{ {
title: "人数", title: "人数",

@ -47,42 +47,36 @@ const Invoice = props => {
}, },
{ {
title: "出发", title: "出发",
key: "FromCity", key: "FromAirport",
dataIndex: "FromCity", dataIndex: "FromAirport",
render: (text, record) => (record.CostType == "出票" ? `${record.FromCity}` : "-"), render: (text, record) => (record.CostType == "出票" ? `${record.FromCity}` : "-"),
}, },
{ {
title: "抵达", title: "抵达",
key: "ToCity", key: "ToAirport",
dataIndex: "ToCity", dataIndex: "ToAirport",
render: (text, record) => (record.CostType == "出票" ? `${record.ToCity}` : "-"), render: (text, record) => (record.CostType == "出票" ? `${record.ToCity}` : "-"),
}, },
{ {
title: "航班", title: "车次",
key: "FlightNo", key: "FlightNo",
dataIndex: "FlightNo", dataIndex: "FlightNo",
render: (text, record) => (record.CostType == "出票" ? text : "-"), render: (text, record) => (record.CostType == "出票" ? text : "-"),
}, },
{ {
title: "PNR", title: "取票号",
key: "PNR",
dataIndex: "PNR",
render: (text, record) => (record.CostType == "出票" ? text : "-"),
},
{
title: "票号",
key: "TicketNo", key: "TicketNo",
dataIndex: "TicketNo", dataIndex: "TicketNo",
render: (text, record) => (record.CostType == "出票" ? text : "-"), render: (text, record) => (record.CostType == "出票" ? text : "-"),
}, },
{ {
title: "票类型", title: "车票类型",
key: "FlightType", key: "FlightType",
dataIndex: "FlightType", dataIndex: "FlightType",
render: (text, record) => (record.CostType == "出票" ? text : "-"), render: (text, record) => (record.CostType == "出票" ? text : "-"),
}, },
{ {
title: "票价格", title: "票价格",
children: [ children: [
{ {
title: vEIFlightBill && vEIFlightBill.reduce((acc, curr) => acc + curr.Cost, 0), 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: "审核状态", title: "审核状态",
children: [ children: [
@ -230,7 +218,7 @@ const Invoice = props => {
<Col md={24} lg={24} xxl={24}> <Col md={24} lg={24} xxl={24}>
<Table bordered={true} rowKey="CLC_SN" columns={vEIFlightBillColumns} dataSource={vEIFlightBill} loading={loading} pagination={{ defaultPageSize: 100, showTotal: showTotal }} /> <Table bordered={true} rowKey="CLC_SN" columns={vEIFlightBillColumns} dataSource={vEIFlightBill} loading={loading} pagination={{ defaultPageSize: 100, showTotal: showTotal }} />
<TableExportBtn btnTxt="导出账单" label={`票账单`} {...{ columns: vEIFlightBillColumns, dataSource: vEIFlightBill }} /> <TableExportBtn btnTxt="导出账单" label={`票账单`} {...{ columns: vEIFlightBillColumns, dataSource: vEIFlightBill }} />
</Col> </Col>
<Col md={24} lg={24} xxl={24}></Col> <Col md={24} lg={24} xxl={24}></Col>
@ -238,7 +226,7 @@ const Invoice = props => {
<Row> <Row>
<Col md={24} lg={18} xxl={18}></Col> <Col md={24} lg={18} xxl={18}></Col>
<Col md={24} lg={2} xxl={2}> <Col md={24} lg={2} xxl={2}>
<Statistic title="已选票价格" value={selectedValues.reduce((acc, curr) => acc + curr.Cost, 0)} /> <Statistic title="已选票价格" value={selectedValues.reduce((acc, curr) => acc + curr.Cost, 0)} />
</Col> </Col>
<Col md={24} lg={2} xxl={2}> <Col md={24} lg={2} xxl={2}>
<Statistic title="已选服务费" value={selectedValues.reduce((acc, curr) => acc + curr.ServiceFee, 0)} /> <Statistic title="已选服务费" value={selectedValues.reduce((acc, curr) => acc + curr.ServiceFee, 0)} />

@ -66,7 +66,7 @@ const TrainticketPlan = props => {
return ( return (
seatTable && seatTable &&
seatTable.map(item => { 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 => {
<Input placeholder="车次" /> <Input placeholder="车次" />
</Form.Item> </Form.Item>
<Form.Item name="TicketNo" noStyle rules={[{ required: true, message: "请输入取票号!" }]}> <Form.Item name="TicketNo" noStyle rules={[{ required: true, message: "请输入取票号!" }]}>
<Input placeholder="取票号" /> <Input placeholder="取票号" maxLength={9} />
</Form.Item> </Form.Item>
</Space> </Space>
</Form.Item> </Form.Item>
@ -208,8 +208,7 @@ const TrainticketPlan = props => {
</Form.Item> </Form.Item>
</Space> </Space>
</Form.Item> </Form.Item>
<Form.Item name="ServiceType" hidden initialValue="2"> <Form.Item name="ServiceType" hidden initialValue="2"></Form.Item>
</Form.Item>
</Col> </Col>
<Col md={24} lg={4} xxl={4}> <Col md={24} lg={4} xxl={4}>
<Space direction="vertical"> <Space direction="vertical">
@ -321,7 +320,11 @@ const TrainticketPlan = props => {
ticket_form.resetFields(); ticket_form.resetFields();
if (isEmpty(ticket.CostType)) ticket.CostType = "出票"; if (isEmpty(ticket.CostType)) ticket.CostType = "出票";
ticket.CostType == "出票" ? setisTicketType(true) : setisTicketType(false); // 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); ticket_form.setFieldsValue(ticket);
if (isEmpty(ticket.Memo)) ticket_form.setFieldsValue({ Memo: "" }); if (isEmpty(ticket.Memo)) ticket_form.setFieldsValue({ Memo: "" });
}; };
@ -476,7 +479,7 @@ const TrainticketPlan = props => {
title="请确认要增加车票记录" title="请确认要增加车票记录"
description="" description=""
onConfirm={() => { onConfirm={() => {
postFlightDetail("", gri_sn, travelAgencyId, { FlightNo: "新的记录", FlightStatus: 1 ,ServiceType:2}, []); // postFlightDetail("", gri_sn, travelAgencyId, { FlightNo: "新的记录", FlightStatus: 1, ServiceType: 2 }, []); //
getPlanDetail(travelAgencyId, gri_sn); // getPlanDetail(travelAgencyId, gri_sn); //
}} }}
okText="是" okText="是"
@ -575,10 +578,14 @@ const TrainticketPlan = props => {
{isTicketType && ( {isTicketType && (
<> <>
<Form.Item label="车厢" name="Cabin" rules={[{ required: true }]}> <Form.Item label="车厢" name="Cabin" rules={[{ required: true }]}>
<Input <Select
style={{ style={{
width: 160, width: 160,
}} }}
options={Array.from({ length: 16 }, (_, index) => ({
value: `${String(index + 1).padStart(2, "0")}`,
label: `${String(index + 1).padStart(2, "0")}`,
}))}
/> />
</Form.Item> </Form.Item>
<Form.Item label="座位号" name="SeatNo" rules={[{ required: true }]}> <Form.Item label="座位号" name="SeatNo" rules={[{ required: true }]}>

Loading…
Cancel
Save