diff --git a/src/pages/FinancialMgm/FinancialReport/PdaStat/index.scss b/src/pages/FinancialMgm/FinancialReport/PdaStat/index.scss index 1838f71..b9e6dcc 100644 --- a/src/pages/FinancialMgm/FinancialReport/PdaStat/index.scss +++ b/src/pages/FinancialMgm/FinancialReport/PdaStat/index.scss @@ -3,3 +3,132 @@ $color-container-bg : var(--color-container-bg); $color-user-list-bg : var(--color-user-list-bg); $color-text : var(--color-text); $color-primary : var(--color-primary); + +.pdastart { + padding: 10px 20px; + height: 100%; + + .body_cenf { + display: flex; + height: 100%; + + .left_search { + width: 370px; + height: 100%; + + + .form_item { + width: 100%; + display: flex; + align-items: center; + padding: 0 10px 16px 0; + + .lab { + width: 70px; + text-align: right; + margin-right: 10px; + } + + // .labs { + // width: 120px; + // text-align: right; + // border: 1px solid var(--color-table-border-bottom-color); + // margin-right: 10px; + // } + + .inputs { + flex: 1; + border: 1px solid var(--color-table-border-bottom-color); + border-radius: 4px; + overflow: hidden; + } + + .inputst { + // flex: 228px; + border: 1px solid var(--color-table-border-bottom-color); + border-radius: 4px; + overflow: hidden; + } + } + + .but_on { + display: flex; + // align-items: center; + margin: 0 10px 0 0; + justify-content: space-between; + + span { + width: 110px; + height: 36px; + border-radius: 4px; + color: #ffffff; + margin-right: 10px; + text-align: center; + line-height: 36px; + cursor: pointer; + } + + .sear_ser, + .sear_rep { + background-color: $color-primary; + } + + .sear_res { + background: #636d80; + } + + .lent { + width: 230px; + margin-left: 20px; + } + } + } + + .right_tab { + flex: 1; + height: 100%; + padding: 20px; + background: var(--color-user-list-bg); + box-shadow: 0px 3px 8px 0px rgba(0, 0, 0, 0.12); + border-radius: 28px 0 0 0; + + .table_raps { + width: 1300px; + } + + .yisa-table { + width: 100%; + + .ant-table-thead { + th { + background: var(--color-table-header-bg) !important; + } + + .ant-table-selection-column { + text-align: center; + padding: 0; + } + } + + .ant-table-tbody { + td { + background: var(--color-table-body-bg) !important; + border-bottom-color: var(--color-table-border-bottom-color); + } + + tr:nth-child(even) { + td { + background: var(--color-table-body-bg-nth-child-even) !important; + } + } + + tr:nth-child(odd) { + td { + background: var(--color-table-body-bg-nth-child-even) !important; + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/pages/FinancialMgm/FinancialReport/PdaStat/loadable.jsx b/src/pages/FinancialMgm/FinancialReport/PdaStat/loadable.jsx index 289863e..ded6f75 100644 --- a/src/pages/FinancialMgm/FinancialReport/PdaStat/loadable.jsx +++ b/src/pages/FinancialMgm/FinancialReport/PdaStat/loadable.jsx @@ -1,15 +1,399 @@ import React, { useState, useRef, useEffect } from "react"; -// import { message, Pagination, Table, Space, Modal, } from "antd"; -// import { dictionary, utils } from "@/config/common"; -// import moment from 'moment' +import { + message, + Pagination, + Table, + Select, + Input, + Popover, + Modal, + Button, + Row, + Col, + Form, + DatePicker, +} from "antd"; +import { dictionary, utils } from "@/config/common"; +import moment from "moment"; +import { DeleteOutlined } from "@ant-design/icons"; +import ajax from "@/services"; // import { useSessionStorageState, useUpdateEffect, useSize, useUpdate } from 'ahooks'; -// import ajax from "@/services" -// import { FormInput, FormSelect, OptionPanel, ResultPanel, FormSliderPicker, AreaCascader, ImgResize, ImgZoom, } from "@/components" -// import "./index.scss"; +import { ResultFlow } from "@/components"; +import "./index.scss"; // import errorImg from "@/assets/images/layout/error.png" // import { useLocation } from "react-router-dom"; +const { RangePicker } = DatePicker; +const { TextArea } = Input; function PdaStat() { - return
PdaStat
-} + const [form] = Form.useForm(); + //页面检索-重复 + const formdata = { + sell_name: "", //商户 + head_name: "", //发票抬头 + order_type: "", //发票类型 + start_time: moment().startOf("day").format("YYYY-MM-DD HH:mm:ss"), + end_time: moment().endOf("day").format("YYYY-MM-DD HH:mm:ss"), + pn: "1", + page_size: "15", + }; + + //抬头类型 + const Headtype = [ + { + label: "个人", + value: "1", + }, + { + label: "企业", + value: "2", + }, + ]; + //业务类型 + const Bussinss = [ + { + label: "停车支付订单", + value: "1", + }, + { + label: "停车卡订单", + value: "2", + }, + ]; + //检索 + const [FormData, setFormData] = useState(formdata); + //检索2 + const [FormDatas, setFormDatas] = useState(formdata); + //页码状态 + const [loading, setLoading] = useState(false); + //页面数据 + const [Data, setData] = useState({ + data: [], + total: 0, + }); + + const column = () => { + return [ + { + title: "序号", + width: 60, + fixed: "left", + render: (text, record, index) => index + 1, + }, + { + title: "电子邮箱", + dataIndex: "email", + width: 120, + key: "email", + align: "center", + }, + { + title: "发票代码", + dataIndex: "ordercode", + width: 120, + key: "ordercode", + align: "center", + }, + { + title: "发票号码", + width: 120, + dataIndex: "orderNo", + key: "orderNo", + align: "center", + }, + { + title: "商户名称", + width: 120, + dataIndex: "sell_name", + key: "sell_name", + align: "center", + }, + { + title: "发票内容", + width: 120, + dataIndex: "invoice_content", + key: "invoice_content", + align: "center", + }, + { + title: "发票抬头", + width: 120, + dataIndex: "header_name", + key: "header_name", + align: "center", + }, + { + title: "纳税人识别号", + width: 120, + dataIndex: "tax_num", + key: "tax_num", + align: "center", + }, + { + title: "开票金额", + width: 120, + dataIndex: "invoice_money", + key: "invoice_money", + align: "center", + render: (_, record) => { + return _ && _ + "元"; + }, + }, + { + title: "税额", + width: 120, + dataIndex: "tax", + key: "tax", + align: "center", + render: (_, record) => { + return _ && _ + "元"; + }, + }, + { + title: "税率", + width: 120, + dataIndex: "tax_rate", + key: "tax_rate", + align: "center", + }, + + { + title: "业务类型", + width: 120, + dataIndex: "order_type", + key: "order_type", + align: "center", + render: (_, record) => { + var buss = ""; + buss = Bussinss.filter((ele) => ele.value == _)[0].label; + return buss; + }, + }, + { + title: "开票时间", + width: 120, + dataIndex: "create_time", + key: "create_time", + align: "center", + }, + ]; + }; + //列表 + const columns = column(); -export default PdaStat; \ No newline at end of file + //时间 + const onChangeData = (dates, dataString) => { + setFormData({ + ...FormData, + start_time: dataString[0], + end_time: dataString[1], + }); + }; + //页码 + function onShowSizeChange(pn, pn_size) { + setFormData({ + ...FormData, + pn: pn, + page_size: pn_size, + }); + setFormDatas({ + ...FormDatas, + pn: pn, + page_size: pn_size, + }); + } + + //获取页面显示数据 + const getData = (data) => { + setLoading(false); + ajax.ElectInvoice.getInvoiceMess({ ...data }).then( + (res) => { + if (parseInt(res?.status) === 20000) { + console.log(res); + setData({ + data: res?.data || {}, + total: res.total || 0, + }); + setLoading(true); + } else { + message.error(res?.message); + } + setLoading(true); + }, + (err) => { + console.log(err); + setLoading(true); + } + ); + }; + useEffect(() => { + getData(FormDatas); + //调用接口 + }, [FormDatas]); + + return ( +
+
+
+
查询条件
+
+ 商户名称 +
+ + setFormData({ + ...FormData, + head_name: e.target.value, + }) + } + /> +
+
+
+ 姓名 +
+ + setFormData({ + ...FormData, + head_name: e.target.value, + }) + } + /> +
+
+
+ 时间 +
+ + onChangeData(dates, dataString) + } + /> +
+
+
+ { + var reset = formdata; + setFormData(reset); + setFormDatas(reset); + }} + > + 重置 + + { + setFormDatas({ ...FormData }); + }} + > + 查询 + + { + // setFormDatas({ ...FormData }); + }} + > + 导出 + +
+
+
+ +
+ record.id} + dataSource={Data.data} + pagination={false} + scroll={{ + x: 1300, + y: "calc(100vh - 300px)", + }} + /> + +
+ `共 ${total_records} 条`} + total={Data.total} + current={FormData.pn} + pageSize={FormData.page_size} + pageSizeOptions={dictionary?.pageSizeOptions} + onChange={onShowSizeChange} + onShowSizeChange={onShowSizeChange} + /> +
+ + + + + ); +} +export default PdaStat; diff --git a/src/pages/FinancialMgm/Invoice/CreateInvoice/index.scss b/src/pages/FinancialMgm/Invoice/CreateInvoice/index.scss index 1838f71..5a991aa 100644 --- a/src/pages/FinancialMgm/Invoice/CreateInvoice/index.scss +++ b/src/pages/FinancialMgm/Invoice/CreateInvoice/index.scss @@ -3,3 +3,169 @@ $color-container-bg : var(--color-container-bg); $color-user-list-bg : var(--color-user-list-bg); $color-text : var(--color-text); $color-primary : var(--color-primary); + +.CreateInvoice { + padding: 10px 20px; + height: 100%; + + .body_cenf { + display: flex; + height: 100%; + + .left_search { + width: 370px; + height: 100%; + + + .form_item { + width: 100%; + display: flex; + align-items: center; + padding: 0 10px 16px 0; + + .lab { + width: 70px; + text-align: right; + margin-right: 10px; + } + + // .labs { + // width: 120px; + // text-align: right; + // border: 1px solid var(--color-table-border-bottom-color); + // margin-right: 10px; + // } + + .inputs { + flex: 1; + border: 1px solid var(--color-table-border-bottom-color); + border-radius: 4px; + overflow: hidden; + } + + .inputst { + // flex: 228px; + border: 1px solid var(--color-table-border-bottom-color); + border-radius: 4px; + overflow: hidden; + } + } + + .but_on { + display: flex; + // align-items: center; + margin: 0 10px 0 0; + justify-content: space-between; + + span { + width: 110px; + height: 36px; + border-radius: 4px; + color: #ffffff; + // margin-right: 10px; + text-align: center; + line-height: 36px; + cursor: pointer; + } + + .sear_ser, + .sear_rep { + background-color: $color-primary; + } + + .sear_res { + background: #636d80; + } + + .lent { + width: 230px; + margin-left: 20px; + } + } + } + + .right_tab { + flex: 1; + height: 100%; + padding: 20px; + background: var(--color-user-list-bg); + box-shadow: 0px 3px 8px 0px rgba(0, 0, 0, 0.12); + border-radius: 28px 0 0 0; + + .yisa-table { + width: 100%; + + .ant-table-thead { + th { + background: var(--color-table-header-bg) !important; + } + + .ant-table-selection-column { + text-align: center; + padding: 0; + } + } + + .ant-table-tbody { + td { + background: var(--color-table-body-bg) !important; + border-bottom-color: var(--color-table-border-bottom-color); + } + + tr:nth-child(even) { + td { + background: var(--color-table-body-bg-nth-child-even) !important; + } + } + + tr:nth-child(odd) { + td { + background: var(--color-table-body-bg-nth-child-even) !important; + } + } + } + } + } + } +} +.modal-invoicerepeat { + .fptext { + width: 100%; + display: flex; + padding: 0 10px; + + .fpo { + width: 50%; + + span { + margin-right: 10px; + } + } + } + + .submitBtn { + text-align: center; + margin-top: 20px; + + .ant-btn { + width: 80px; + height: 35px; + border: none; + border-radius: 4px; + + line-height: 27px; + color: #ffffff; + + } + + .submit { + background: #409eff; + } + + .cancel { + background: var(--button-default-bg); + margin-left: 20px; + } + } + +} \ No newline at end of file diff --git a/src/pages/FinancialMgm/Invoice/CreateInvoice/loadable.jsx b/src/pages/FinancialMgm/Invoice/CreateInvoice/loadable.jsx index 57019af..9c63951 100644 --- a/src/pages/FinancialMgm/Invoice/CreateInvoice/loadable.jsx +++ b/src/pages/FinancialMgm/Invoice/CreateInvoice/loadable.jsx @@ -1,15 +1,721 @@ import React, { useState, useRef, useEffect } from "react"; -// import { message, Pagination, Table, Space, Modal, } from "antd"; -// import { dictionary, utils } from "@/config/common"; -// import moment from 'moment' +import { + message, + Pagination, + Table, + Select, + Input, + Popover, + Modal, + Row, + Form, + Col, + Button, + DatePicker, +} from "antd"; +import { dictionary, utils } from "@/config/common"; +import moment from "moment"; +import { DeleteOutlined } from "@ant-design/icons"; +import ajax from "@/services"; // import { useSessionStorageState, useUpdateEffect, useSize, useUpdate } from 'ahooks'; -// import ajax from "@/services" -// import { FormInput, FormSelect, OptionPanel, ResultPanel, FormSliderPicker, AreaCascader, ImgResize, ImgZoom, } from "@/components" -// import "./index.scss"; +import { ResultFlow } from "@/components"; +import "./index.scss"; // import errorImg from "@/assets/images/layout/error.png" // import { useLocation } from "react-router-dom"; +const { RangePicker } = DatePicker; +const { TextArea } = Input; function CreateInvoice() { - return
CreateInvoice
+ const [form] = Form.useForm(); + //页面检索-重复 + const formdata = { + plate: "", //渠道类型id + payment_channels: "", //渠道类型id + operator_id: "", //运营商id + road_id: "", //操作人id + dealer_id: "", //操作人id + start_time: moment().startOf("day").format("YYYY-MM-DD HH:mm:ss"), + end_time: moment().endOf("day").format("YYYY-MM-DD HH:mm:ss"), + pn: "1", + page_size: "15", + }; + const formlayout = { + labelCol: { + span: 6, + }, + wrapperCol: { + span: 18, + }, + }; + //业务类型 + const Bussinss = [ + { + label: "停车支付订单", + value: "1", + }, + { + label: "停车卡订单", + value: "2", + }, + ]; + //开票 + const pushred = [ + { + text: "电子邮箱", + value: "email", + type: 1, + rules: [ + { + required: true, + message: "电子邮箱不能为空", + }, + { + pattern: + /^[A-Za-z0-9-_\u4e00-\u9fa5]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/, + message: "邮箱格式错误,请重新输入", + }, + ], + }, + { + text: "发票类型", + value: "qylx", + type: 2, + data: [ + { + value: 1, + label: "个人", + }, + { + value: 2, + label: "企业", + }, + ], + rules: [ + { + required: true, + message: "企业类型不能为空", + }, + ], + }, + { + text: "发票抬头", + value: "fptt", + rules: [ + { + required: true, + message: "发票抬头不能为空", + }, + ], + }, + { + text: "纳税人识别号", + value: "nsrsbh", + rules: "", + }, + { + text: "地址", + value: "dz", + rules: "", + }, + { + text: "电话", + value: "dh", + rules: [ + { + pattern: /^1[3|4|5|7|8|9]\d{9}$/, + message: "电话格式错误,请重新输入", + }, + ], + }, + { + text: "开户行", + value: "khh", + rules: "", + }, + { + text: "账号", + value: "zh", + rules: "", + }, + ]; + //检索 + const [FormData, setFormData] = useState(formdata); + //检索2 + const [FormDatas, setFormDatas] = useState(formdata); + //页面状态 + const [loading, setLoading] = useState(false); + //页面数据 + const [Data, setData] = useState({ + data: [], + total: 1, + }); + + //选中数据 + const [Selectdata, setSelectdata] = useState([]); + const [checkStrictly, setCheckStrictly] = useState(false); + //弹框显示? + const [Open, setOpen] = useState(false); + //备注 + const [Textcl, setTextcl] = useState(""); + const column = () => { + return [ + { + title: "序号", + width: 60, + fixed: "left", + render: (text, record, index) => index + 1, + }, + { + title: "区域", + dataIndex: "area", + key: "area", + align: "center", + }, + { + title: "运营商名称", + dataIndex: "operator_id", + key: "operator_id", + align: "center", + }, + { + title: "停车场名称", + dataIndex: "road_id", + key: "road_id", + align: "center", + }, + { + title: "车牌号", + dataIndex: "plate_number", + key: "plate_number", + align: "center", + }, + { + title: "开票金额", + dataIndex: "invoice_tclass", + key: "invoice_tclass", + align: "center", + }, + { + title: "渠道类型", + dataIndex: "payment_channels", + key: "payment_channels", + align: "center", + }, + { + title: "业务类型", + dataIndex: "order_type", + key: "order_type", + align: "center", + render: (_, record) => { + var buss = ""; + buss = Bussinss.filter((ele) => ele.value == _)[0].label; + return buss; + }, + }, + { + title: "支付设备", + dataIndex: "payment_equipment", + key: "payment_equipment", + align: "center", + }, + { + title: "操作人", + dataIndex: "dealer", + key: "dealer", + align: "center", + }, + { + title: "支付时间", + dataIndex: "pay_time", + key: "pay_time", + width: 120, + fixed: "right", + align: "center", + }, + { + title: "操作", + dataIndex: "operation", + key: "operation", + fixed: "right", + width: 100, + align: "center", + render: (_, record) => { + return ( +
+ + 支付详情 +
+ ); + }, + }, + ]; + }; + //列表 + const columns = column(); + + // + const rowSelection = { + onChange: (selectedRowKeys, selectedRows) => { + setSelectdata(selectedRows); + }, + }; + + //时间 + const onChangeData = (dates, dataString) => { + setFormData({ + ...FormData, + start_time: dataString[0], + end_time: dataString[1], + }); + }; + //页码 + function onShowSizeChange(pn, pn_size) { + setFormData({ + ...FormData, + pn: pn, + page_size: pn_size, + }); + setFormDatas({ + ...FormDatas, + pn: pn, + page_size: pn_size, + }); + } + //合并开票 + const InvoiceAnd = () => { + if (!Selectdata.length) { + message.warn("至少选择一项开票信息"); + } else { + setOpen(true); + console.log("还没想好"); + } + }; + //提交 + const SubmitPush = () => { + form + .validateFields() + .then((val) => { + console.log(val); + // ajax.submitPush({ ...val }).then((res) => { + // if (res.status == 20000) { + // form.resetFields(); + // message.success(res.message); + // } else { + // message.error(res.message); + // } + // }); + }) + .catch((e) => { + console.log(e); + }); + }; + //表单输出 + const FormTable = (data, disabledcol) => { + return ( + + + {data.map((ele, index) => { + if (index % 2 == 0) { + return ( + + {ele.type == 2 ? ( + + + + ) : ( + + + + )} + + ); + } else { + return ( + + {ele.type == 2 ? ( + + + + ) : ( + + + + )} + + ); + } + })} + + + ); + }; + //获取页面显示数据 + const getData = (data) => { + setLoading(false); + ajax.ElectInvoice.getInvoice({ ...data }).then( + (res) => { + if (parseInt(res?.status) === 20000) { + setData({ + data: res?.data.list || {}, + total: res.data.total || 0, + }); + setLoading(true); + } else { + message.error(res?.message); + } + setLoading(true); + }, + (err) => { + console.log(err); + setLoading(true); + } + ); + }; + useEffect(() => { + getData(FormDatas); + //调用接口 + }, [FormDatas]); + + return ( +
+
+
+
查询条件
+
+ 运营商名称 +
+ + setFormData({ + ...FormData, + payment_channels: e, + }) + } + /> +
+
+
+ 车牌号 +
+ + setFormData({ + ...FormData, + plate: e.target.value, + }) + } + /> +
+
+
+ 停车场名称 +
+ + setFormData({ + ...FormData, + road_id: e.target.value, + }) + } + /> +
+
+
+ 支付时间 +
+ + onChangeData(dates, dataString) + } + /> +
+
+
+ 操作人 +
+ + setFormData({ + ...FormData, + dealer_id: e.target.value, + }) + } + /> +
+
+
+ { + var reset = formdata; + setFormData(reset); + setFormDatas(reset); + }} + > + 重置 + + { + setFormDatas({ ...FormData }); + }} + > + 查询 + + { + InvoiceAnd(); + }} + > + 合并开票 + +
+
+
+ +
+
record.id} + dataSource={Data.data} + pagination={false} + rowSelection={{ + ...rowSelection, + checkStrictly, + }} + scroll={{ + y: "calc(100vh - 300px)", + }} + /> + +
+ `共 ${total_records} 条`} + total={Data.total} + current={FormData.pn} + pageSize={FormData.page_size} + pageSizeOptions={dictionary?.pageSizeOptions} + onChange={onShowSizeChange} + onShowSizeChange={onShowSizeChange} + /> +
+ + + + { + setOpen(false); + }} + width={800} + className="modal-invoicerepeat" + title={"开具电子发票"} + > + {FormTable(pushred, [])} +
+

