From 345c90cecfb6b7a9a6ba435119b0ddc3f95ac778 Mon Sep 17 00:00:00 2001 From: ylj20011123 Date: Mon, 20 Oct 2025 18:44:03 +0800 Subject: [PATCH] update --- src/pages/DigitalElectronics/index.tsx | 326 +++-------------- src/pages/DigitalElectronics/service.ts | 15 + src/pages/InvoiceInquiry/index.tsx | 14 + .../redReversal/components/InvoiceDetial.tsx | 334 ++++++++++++++++++ src/pages/redReversal/index.tsx | 14 + 5 files changed, 418 insertions(+), 285 deletions(-) create mode 100644 src/pages/redReversal/components/InvoiceDetial.tsx diff --git a/src/pages/DigitalElectronics/index.tsx b/src/pages/DigitalElectronics/index.tsx index 614952a..5092956 100644 --- a/src/pages/DigitalElectronics/index.tsx +++ b/src/pages/DigitalElectronics/index.tsx @@ -8,6 +8,7 @@ import { handleGetAppToken, handleGetBILLDETAILList, handleGetBILLList, handleGe import moment from "moment"; import { encryptAES } from "@/utils/handleAes"; import { ProForm, ProFormSelect, ProFormTextArea } from "@ant-design/pro-components"; +import InvoiceDetial from "../redReversal/components/InvoiceDetial"; interface ConnectState { user: { @@ -55,6 +56,8 @@ const DigitalElectronics: React.FC<{ currentUser: any }> = (props) => { const [currentRow, setCurrentRow] = useState() // 红冲悬浮框点击的加载效果 const [confirmLoading, setConfirmLoading] = useState(false) + // 显示详情抽屉 + const [showDetailModal, setShowDetailModal] = useState(false) const columns: any = [ { title: '服务区名称', @@ -79,6 +82,13 @@ const DigitalElectronics: React.FC<{ currentUser: any }> = (props) => { align: 'center', ellipsis: true, hideInSearch: true, + render: (_, record) => { + return record?.BILL_NO ? + { + setCurrentRow(record) + setShowDetailModal(true) + }}>{record?.BILL_NO} : "" + } }, { title: '流水号', @@ -638,35 +648,35 @@ const DigitalElectronics: React.FC<{ currentUser: any }> = (props) => { setAccessToken(accessToken.data.access_token) - // const queryData = { - // // sellerTaxpayerId: "91530112MA7MQ2JR9U", - // sellerTaxpayerId: publicParams.sellerTaxpayerId, - // serialNo: '202509-401206-0014', - // }; - // console.log('queryDataqueryData', queryData); + const queryData = { + // sellerTaxpayerId: "91530112MA7MQ2JR9U", + sellerTaxpayerId: publicParams.sellerTaxpayerId, + serialNo: '20251020-5300001245-009', + }; + console.log('queryDataqueryData', queryData); - // // 将data字段进行base64加密 - // const dataStringOld = JSON.stringify(queryData); - // const encryptedDataOld = btoa(unescape(encodeURIComponent(dataStringOld))); + // 将data字段进行base64加密 + const dataStringOld = JSON.stringify(queryData); + const encryptedDataOld = btoa(unescape(encodeURIComponent(dataStringOld))); - // // 构造最终请求参数 - // const requestParams = { - // businessSystemCode: "BUSINESS_YCIC", - // interfaceCode: "BILL.INVOICE.QUERY", - // requestId: Date.now().toString(), - // data: encryptedDataOld - // }; + // 构造最终请求参数 + const requestParams = { + businessSystemCode: "BUSINESS_YCIC", + interfaceCode: "BILL.INVOICE.QUERY", + requestId: Date.now().toString(), + data: encryptedDataOld + }; - // console.log('最终请求参数:', requestParams); + console.log('最终请求参数:', requestParams); - // let reqResult: any = { - // ReqUrl: `https://cosmic.piaozone.com/ynjtjtjykf/kapi/app/sim/openApi?access_token=${accessToken.data.access_token}`, - // Access_token: accessToken.data.access_token, - // data: JSON.stringify(requestParams) - // } - // let responseOld = await handleGetForwardJDPJInterface(reqResult) - // console.log('responseOldresponseOldresponseOld', responseOld); - // responseOld = JSON.parse(responseOld as any) + let reqResult: any = { + ReqUrl: `https://cosmic.piaozone.com/ynjtjtjykf/kapi/app/sim/openApi?access_token=${accessToken.data.access_token}`, + Access_token: accessToken.data.access_token, + data: JSON.stringify(requestParams) + } + let responseOld = await handleGetForwardJDPJInterface(reqResult) + console.log('responseOldresponseOldresponseOld', responseOld); + responseOld = JSON.parse(responseOld as any) // 老 // // 调用查询接口 (这里需要传入正确的code参数) @@ -787,6 +797,8 @@ const DigitalElectronics: React.FC<{ currentUser: any }> = (props) => { useEffect(async () => { // 先调用token 后续这个页面用得到 await handleGetTokenInPage() + + }, []) @@ -803,13 +815,12 @@ const DigitalElectronics: React.FC<{ currentUser: any }> = (props) => { rowKey={(record) => { return `${record?.billNo}` }} - scroll={{ x: "100%", y: 'calc(100vh - 450px)' }} + scroll={{ x: "100%", y: 'calc(100vh - 350px)' }} headerTitle={待开票列表} search={{ span: 6, labelWidth: 100 }} request={async (params: any) => { const search = window.location.search; const addressParams = Object.fromEntries(new URLSearchParams(search).entries()); - console.log('addressParamsaddressParamsaddressParams', addressParams); const userInfo = await handleGetUserInfo(addressParams.UserIdEncrypted) // 获取票据信息表列表 @@ -829,264 +840,6 @@ const DigitalElectronics: React.FC<{ currentUser: any }> = (props) => { return { data: data, success: true } } return { data: [], success: true } - - - // let req: any = { - // appId: "FPY001", - // appSecret: "FPY001fpy@2023***", - // accountId: "2280459335882518528", - // tenantid: "xhcamzchwbgonerr", - // language: "" - // } - // const token = await handleGetAppToken(req) - // console.log('tokentokentoken', token); - - // let appToken: any = token.data.app_token - - // let tokenReq: any = { - // user: "18620126214", - // apptoken: appToken, - // tenantid: "xhcamzchwbgonerr", - // accountId: "2280459335882518528", - // usertype: "" - // } - - // const accessToken: any = await handleGetSDToken(tokenReq) - // console.log('accessTokenaccessTokenaccessToken', accessToken); - - // setAppToken(appToken) - // setAccessToken(accessToken.data.access_token) - - - // // 模拟数据 - // const mockData: any = [ - // // // 专票 - // // { - // // billNo: "SRM_202508220957", // 单据编号 - // // billDate: "2025-08-22", // 单据日期 - // // totalAmount: 10, // 单据金额 - // // includeTaxFlag: "1",// 判断是否含税 - // // autoInvoice: "1",// 自动开票标记 - // // invoiceType: "10xdp", //发票种类 - // // buyerName: "深圳市顺丰快运有限公司test01", // 购买方名称 - // // buyerProperty: "0", // 购买方性质 - // // sellerTaxpayerId: "91530112MA7MQ2JR9U", // 销方税号 写死 - // // sellerName: "云南交投集团经营开发有限公司彩云驿商业管理分公司", // 销方名称 写死 - // // sellerBankAndAccount: "13710884704", // 销方银行和账号 写死 - // // sellerAddressAndTel: "", // 销方地址和电话 写死 应该可以不传 - // // drawer: "测试人",// 开票人 - // // buyerRecipientPhone: "18158132615",// 购方收票手机号 - // // buyerRecipientMail: "",// 购方收件邮箱 - // // amount: 10, // 明细金额 明细金额,含税标识includeTaxFlag=1时该金额为含税金额 - // // detailId: "1194121661989796666",// 业务系统明细id 业务系统明细id,用于反写回原业务系统明细 【长度:50】 - // // goodsName: "蜂胶口腔膜",// 商品名称 商品名称,与商品编码2填1,需提前在系统维护【长度:GBK92字节】 - // // lineProperty: 2,// 行性质 行性质,1折扣行(折扣行必须紧跟被折扣的正常商品行),2正常商品行 - // // price: 10,// 单价 单价【长度:整数位加小数位最大16位,小数位最多13,小数点占1位】,price有值则quantity必填,含税标识includeTaxFlag=1时该金额为含税金额 - // // quantity: 1,// 数量 数量【长度:整数位加小数位最大16位,小数位最多13,小数点占1位】,quantity有值则price必填 - // // revenueCode: "1070304990000000000",// 税收分类编码 税收分类编码,开票项补全或映射会补全税收分类编码,未走开票项补全或映射必填 - // // taxRate: "0.13",// 税率 税率,【0.13,0.09,0.06等】。不传时根据开票项匹配税率 - // // units: "个"// 计量单位 计量单位,【长度:GBK22字节】 - - // // // billDetail: [ - // // // { - - // // // } - // // // ] - // // }, - // // { - // // billNo: "SRM_202508220966", // 单据编号 - // // billDate: "2025-08-22", // 单据日期 - // // totalAmount: 10, // 单据金额 - // // includeTaxFlag: "1",// 判断是否含税 - // // autoInvoice: "1",// 自动开票标记 - // // invoiceType: "10xdp", //发票种类 - // // buyerName: "深圳市顺丰快运有限公司test01", // 购买方名称 - // // buyerProperty: "0", // 购买方性质 - // // sellerTaxpayerId: "91530112MA7MQ2JR9U", // 销方税号 写死 - // // sellerName: "云南交投集团经营开发有限公司彩云驿商业管理分公司", // 销方名称 写死 - // // sellerBankAndAccount: "13710884704", // 销方银行和账号 写死 - // // sellerAddressAndTel: "", // 销方地址和电话 写死 应该可以不传 - // // drawer: "测试人",// 开票人 - // // buyerRecipientPhone: "18158132615",// 购方收票手机号 - // // buyerRecipientMail: "",// 购方收件邮箱 - // // amount: 10, // 明细金额 明细金额,含税标识includeTaxFlag=1时该金额为含税金额 - // // detailId: "1194121661989796666",// 业务系统明细id 业务系统明细id,用于反写回原业务系统明细 【长度:50】 - // // goodsName: "蜂胶口腔膜",// 商品名称 商品名称,与商品编码2填1,需提前在系统维护【长度:GBK92字节】 - // // lineProperty: 2,// 行性质 行性质,1折扣行(折扣行必须紧跟被折扣的正常商品行),2正常商品行 - // // price: 10,// 单价 单价【长度:整数位加小数位最大16位,小数位最多13,小数点占1位】,price有值则quantity必填,含税标识includeTaxFlag=1时该金额为含税金额 - // // quantity: 1,// 数量 数量【长度:整数位加小数位最大16位,小数位最多13,小数点占1位】,quantity有值则price必填 - // // revenueCode: "1070304990000000000",// 税收分类编码 税收分类编码,开票项补全或映射会补全税收分类编码,未走开票项补全或映射必填 - // // taxRate: "0.13",// 税率 税率,【0.13,0.09,0.06等】。不传时根据开票项匹配税率 - // // units: "个"// 计量单位 计量单位,【长度:GBK22字节】 - - // // // billDetail: [ - // // // { - - // // // } - // // // ] - // // }, - // // // 普票 - // // { - // // billNo: "SRM_202508221427", // 单据编号 - // // billDate: "2025-08-22", // 单据日期 - // // totalAmount: -10, // 单据金额 - // // includeTaxFlag: "1",// 判断是否含税 - // // invoiceProperty: 0, - // // autoMerge: 1, - // // autoInvoice: 1,// 自动开票标记 - // // invoiceType: "10xdp", //发票种类 - // // buyerName: "深圳市顺丰快运有限公司test01", // 购买方名称 - // // buyerProperty: "0", // 购买方性质 - // // sellerTaxpayerId: "91530112MA7MQ2JR9U", // 销方税号 写死 - // // sellerName: "云南交投集团经营开发有限公司彩云驿商业管理分公司", // 销方名称 写死 - // // sellerBankAndAccount: "13710884704", // 销方银行和账号 写死 - // // sellerAddressAndTel: "", // 销方地址和电话 写死 应该可以不传 - // // drawer: "测试人",// 开票人 - // // buyerRecipientPhone: "18158132615",// 购方收票手机号 - // // buyerRecipientMail: "",// 购方收件邮箱 - // // amount: -10, // 明细金额 明细金额,含税标识includeTaxFlag=1时该金额为含税金额 - // // detailId: "1194121661989796666",// 业务系统明细id 业务系统明细id,用于反写回原业务系统明细 【长度:50】 - // // goodsName: "蜂胶口腔膜",// 商品名称 商品名称,与商品编码2填1,需提前在系统维护【长度:GBK92字节】 - // // lineProperty: 2,// 行性质 行性质,1折扣行(折扣行必须紧跟被折扣的正常商品行),2正常商品行 - // // price: -10,// 单价 单价【长度:整数位加小数位最大16位,小数位最多13,小数点占1位】,price有值则quantity必填,含税标识includeTaxFlag=1时该金额为含税金额 - // // quantity: 1,// 数量 数量【长度:整数位加小数位最大16位,小数位最多13,小数点占1位】,quantity有值则price必填 - // // revenueCode: "1070304990000000000",// 税收分类编码 税收分类编码,开票项补全或映射会补全税收分类编码,未走开票项补全或映射必填 - // // taxRate: "0.13",// 税率 税率,【0.13,0.09,0.06等】。不传时根据开票项匹配税率 - // // units: "个",// 计量单位 计量单位,【长度:GBK22字节】 - // // redReason: "2", - // // blueInvoiceType: "026", - // // originalIssueTime: "2025-08-24 15:00:00", - // // blueinvoiceCode: "testBlueCode2025-08-25", - // // blueinvoiceNo: "testBlueNo2025-08-25" - // // // billDetail: [ - // // // { - - // // // } - // // // ] - // // }, - // // { - // // billNo: "202508220003", - // // billDate: "2025-08-22", - // // autoInvoice: "1", - // // includeTaxFlag: "0", - // // invoiceProperty: "1", - // // invoiceType: "10xdp", - // // totalAmount: -8.85, - // // buyerTaxpayerId: "91440300MA5G9GK78Y", - // // buyerName: "深圳市顺丰快运有限公司test01", - // // sellerTaxpayerId: "91530112MA7MQ2JR9U", - // // sellerName: "云南交投集团经营开发有限公司彩云驿商业管理分公司", - // // sellerBankAndAccount: "13710884704", - // // sellerAddressAndTel: "高新技术产业园南区科技南十二路58996989", - // // drawer: "王协芬", - // // autoMerge: "0", - // // blueinvoiceNo: "SRM_202508220966", - // // redReason: "2", - // // amount: -8.85, - // // goodsName: "通天口服液", - // // lineProperty: 2, - // // price: -12, - // // quantity: 5, - // // revenueCode: "1070304990000000000", - // // taxRate: "0.09", - // // units: "盒" - // // }, - - // // 普票 - // { - // billNo: "SRM_202509011376", - // billDate: "2025-09-01", - // autoInvoice: "1", - // includeTaxFlag: "1", - // invoiceProperty: "0", - // invoiceType: "10xdp", - // totalAmount: 10.00, - // buyerTaxpayerId: "91440300MA5G9GK78Y", - // buyerName: "深圳市顺丰快运有限公司test01", - // sellerTaxpayerId: "91530112MA7MQ2JR9U", - // sellerName: "云南交投集团经营开发有限公司彩云驿商业管理分公司", - // sellerBankAndAccount: "13710884704", - // sellerAddressAndTel: "高新技术产业园南区科技南十二路58996989", - // drawer: "王协芬", - // buyerRecipientPhone: "18158132615", - // buyerRecipientMail: "", - // billDetail: [ - // { - // amount: 5, - // detailId: "11112222333344445555", - // goodsName: "通天口服液", - // lineProperty: 2, - // price: 5, - // quantity: 1, - // revenueCode: "1070304990000000000", - // taxRate: "0.13", - // units: "盒" - // }, - // { - // amount: 5, - // detailId: "55554444333322221111", - // goodsName: "通天口服液2", - // lineProperty: 2, - // price: 5, - // quantity: 1, - // revenueCode: "1070304990000000000", - // taxRate: "0.13", - // units: "盒" - // } - // ] - // }, - - // // 专票 - // { - // billNo: "SRM_202509011377", - // billDate: "2025-09-02", - // autoInvoice: "1", - // includeTaxFlag: "1", - // invoiceProperty: "0", - // invoiceType: "08xdp", - // totalAmount: 10.00, - // buyerTaxpayerId: "91440300MA5G9GK78Y", - // buyerName: "深圳市顺丰快运有限公司test01", - // buyerProperty: "1", - // sellerTaxpayerId: "91530112MA7MQ2JR9U", - // sellerName: "云南交投集团经营开发有限公司彩云驿商业管理分公司", - // sellerBankAndAccount: "13710884704", - // sellerAddressAndTel: "高新技术产业园南区科技南十二路58996989", - // drawer: "王协芬", - // buyerRecipientPhone: "18158132615", - // buyerRecipientMail: "", - // billDetail: [ - // { - // amount: 5, - // detailId: "11112222333344445555", - // goodsName: "通天口服液", - // lineProperty: 2, - // price: 5, - // quantity: 1, - // revenueCode: "1070304990000000000", - // taxRate: "0.13", - // units: "盒" - // }, - // { - // amount: 5, - // detailId: "55554444333322221111", - // goodsName: "通天口服液2", - // lineProperty: 2, - // price: 5, - // quantity: 1, - // revenueCode: "1070304990000000000", - // taxRate: "0.13", - // units: "盒" - // } - // ] - // } - // ]; - - // return { - // data: mockData, - // success: true, - // total: mockData.length - // } }} /> @@ -1146,6 +899,9 @@ const DigitalElectronics: React.FC<{ currentUser: any }> = (props) => { /> */} + + + ) } diff --git a/src/pages/DigitalElectronics/service.ts b/src/pages/DigitalElectronics/service.ts index e060598..5ed0bda 100644 --- a/src/pages/DigitalElectronics/service.ts +++ b/src/pages/DigitalElectronics/service.ts @@ -122,4 +122,19 @@ export async function handleGetForwardJDPJInterface(params: any) { } return data +} + + +// 拿到票据的审批流程 +export async function handleGetAPPLYAPPROVEList(params: any) { + const data = await requestOld(`/Office/GetAPPLYAPPROVEList`, { + method: 'POST', + data: params + }) + + if (data.Result_Code !== 100) { + return data + } + + return data.Result_Data.List } \ No newline at end of file diff --git a/src/pages/InvoiceInquiry/index.tsx b/src/pages/InvoiceInquiry/index.tsx index db03a9d..7cff33a 100644 --- a/src/pages/InvoiceInquiry/index.tsx +++ b/src/pages/InvoiceInquiry/index.tsx @@ -8,6 +8,7 @@ import { handleGetAppToken, handleGetBILLDETAILList, handleGetBILLList, handleGe import moment from "moment"; import { encryptAES } from "@/utils/handleAes"; import { ProForm, ProFormSelect, ProFormTextArea } from "@ant-design/pro-components"; +import InvoiceDetial from "../redReversal/components/InvoiceDetial"; interface ConnectState { user: { @@ -55,6 +56,8 @@ const InvoiceInquiry: React.FC<{ currentUser: any }> = (props) => { const [currentRow, setCurrentRow] = useState() // 红冲悬浮框点击的加载效果 const [confirmLoading, setConfirmLoading] = useState(false) + // 显示详情抽屉 + const [showDetailModal, setShowDetailModal] = useState(false) const columns: any = [ { title: '服务区名称', @@ -79,6 +82,13 @@ const InvoiceInquiry: React.FC<{ currentUser: any }> = (props) => { align: 'center', ellipsis: true, hideInSearch: true, + render: (_, record) => { + return record?.BILL_NO ? + { + setCurrentRow(record) + setShowDetailModal(true) + }}>{record?.BILL_NO} : "" + } }, { title: '流水号', @@ -1082,6 +1092,10 @@ const InvoiceInquiry: React.FC<{ currentUser: any }> = (props) => { /> */} + + + + ) } diff --git a/src/pages/redReversal/components/InvoiceDetial.tsx b/src/pages/redReversal/components/InvoiceDetial.tsx new file mode 100644 index 0000000..43b784f --- /dev/null +++ b/src/pages/redReversal/components/InvoiceDetial.tsx @@ -0,0 +1,334 @@ +import React, { useEffect, useRef } from "react"; +import ProForm, { ProFormSelect, ProFormText } from "@ant-design/pro-form"; +import { Col, Drawer, FormInstance, Row, Table, Typography, Space, Button, Empty } from "antd"; +import { connect } from "umi"; +import { ProTable } from "@ant-design/pro-components"; +import { handleGetAPPLYAPPROVEList, handleGetBILLDETAILList } from "@/pages/DigitalElectronics/service"; +import moment from "moment"; +import { encryptAES } from "@/utils/handleAes"; + +const { Text } = Typography; + +interface ConnectState { + user: { data: any }; +} + +interface ParamsType { + showDetail: boolean; + setShowDetail: (v: boolean) => void; + parentRow: any; + setParentRow: (v: any) => void; +} + + +const InvoiceDetail = ({ showDetail, setShowDetail, parentRow, setParentRow }: ParamsType) => { + const formRef = useRef>(); + + useEffect(() => { + if (formRef.current) { + if (parentRow) { + formRef.current.setFieldsValue(parentRow); + } else { + formRef.current.resetFields(); + } + } + }, [parentRow]); + + const detailColumns: any = [ + { + title:
款项名称
, + align: 'center', + width: 150, + dataIndex: "ITEM_NAME" + }, + { + title:
规格型号
, + align: 'center', + width: 150, + dataIndex: "ITEM_RULE" + }, + { + title:
计量单位
, + align: 'center', + width: 100, + dataIndex: "ITEM_UNIT" + }, + { + title:
数量
, + align: 'right', + width: 80, + valueType: 'digit', + dataIndex: "INVOICE_COUNT" + }, + { + title:
单价
, + align: 'right', + width: 80, + valueType: 'digit', + dataIndex: "INVOICE_PRICE" + }, + { + title:
金额
, + align: 'right', + width: 80, + valueType: 'digit', + dataIndex: "INVOICE_AMOUNT" + }, + { + title:
税率
, + align: 'center', + width: 80, + dataIndex: "DUTY_PARAGRAPH" + }, + { + title:
税额
, + align: 'right', + width: 80, + dataIndex: "INVOICE_TAX" + }, + { + title:
折扣
, + align: 'center', + width: 80, + dataIndex: "INVOICE_DISCOUNT" + }, + { + title:
操作时间
, + align: 'center', + width: 150, + dataIndex: "OPERATE_DATE", + render: (_, record) => { + return record?.OPERATE_DATE ? moment(record?.OPERATE_DATE).format('YYYY-MM-DD HH:mm:ss') : "" + } + }, + ]; + + const approveColumns: any = [ + { + title:
环节名称
, + width: 200, + align: 'center', + dataIndex: "ACTINST_NAME", + }, + { + title:
票据状态
, + width: 150, + dataIndex: "APPROVE_STATE", + align: 'center', + valueType: 'select', + fieldProps: { + options: [ + { label: "填写中", value: 1000 }, + { label: "待审核", value: 2000 }, + { label: "开票中", value: 9000 }, + { label: "已开票", value: 9200 }, + { label: "红冲申请中", value: 9990 }, + { label: "已红冲", value: 9999 } + ] + } + }, + { + title:
审批人
, + dataIndex: "STAFF_NAME", + align: 'center', + width: 150, + }, + { + title:
审批时间
, + dataIndex: "APPROVE_DATE", + align: 'center', + width: 150, + render: (_, record) => { + return record?.APPROVE_DATE ? moment(record?.APPROVE_DATE).format('YYYY-MM-DD HH:mm:ss') : "-" + } + }, + { + title:
审批意见
, + dataIndex: "APPROVE_INFO", + ellipsis: true + } + ]; + + + return ( + { + setShowDetail(false); + setParentRow(undefined); + }} + > + {/* 统一 labelCol 宽度:通过 formProps 设置 */} + + {/* 第一行:三列(每列 span=8) */} + + + + + + + + + + + + + + + + + + + + + + + + {/* 第二行 */} + + + + + + + + + + + {/* 发票图片:显示为链接 */} + + 查看发票图片 + + ) : '无发票图片', + }} + /> + + + + + + + + + + {/* 第三行:备注信息(仍三列) */} + + + {/* 修改 label 文案为 纳税人识别号 */} + + + + + + + + + + + {/* 发票明细 */} +
+ + 发票明细 + { + console.log('parentRowparentRowparentRow', parentRow); + const billDetail = await handleGetBILLDETAILList({ + SearchParameter: { + BILL_ID: parentRow?.BILL_ID + }, + PageIndex: 1, + PageSize: 999999, + SortStr: "BILLDETAIL_ID" + }) + console.log('billDetailbillDetailbillDetail', billDetail); + + if (billDetail && billDetail.length > 0) { + return { data: billDetail, success: true } + } + return { data: [], success: true } + }} + /> + +
+ + {/* 审批意见 */} +
+ + 审批意见 + + { + console.log('parentRowparentRowparentRow', parentRow); + + const req: any = { + SearchParameter: { + APPROVE_TYPE: parentRow?.BILL_ID,// 票的id + APPROVE_DESC: "T_BILL" + }, + PageIndex: 1, + PageSize: 999999, + SortStr: "APPROVE_DATE desc" + } + let reqData: any = { + name: "", + value: encryptAES(JSON.stringify(req)) + } + + const data = await handleGetAPPLYAPPROVEList(reqData) + console.log('data', data); + if (data && data.length > 0) { + return { data, success: true } + } + return { data: [], success: true } + }} + /> + +
+ +
+
+ ); +}; + +export default connect(({ user }: ConnectState) => ({ currentUser: user.data }))(InvoiceDetail); diff --git a/src/pages/redReversal/index.tsx b/src/pages/redReversal/index.tsx index e221420..aee9802 100644 --- a/src/pages/redReversal/index.tsx +++ b/src/pages/redReversal/index.tsx @@ -8,6 +8,7 @@ import { handleGetAppToken, handleGetBILLDETAILList, handleGetBILLList, handleGe import moment from "moment"; import { encryptAES } from "@/utils/handleAes"; import { ProForm, ProFormSelect, ProFormTextArea } from "@ant-design/pro-components"; +import InvoiceDetial from "./components/InvoiceDetial"; interface ConnectState { user: { @@ -55,6 +56,10 @@ const RedReversal: React.FC<{ currentUser: any }> = (props) => { const [currentRow, setCurrentRow] = useState() // 红冲悬浮框点击的加载效果 const [confirmLoading, setConfirmLoading] = useState(false) + // 显示详情抽屉 + const [showDetailModal, setShowDetailModal] = useState(false) + + const columns: any = [ { title: '服务区名称', @@ -79,6 +84,13 @@ const RedReversal: React.FC<{ currentUser: any }> = (props) => { align: 'center', ellipsis: true, hideInSearch: true, + render: (_, record) => { + return record?.BILL_NO ? + { + setCurrentRow(record) + setShowDetailModal(true) + }}>{record?.BILL_NO} : "" + } }, { title: '流水号', @@ -1143,6 +1155,8 @@ const RedReversal: React.FC<{ currentUser: any }> = (props) => { /> */} + + ) }