+ 发票内容 + 停车费 +

+

+ 发票金额 + 4.00元 +

+
+
+

SubmitPush()}> + 提交 +

+

{ + form.resetFields(); + setOpen(false); + }} + > + 取消 +

+
+
+ + ); } -export default CreateInvoice; \ No newline at end of file +export default CreateInvoice; diff --git a/src/pages/FinancialMgm/Invoice/CreateInvoiceRecord/index.scss b/src/pages/FinancialMgm/Invoice/CreateInvoiceRecord/index.scss index 1034037..f2195a1 100644 --- a/src/pages/FinancialMgm/Invoice/CreateInvoiceRecord/index.scss +++ b/src/pages/FinancialMgm/Invoice/CreateInvoiceRecord/index.scss @@ -100,6 +100,11 @@ $color-primary : var(--color-primary); box-shadow: 0px 3px 8px 0px rgba(0, 0, 0, 0.12); border-radius: 28px 0 0 0; + .table_raps { + width: 1300px; + // overflow-x: scroll; + } + .yisa-table { width: 100%; @@ -135,4 +140,46 @@ $color-primary : var(--color-primary); } } } +} + +.modal-invoicerepeat { + .fptext { + width: 100%; + display: flex; + padding: 0 10px; + + .fpo { + width: 50%; + + span { + margin-right: 10px; + } + } + } + + .submitBtn { + text-align: center; + margin-top: 20px; + + .ant-btn { + width: 80px; + height: 35px; + border: none; + border-radius: 4px; + + line-height: 27px; + color: #ffffff; + + } + + .submit { + background: #409eff; + } + + .cancel { + background: var(--button-default-bg); + margin-left: 20px; + } + } + } \ No newline at end of file diff --git a/src/pages/FinancialMgm/Invoice/CreateInvoiceRecord/loadable.jsx b/src/pages/FinancialMgm/Invoice/CreateInvoiceRecord/loadable.jsx index ba94ea1..c05671a 100644 --- a/src/pages/FinancialMgm/Invoice/CreateInvoiceRecord/loadable.jsx +++ b/src/pages/FinancialMgm/Invoice/CreateInvoiceRecord/loadable.jsx @@ -1,19 +1,22 @@ import React, { useState, useRef, useEffect } from "react"; import { - message, - Pagination, - Table, - Select, - Input, - Popover, - Modal, - Button, - DatePicker, + message, + Pagination, + Table, + Select, + Input, + Popover, + Modal, + Button, + Row, + Col, + Form, + DatePicker, } from "antd"; import { dictionary, utils } from "@/config/common"; import moment from "moment"; -import { DeleteOutlined } from '@ant-design/icons'; -import ajax from '@/services' +import { DeleteOutlined } from "@ant-design/icons"; +import ajax from "@/services"; // import { useSessionStorageState, useUpdateEffect, useSize, useUpdate } from 'ahooks'; import { ResultFlow } from "@/components"; import "./index.scss"; @@ -21,598 +24,803 @@ import "./index.scss"; // import { useLocation } from "react-router-dom"; const { RangePicker } = DatePicker; const { TextArea } = Input; +/** + * @description 开票记录 + * @returns + */ function CreateInvoiceRecord() { - //页面检索-重复 - const formdata = { - invoice: "",//发票号码 - email: "",//邮箱 - employee: "1",//商户 - invoice_t: "",//发票抬头 - invoice_class: "1",//发票类型 - start_time: moment().startOf("day").format("YYYY-MM-DD HH:mm:ss"), - end_time: moment().endOf("day").format("YYYY-MM-DD HH:mm:ss"), - invoice_status: '1',//状态 - pn: "1", - page_size: "15", - }; - //检索 - const [FormData, setFormData] = useState(formdata); - //检索2 - const [FormDatas, setFormDatas] = useState(formdata); - //页码状态 - const [loading, setLoading] = useState(true); - //页面数据 - const [Data, setData] = useState({ - data: [ - { - email: "1425525520@qq.com", - invoice_code: "03702230011", - invoice: "98050831", - employee: "公用事业集团", - invoice_tclass: "个人", - invoice_text: "停车费", - invoice_t: "个人", - people_code: "91370211MA3CE4756A", - invoice_money: "2.00", - tax: "0.17", - rate: "0.17", - invoice_class: "正常", - serive_class: "停车", - status: "正常开票", - invoice_time: "2023-09-19 15:21:29" - }, - { - email: "1425525520@qq.com", - invoice_code: "03702230011", - invoice: "98050831", - employee: "公用事业集团", - invoice_tclass: "个人", - invoice_text: "停车费", - invoice_t: "个人", - people_code: "91370211MA3CE4756A", - invoice_money: "2.00", - tax: "0.17", - rate: "0.17", - invoice_class: "正常", - serive_class: "停车", - status: "正常开票", - invoice_time: "2023-09-19 15:21:29" - }, - { - email: "1425525520@qq.com", - invoice_code: "03702230011", - invoice: "98050831", - employee: "公用事业集团", - invoice_tclass: "个人", - invoice_text: "停车费", - invoice_t: "个人", - people_code: "91370211MA3CE4756A", - invoice_money: "2.00", - tax: "0.17", - rate: "0.17", - invoice_class: "正常", - serive_class: "停车", - status: "正常开票", - invoice_time: "2023-09-19 15:21:29" - }, - { - email: "1425525520@qq.com", - invoice_code: "03702230011", - invoice: "98050831", - employee: "公用事业集团", - invoice_tclass: "个人", - invoice_text: "停车费", - invoice_t: "个人", - people_code: "91370211MA3CE4756A", - invoice_money: "2.00", - tax: "0.17", - rate: "0.17", - invoice_class: "正常", - serive_class: "停车", - status: "正常开票", - invoice_time: "2023-09-19 15:21:29" - }, { - email: "1425525520@qq.com", - invoice_code: "03702230011", - invoice: "98050831", - employee: "公用事业集团", - invoice_tclass: "个人", - invoice_text: "停车费", - invoice_t: "个人", - people_code: "91370211MA3CE4756A", - invoice_money: "2.00", - tax: "0.17", - rate: "0.17", - invoice_class: "正常", - serive_class: "停车", - status: "正常开票", - invoice_time: "2023-09-19 15:21:29" - }, - ], - total: 1, - }); - - - //弹框显示? - const [Open, setOpen] = useState(false); - //备注 - const [Textcl, setTextcl] = useState(""); - const column = () => { - return [ - { - title: '序号', - width: 60, - fixed: "left", - render: (text, record, index) => index + 1, - }, - { - title: "电子邮箱", - dataIndex: "email", - key: "email", - align: "center", - }, - { - title: "发票代码", - dataIndex: "invoice_code", - key: "invoice_code", - align: "center", - }, - { - title: "发票号码", - dataIndex: "invoice", - key: "invoice", - align: "center", - }, - { - title: "商户名称", - dataIndex: "employee", - key: "employee", - align: "center", - }, - { - title: "发票抬头类型", - dataIndex: "invoice_tclass", - key: "invoice_tclass", - align: "center", - }, - { - title: "发票内容", - dataIndex: "invoice_text", - key: "invoice_text", - align: "center", - }, - { - title: "发票抬头", - dataIndex: "invoice_t", - key: "invoice_t", - align: "center", - }, - { - title: "纳税人识别号", - dataIndex: "people_code", - key: "people_code", - align: "center", - }, - { - title: "开票金额", - dataIndex: "invoice_money", - key: "invoice_money", - align: "center", - }, - { - title: "税额", - dataIndex: "tax", - key: "tax", - align: "center", - }, - { - title: "税率", - dataIndex: "rate", - key: "rate", - align: "center", - }, - { - title: "发票类型", - dataIndex: "invoice_class", - key: "invoice_class", - align: "center", - }, - { - title: "业务类型", - dataIndex: "serive_class", - key: "serive_class", - align: "center", - }, - { - title: "状态", - dataIndex: "status", - key: "status", - align: "center", - }, - { - title: "开票时间", - dataIndex: "invoice_time", - key: "invoice_time", - width: 120, - fixed: 'right', - align: "center", - }, - { - title: "操作", - dataIndex: "operation", - key: "operation", - fixed: 'right', - width: 100, - align: "center", - render: (_, record) => { - return ( - - - - - - } - > - - - ); - }, - }, - ] - } - //列表 - const columns = column(); - + const [form] = Form.useForm(); + //页面检索-重复 + const formdata = { + ordernum: "", //发票号码 + email: "", //邮箱 + sell_name: "", //商户 + head_name: "", //发票抬头 + order_type: "", //发票类型 + start_time: moment().startOf("day").format("YYYY-MM-DD HH:mm:ss"), + end_time: moment().endOf("day").format("YYYY-MM-DD HH:mm:ss"), + zt: "", //状态 + pn: "1", + page_size: "15", + }; + const formlayout = { + labelCol: { + span: 6, + }, + wrapperCol: { + span: 18, + }, + }; + //发票类型 + const orderType = [ + { + value: "0", + label: "正票", + }, + { + value: "2", + label: "红票", + }, + ]; + //状态 + const Zta = [ + { + value: "0", + label: "正常开票", + }, + { + value: "2", + label: "红票", + }, + { + value: "1", + label: "正票重开", + }, + ]; + //抬头类型 + const Headtype = [ + { + label: "个人", + value: "1", + }, + { + label: "企业", + value: "2", + }, + ]; + //业务类型 + const Bussinss = [ + { + label: "停车支付订单", + value: "1", + }, + { + label: "停车卡订单", + value: "2", + }, + ]; + //检索 + const [FormData, setFormData] = useState(formdata); + //检索2 + const [FormDatas, setFormDatas] = useState(formdata); + //页码状态 + const [loading, setLoading] = useState(false); + //页面数据 + const [Data, setData] = useState({ + data: [], + total: 0, + }); - //时间 - const onChangeData = (dates, dataString) => { - setFormData({ - ...FormData, - start_time: dataString[0], - end_time: dataString[1], - }); - }; - //页码 - function onShowSizeChange(pn, pn_size) { - setFormData({ - ...FormData, - pn: pn, - page_size: pn_size, - }); - setFormDatas({ - ...FormData, - pn: pn, - page_size: pn_size, - }); - } - //获取页面显示数据 - const getData = (data) => { - setLoading(false) - ajax.getRepart({ ...data }).then( - (res) => { - if (parseInt(res?.status) === 20000) { - setData({ - data: res?.data || {}, - total: res.total || 0 - }); - setLoading(true) - } else { - message.error(res?.message); - } - setLoading(true); - }, - (err) => { - console.log(err); - setLoading(true); - } - ); - } - useEffect(() => { - console.log(FormDatas); - //调用接口 - }, [FormDatas]); - - return
-
-
-
查询条件
-
- - 发票号码 - -
- - setFormData({ - ...FormData, - invoice: e.target.value, - }) - } - /> -
-
-
- - 邮箱 - -
- - setFormData({ - ...FormData, - email: e.target.value, - }) - } - /> -
-
-
- 商户名称 -
- - setFormData({ - ...FormData, - invoice_t: e.target.value, - }) - } - /> -
-
-
- 发票类型 -
- { + return [ + { + title: "序号", + width: 60, + fixed: "left", + render: (text, record, index) => index + 1, + }, + { + title: "电子邮箱", + dataIndex: "email", + width: 120, + key: "email", + align: "center", + }, + { + title: "发票代码", + dataIndex: "ordercode", + width: 120, + key: "ordercode", + align: "center", + }, + { + title: "发票号码", + width: 120, + dataIndex: "orderNo", + key: "orderNo", + align: "center", + }, + { + title: "商户名称", + width: 120, + dataIndex: "sell_name", + key: "sell_name", + align: "center", + }, + { + title: "发票抬头类型", + width: 120, + dataIndex: "head_type", + key: "head_type", + align: "center", + render: (_, record) => { + var head = ""; + head = Headtype.filter((ele) => ele.value == _)[0].label; + return head; + }, + }, + { + title: "发票内容", + width: 120, + dataIndex: "invoice_content", + key: "invoice_content", + align: "center", + }, + { + title: "发票抬头", + width: 120, + dataIndex: "header_name", + key: "header_name", + align: "center", + }, + { + title: "纳税人识别号", + width: 120, + dataIndex: "tax_num", + key: "tax_num", + align: "center", + }, + { + title: "开票金额", + width: 120, + dataIndex: "invoice_money", + key: "invoice_money", + align: "center", + render: (_, record) => { + return _ && _ + "元"; + }, + }, + { + title: "税额", + width: 120, + dataIndex: "tax", + key: "tax", + align: "center", + render: (_, record) => { + return _ && _ + "元"; + }, + }, + { + title: "税率", + width: 120, + dataIndex: "tax_rate", + key: "tax_rate", + align: "center", + }, + { + title: "发票类型", + width: 120, + dataIndex: "ordertype", + key: "ordertype", + align: "center", + render: (_, record) => { + var ordertype = ""; + ordertype = orderType.filter((ele) => ele.value == _)[0].label; + return ordertype; + }, + }, + { + title: "业务类型", + width: 120, + dataIndex: "order_type", + key: "order_type", + align: "center", + render: (_, record) => { + var buss = ""; + buss = Bussinss.filter((ele) => ele.value == _)[0].label; + return buss; + }, + }, + { + title: "状态", + width: 120, + dataIndex: "zt", + key: "zt", + align: "center", + render: (_, record) => { + var ztas = ""; + ztas = Zta.filter((ele) => ele.value == _)[0].label; + return ztas; + }, + }, + { + title: "开票时间", + width: 120, + dataIndex: "create_time", + key: "create_time", + align: "center", + }, + { + title: "操作", + dataIndex: "operation", + key: "operation", + fixed: "right", + width: 100, + align: "center", + render: (_, record) => { + return ( + + -
- + +
+ } + > + + + ); + }, + }, + ]; + }; + //列表 + const columns = column(); + + //开票 + const pushred = [ + { + text: "电子邮箱", + value: "email", + type: 1, + rules: [ + { + required: true, + message: "电子邮箱不能为空", + }, + { + pattern: + /^[A-Za-z0-9-_\u4e00-\u9fa5]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/, + message: "邮箱格式错误,请重新输入", + }, + ], + }, + { + text: "企业类型", + value: "qylx", + type: 2, + data: [ + { + value: 1, + label: "个人", + }, + { + value: 2, + label: "企业", + }, + ], + rules: [ + { + required: true, + message: "企业类型不能为空", + }, + ], + }, + { + text: "发票抬头", + value: "fptt", + rules: [ + { + required: true, + message: "发票抬头不能为空", + }, + ], + }, + { + text: "纳税人识别号", + value: "nsrsbh", + rules: "", + }, + { + text: "地址", + value: "dz", + rules: "", + }, + { + text: "电话", + value: "dh", + rules: [ + { + pattern: /^1[3|4|5|7|8|9]\d{9}$/, + message: "电话格式错误,请重新输入", + }, + ], + }, + { + text: "开户行", + value: "khh", + rules: "", + }, + { + text: "账号", + value: "zh", + rules: "", + }, + ]; + //时间 + const onChangeData = (dates, dataString) => { + setFormData({ + ...FormData, + start_time: dataString[0], + end_time: dataString[1], + }); + }; + //页码 + function onShowSizeChange(pn, pn_size) { + setFormData({ + ...FormData, + pn: pn, + page_size: pn_size, + }); + setFormDatas({ + ...FormDatas, + pn: pn, + page_size: pn_size, + }); + } + //提交 + const SubmitPush = () => { + form + .validateFields() + .then((val) => { + console.log(val); + // ajax.submitPush({ ...val }).then((res) => { + // if (res.status == 20000) { + // form.resetFields(); + // message.success(res.message); + // } else { + // message.error(res.message); + // } + // }); + }) + .catch((e) => { + console.log(e); + }); + }; + //表单输出 + const FormTable = (data, disabledcol) => { + return ( +
+ + {data.map((ele, index) => { + if (index % 2 == 0) { + return ( +
+ {ele.type == 2 ? ( + + + + ) : ( + + + + )} + + ); + } else { + return ( + + {ele.type == 2 ? ( + + + + ) : ( + + + + )} + + ); + } + })} + + + ); + }; + //获取页面显示数据 + const getData = (data) => { + setLoading(false); + ajax.ElectInvoice.getInvoiceMess({ ...data }).then( + (res) => { + if (parseInt(res?.status) === 20000) { + console.log(res); + setData({ + data: res?.data || {}, + total: res.total || 0, + }); + setLoading(true); + } else { + message.error(res?.message); + } + setLoading(true); + }, + (err) => { + console.log(err); + setLoading(true); + } + ); + }; + useEffect(() => { + getData(FormDatas); + //调用接口 + }, [FormDatas]); + + return ( +
+
+
+
查询条件
+
+ 发票号码 +
+ + setFormData({ + ...FormData, + ordernum: e.target.value, + }) + } + /> +
+
+
+ 邮箱 +
+ + setFormData({ + ...FormData, + email: e.target.value, + }) + } + /> +
+
+
+ 商户名称 +
+ + setFormData({ + ...FormData, + head_name: e.target.value, + }) + } + /> +
+
+
+ 发票类型 +
+
record.id} - dataSource={Data.data} - pagination={false} - scroll={{ - x: 1300, - y: "calc(100vh - 300px)" - }} - /> - -
- `共 ${total_records} 条`} - total={Data.total} - current={FormData.pn} - pageSize={FormData.page_size} - pageSizeOptions={dictionary?.pageSizeOptions} - onChange={onShowSizeChange} - onShowSizeChange={onShowSizeChange} - /> -
- + +
+ 开票日期 +
+ + onChangeData(dates, dataString) + } + /> +
+
+
+ 状态 +
+
record.id} + dataSource={Data.data} + pagination={false} + scroll={{ + x: 1300, + y: "calc(100vh - 300px)", + }} + /> + +
+ `共 ${total_records} 条`} + total={Data.total} + current={FormData.pn} + pageSize={FormData.page_size} + pageSizeOptions={dictionary?.pageSizeOptions} + onChange={onShowSizeChange} + onShowSizeChange={onShowSizeChange} + /> +
+ + + + { + setOpen(false); + }} + width={800} + className="modal-invoicerepeat" + title={"发票冲红重开"} + > + {FormTable(pushred, [])} +
+

+ 发票内容 + 停车费 +

+

+ 发票金额 + 4.00元 +

+
+
+

SubmitPush()}> + 提交 +

+

{ + form.resetFields(); + setOpen(false); + }} + > + 取消 +

+
+ ); } -export default CreateInvoiceRecord; \ No newline at end of file +export default CreateInvoiceRecord; diff --git a/src/pages/FinancialMgm/SettleBill/PayRepeat/loadable.jsx b/src/pages/FinancialMgm/SettleBill/PayRepeat/loadable.jsx index 4fcb15b..7f7a88a 100644 --- a/src/pages/FinancialMgm/SettleBill/PayRepeat/loadable.jsx +++ b/src/pages/FinancialMgm/SettleBill/PayRepeat/loadable.jsx @@ -365,7 +365,7 @@ function PayRepeat() { page_size: pn_size, }); setFormDatas({ - ...FormData, + ...FormDatas, pn: pn, page_size: pn_size, }); diff --git a/src/router/router.config.js b/src/router/router.config.js index cd19e73..3dd7dfa 100644 --- a/src/router/router.config.js +++ b/src/router/router.config.js @@ -835,6 +835,40 @@ let routes = [ component: pages.CreateInvoice, }, { + // -------------------------------财务管理 - 财务报表 + path: "/financialMgm/parkingIncomeReport", + text: "停车收入报表", + name: "parkingIncomeReport", + component: pages.ParkingIncomeReport, + }, + { + path: "/financialMgm/operationReport", + text: "运营报表", + name: "operationReport", + component: pages.OperationReport, + }, + { + path: "/financialMgm/preOrderReport", + text: "预付报表", + name: "preOrderReport", + component: pages.PreOrderReport, + },{ + path: "/financialMgm/paySummaryReport", + text: "总收入报表", + name: "paySummaryReport", + component: pages.PaySummaryReport, + },{ + path: "/financialMgm/payChannelStat", + text: "渠道统计", + name: "payChannelStat", + component: pages.PayChannelStat, + },{ + path: "/financialMgm/pdaStat", + text: "PDA统计", + name: "pdaStat", + component: pages.PdaStat, + }, + { // -------------------------------财务管理 - 异常处理 - 发起异常处理 path: "/financialMgm/startExceptionDeal", text: "发起异常处理", diff --git a/src/services/ElectInvoice/index.js b/src/services/ElectInvoice/index.js new file mode 100644 index 0000000..1efefb1 --- /dev/null +++ b/src/services/ElectInvoice/index.js @@ -0,0 +1,43 @@ +import ajax from "../../config/ajax" + +//************************发票记录 +// 获取列表数据 +const getInvoiceMess = (params)=>{ + return ajax({ + url: "/api/fin/elec_invoice/get_list", + type: "post", + data: params, + }) +} +//发票冲红 +const FlushRed = (params) => { + return ajax({ + url: "/api/fin/elec_invoice/deal_invoice", + type: "post", + data: params, + }) +} +// 订阅任务-新增基本信息订阅级别数据获取 +const getModalResource = ()=>{ + return ajax({ + url: "/api/v1/controlalarm/subscribes/get_deploy_subscribe_modal_resource", + type: "get", + // data: params, + }) +} +//************************开具发票 +// 获取列表数据 +const getInvoice = (params)=>{ + return ajax({ + url: "/api/fin/elec_invoice/get_invoice_list", + type: "post", + data: params, + }) +} + + +export default { + getInvoiceMess, + FlushRed, + getInvoice, +} \ No newline at end of file diff --git a/src/services/index.js b/src/services/index.js index 0dd733c..36f50d5 100644 --- a/src/services/index.js +++ b/src/services/index.js @@ -18,6 +18,7 @@ import ZombieCarCleanRecord from "./OutRoadMgm"; import AdminMgm from "./SystemMgm"; import RoleMgm from "./SystemMgm"; import BusinessConf from "./SystemMgm"; +import ElectInvoice from "./ElectInvoice"; const api = {}; export default { ...api, @@ -40,5 +41,6 @@ export default { ...ZombieCarCleanRecord, ...AdminMgm, ...RoleMgm, - ...BusinessConf + ...BusinessConf, + ElectInvoice };