update
This commit is contained in:
parent
fc695d48d3
commit
4dee3cbed6
@ -78,6 +78,11 @@ export default [
|
|||||||
name: '不动产管理',
|
name: '不动产管理',
|
||||||
component: "@/pages/realEstate/index",
|
component: "@/pages/realEstate/index",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/ComplaintApproval/index',
|
||||||
|
name: '投诉审批',
|
||||||
|
component: "@/pages/ComplaintApproval/index",
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|||||||
@ -42,16 +42,13 @@ const LeftSelectTree = ({ setSelectedId, reload, actionRef, currentUser, width,
|
|||||||
UserIdEncrypted: addressParams.UserIdEncrypted
|
UserIdEncrypted: addressParams.UserIdEncrypted
|
||||||
}
|
}
|
||||||
const userInfo = await handleGetPassportInfoById(req)
|
const userInfo = await handleGetPassportInfoById(req)
|
||||||
console.log('userInfouserInfouserInfo', userInfo);
|
|
||||||
|
|
||||||
let data: any = []
|
let data: any = []
|
||||||
if (userInfo?.UserPattern === 2000) {
|
if (userInfo?.UserPattern === 2000) {
|
||||||
data = await getMerchantShopTree({ BusinessManId: userInfo?.BusinessManID, ShowShop: false });
|
data = await getMerchantShopTree({ BusinessManId: userInfo?.BusinessManID, ShowShop: false });
|
||||||
} else {
|
} else {
|
||||||
data = await getServerpartTree(userInfo?.ProvinceCode, userInfo?.CityAuthority, true, true, true, false, 1000)
|
data = await getServerpartTree(userInfo?.ProvinceCode, userInfo?.CityAuthority, true, true, true, false, '1000,4000')
|
||||||
}
|
}
|
||||||
console.log('datatree', data);
|
|
||||||
|
|
||||||
|
|
||||||
// 判断是否有多个片区的权限
|
// 判断是否有多个片区的权限
|
||||||
if (data && data.length > 1) {
|
if (data && data.length > 1) {
|
||||||
@ -81,10 +78,8 @@ const LeftSelectTree = ({ setSelectedId, reload, actionRef, currentUser, width,
|
|||||||
if (noWj) {
|
if (noWj) {
|
||||||
list = handleFilterList(list, 89)
|
list = handleFilterList(list, 89)
|
||||||
}
|
}
|
||||||
console.log('list2', list);
|
|
||||||
if (handleGetLeftTreeData) {
|
if (handleGetLeftTreeData) {
|
||||||
let newData: any = await handleGetLeftTreeData()
|
let newData: any = await handleGetLeftTreeData()
|
||||||
console.log('newData', newData);
|
|
||||||
setTreeView(newData)
|
setTreeView(newData)
|
||||||
} else {
|
} else {
|
||||||
setTreeView(list)
|
setTreeView(list)
|
||||||
@ -150,7 +145,6 @@ const LeftSelectTree = ({ setSelectedId, reload, actionRef, currentUser, width,
|
|||||||
res.push(item)
|
res.push(item)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log('res', res);
|
|
||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import request from "@/utils/requestOld"
|
import request from "@/utils/requestOld"
|
||||||
|
|
||||||
export async function getServerpartTree(ProvinceCode?: number | string, ServerpartCodes?: string,
|
export async function getServerpartTree(ProvinceCode?: number | string, ServerpartCodes?: string,
|
||||||
ShowWholePower?: boolean, ShowSPRegion?: boolean, ShowRoyalty?: boolean | false, ShowCompactCount?: boolean | false, StatisticsType?: number): Promise<ServerpartTree[]> {
|
ShowWholePower?: boolean, ShowSPRegion?: boolean, ShowRoyalty?: boolean | false, ShowCompactCount?: boolean | false, StatisticsType?: any): Promise<ServerpartTree[]> {
|
||||||
// ShowRoyalty 无论传入什么都是false
|
// ShowRoyalty 无论传入什么都是false
|
||||||
const data = await request(`/BaseInfo/GetServerpartTree?
|
const data = await request(`/BaseInfo/GetServerpartTree?
|
||||||
ProvinceCode=${ProvinceCode || ''}&ServerpartCodes=${ServerpartCodes || ''}&
|
ProvinceCode=${ProvinceCode || ''}&ServerpartCodes=${ServerpartCodes || ''}&
|
||||||
|
|||||||
@ -305,6 +305,12 @@ const UserModel: UserModelType = {
|
|||||||
name: '不动产管理',
|
name: '不动产管理',
|
||||||
component: "@/pages/realEstate/index",
|
component: "@/pages/realEstate/index",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/ComplaintApproval/index',
|
||||||
|
redirect: '',
|
||||||
|
name: '投诉审批',
|
||||||
|
component: "@/pages/ComplaintApproval/index",
|
||||||
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -388,6 +394,7 @@ const UserModel: UserModelType = {
|
|||||||
"/RentCalculation/index",
|
"/RentCalculation/index",
|
||||||
"/rentComparison/index",
|
"/rentComparison/index",
|
||||||
"/realEstate/index",
|
"/realEstate/index",
|
||||||
|
"/ComplaintApproval/index",
|
||||||
// '/examine/index',
|
// '/examine/index',
|
||||||
// '/examine/modal',
|
// '/examine/modal',
|
||||||
// '/examine/question',
|
// '/examine/question',
|
||||||
|
|||||||
193
src/pages/ComplaintApproval/index.tsx
Normal file
193
src/pages/ComplaintApproval/index.tsx
Normal file
@ -0,0 +1,193 @@
|
|||||||
|
import LeftSelectTree from "@/components/leftSelectTree/leftSelectTree"
|
||||||
|
import { ActionType, ProForm, ProFormSelect, ProFormText, ProFormTextArea, ProFormUploadButton, ProTable } from "@ant-design/pro-components"
|
||||||
|
import { Button, Col, FormInstance, Modal, Popconfirm, Row } from "antd"
|
||||||
|
import moment from "moment"
|
||||||
|
import { useRef, useState } from "react"
|
||||||
|
|
||||||
|
// 投诉审批页面
|
||||||
|
const ComplaintApproval = () => {
|
||||||
|
const actionRef = useRef<ActionType>();
|
||||||
|
const formRef = useRef<FormInstance>();
|
||||||
|
const modalFormRef = useRef<FormInstance>();
|
||||||
|
const transferFormRef = useRef<FormInstance>();
|
||||||
|
// 树相关的属性和方法
|
||||||
|
const [selectedId, setSelectedId] = useState<string>()
|
||||||
|
const [collapsible, setCollapsible] = useState<boolean>(false)
|
||||||
|
// 点击的行数据
|
||||||
|
const [currentRow, setCurrentRow] = useState<any>()
|
||||||
|
// 显示悬浮框
|
||||||
|
const [showDetail, setShowDetail] = useState<boolean>(false)
|
||||||
|
// 悬浮框点击确认的加载效果
|
||||||
|
const [confirmLoading, setConfirmLoading] = useState<boolean>(false)
|
||||||
|
// 转办的悬浮框
|
||||||
|
const [transferModal, setTransferModal] = useState<boolean>(false)
|
||||||
|
// 转办悬浮框的loading效果
|
||||||
|
const [transferLoading, setTransferLoading] = useState<boolean>(false)
|
||||||
|
|
||||||
|
// 列表配置
|
||||||
|
const columns: any = [
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
return <div style={{ height: 'calc(100vh - 100px)', backgroundColor: '#fff', display: 'flex' }}>
|
||||||
|
<LeftSelectTree setSelectedId={setSelectedId} setCollapsible={setCollapsible} collapsible={collapsible} />
|
||||||
|
|
||||||
|
<div style={{
|
||||||
|
width: !collapsible ? 'calc(100% - 300px)' : 'calc(100% - 60px)',
|
||||||
|
paddingTop: 0,
|
||||||
|
paddingBottom: 0,
|
||||||
|
paddingRight: 0
|
||||||
|
}}>
|
||||||
|
<ProTable
|
||||||
|
actionRef={actionRef}
|
||||||
|
formRef={formRef}
|
||||||
|
columns={columns}
|
||||||
|
bordered
|
||||||
|
scroll={{ x: '100%', y: 'calc(100vh - 450px)' }}
|
||||||
|
headerTitle={'投诉审批列表'}
|
||||||
|
search={{ span: 6, }}
|
||||||
|
request={async (params) => {
|
||||||
|
|
||||||
|
}}
|
||||||
|
|
||||||
|
toolbar={{
|
||||||
|
actions: [
|
||||||
|
<Button type="primary" onClick={() => {
|
||||||
|
setShowDetail(true)
|
||||||
|
}}>新增投诉</Button>
|
||||||
|
]
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
{/* 投诉的悬浮框 Modal */}
|
||||||
|
<Modal
|
||||||
|
title={currentRow ? '审批投诉' : '添加投诉'}
|
||||||
|
destroyOnClose
|
||||||
|
width={900}
|
||||||
|
open={showDetail}
|
||||||
|
className="ComplaintApprovalModalBox"
|
||||||
|
onCancel={() => {
|
||||||
|
setCurrentRow(undefined)
|
||||||
|
setShowDetail(false)
|
||||||
|
}}
|
||||||
|
confirmLoading={confirmLoading}
|
||||||
|
footer={<div style={{ width: '100%', display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
|
||||||
|
<div>
|
||||||
|
<Button type={'primary'} loading={confirmLoading} onClick={() => {
|
||||||
|
setTransferModal(true)
|
||||||
|
}}>转办</Button>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<Button style={{ marginRight: '8px' }} onClick={() => {
|
||||||
|
setCurrentRow(undefined)
|
||||||
|
setShowDetail(false)
|
||||||
|
}}>取消</Button>
|
||||||
|
<Button type={'primary'} loading={confirmLoading} onClick={() => {
|
||||||
|
|
||||||
|
}}>确认</Button>
|
||||||
|
|
||||||
|
<Popconfirm title="确定驳回审核?">
|
||||||
|
<Button type={'primary'} style={{ marginRight: '8px' }} danger loading={confirmLoading} onClick={() => {
|
||||||
|
}}>驳回审核</Button>
|
||||||
|
</Popconfirm>
|
||||||
|
<Popconfirm title="确定审核通过?">
|
||||||
|
<Button type={'primary'} loading={confirmLoading} onClick={() => {
|
||||||
|
}}>审核通过</Button>
|
||||||
|
</Popconfirm>
|
||||||
|
</div>
|
||||||
|
</div>}
|
||||||
|
>
|
||||||
|
<ProForm
|
||||||
|
formRef={modalFormRef}
|
||||||
|
submitter={false}
|
||||||
|
onFinish={() => {
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Row>
|
||||||
|
<Col span={24}>
|
||||||
|
<ProFormTextArea
|
||||||
|
label={'投诉内容'}
|
||||||
|
name={''}
|
||||||
|
rules={[{ required: true, message: '请输入投诉内容!' }]}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={24}>
|
||||||
|
<ProFormUploadButton
|
||||||
|
label={'上传附件'}
|
||||||
|
name={'attachment'}
|
||||||
|
rules={[{ required: true, message: '请上传附件!' }]}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
|
||||||
|
{/* 安全员核实反馈内容 */}
|
||||||
|
<Col span={24}>
|
||||||
|
<ProFormTextArea
|
||||||
|
label={'核实情况'}
|
||||||
|
name={''}
|
||||||
|
rules={[{ required: true, message: '请输入核实情况!' }]}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={24}>
|
||||||
|
<ProFormTextArea
|
||||||
|
label={'处置结果'}
|
||||||
|
name={''}
|
||||||
|
rules={[{ required: true, message: '请输入处置结果!' }]}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={24}>
|
||||||
|
<ProFormUploadButton
|
||||||
|
label={'附件资料'}
|
||||||
|
name={''}
|
||||||
|
rules={[{ required: true, message: '请上传附件资料!' }]}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
</ProForm>
|
||||||
|
</Modal>
|
||||||
|
|
||||||
|
{/* 转办的悬浮框 */}
|
||||||
|
<Modal
|
||||||
|
title={'审批转办'}
|
||||||
|
destroyOnClose
|
||||||
|
width={600}
|
||||||
|
open={transferModal}
|
||||||
|
onCancel={() => {
|
||||||
|
setTransferModal(false)
|
||||||
|
}}
|
||||||
|
onOk={() => {
|
||||||
|
//因为如果是转办成功 那么肯定是两个悬浮框都关闭 且 表格重新刷新的
|
||||||
|
// 当前悬浮框的关闭内容
|
||||||
|
setTransferModal(false)
|
||||||
|
// 投诉悬浮框关闭的内容
|
||||||
|
setCurrentRow(undefined)
|
||||||
|
setShowDetail(false)
|
||||||
|
// 表格数据更新
|
||||||
|
actionRef.current?.reload()
|
||||||
|
}}
|
||||||
|
confirmLoading={transferLoading}
|
||||||
|
>
|
||||||
|
<ProForm
|
||||||
|
formRef={transferFormRef}
|
||||||
|
submitter={false}
|
||||||
|
>
|
||||||
|
<Row>
|
||||||
|
<Col span={24}>
|
||||||
|
<ProFormSelect
|
||||||
|
label={"转办人"}
|
||||||
|
name={'transferPerson'}
|
||||||
|
rules={[{ required: true, message: '请选择转办人!' }]}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
|
||||||
|
</ProForm>
|
||||||
|
|
||||||
|
</Modal>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export default ComplaintApproval
|
||||||
@ -9,6 +9,7 @@ import moment from "moment";
|
|||||||
import { encryptAES } from "@/utils/handleAes";
|
import { encryptAES } from "@/utils/handleAes";
|
||||||
import { ProForm, ProFormSelect, ProFormTextArea } from "@ant-design/pro-components";
|
import { ProForm, ProFormSelect, ProFormTextArea } from "@ant-design/pro-components";
|
||||||
import InvoiceDetial from "../redReversal/components/InvoiceDetial";
|
import InvoiceDetial from "../redReversal/components/InvoiceDetial";
|
||||||
|
import { handleGetREALESTATEList } from "../realEstate/service";
|
||||||
|
|
||||||
interface ConnectState {
|
interface ConnectState {
|
||||||
user: {
|
user: {
|
||||||
@ -522,12 +523,12 @@ const DigitalElectronics: React.FC<{ currentUser: any }> = (props) => {
|
|||||||
// 同步旧票子 变为 红冲申请中
|
// 同步旧票子 变为 红冲申请中
|
||||||
await handleSynchroBILL(2, {
|
await handleSynchroBILL(2, {
|
||||||
...record,
|
...record,
|
||||||
billDetail: billDetail
|
DetailList: billDetail
|
||||||
})
|
})
|
||||||
// 针对这个红冲 开一张新票子 编码为新的红冲编码 状态为9000 开票中 且票据类型变为 3000 红票 BILL_TYPE
|
// 针对这个红冲 开一张新票子 编码为新的红冲编码 状态为9000 开票中 且票据类型变为 3000 红票 BILL_TYPE
|
||||||
await handleUpdateOldBill({
|
await handleUpdateOldBill({
|
||||||
...record,
|
...record,
|
||||||
billDetail: billDetail,
|
DetailList: billDetail,
|
||||||
BILL_TYPE: 3000,
|
BILL_TYPE: 3000,
|
||||||
BILL_STATE: 9000,
|
BILL_STATE: 9000,
|
||||||
BILL_NO: `HC-${record?.BILL_NO}`,
|
BILL_NO: `HC-${record?.BILL_NO}`,
|
||||||
@ -549,13 +550,11 @@ const DigitalElectronics: React.FC<{ currentUser: any }> = (props) => {
|
|||||||
const handleInvoice = async (record: Datum) => {
|
const handleInvoice = async (record: Datum) => {
|
||||||
try {
|
try {
|
||||||
message.loading({ content: '正在发起开票...', key: 'invoice' });
|
message.loading({ content: '正在发起开票...', key: 'invoice' });
|
||||||
|
|
||||||
// 检查是否有access_token
|
// 检查是否有access_token
|
||||||
if (!accessToken) {
|
if (!accessToken) {
|
||||||
message.error({ content: '缺少访问令牌,请先刷新页面重新获取', key: 'invoice' });
|
message.error({ content: '缺少访问令牌,请先刷新页面重新获取', key: 'invoice' });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 拿个票据明细
|
// 拿个票据明细
|
||||||
const billDetail = await handleGetBILLDETAILList({
|
const billDetail = await handleGetBILLDETAILList({
|
||||||
SearchParameter: {
|
SearchParameter: {
|
||||||
@ -565,9 +564,12 @@ const DigitalElectronics: React.FC<{ currentUser: any }> = (props) => {
|
|||||||
PageSize: 999999,
|
PageSize: 999999,
|
||||||
SortStr: "BILLDETAIL_ID"
|
SortStr: "BILLDETAIL_ID"
|
||||||
})
|
})
|
||||||
|
|
||||||
let billDetailReq: any = []
|
let billDetailReq: any = []
|
||||||
|
// 可能存在的不动产数据
|
||||||
|
let estateLeaseItems: any = []
|
||||||
if (billDetail && billDetail.length > 0) {
|
if (billDetail && billDetail.length > 0) {
|
||||||
|
// 从当前商品的详情里面取出 用的到的 不动产id
|
||||||
|
let REALESTATE_IDList: Number[] = []
|
||||||
billDetail.forEach((item: any) => {
|
billDetail.forEach((item: any) => {
|
||||||
billDetailReq.push({
|
billDetailReq.push({
|
||||||
amount: item.INVOICE_AMOUNT, // 明细金额
|
amount: item.INVOICE_AMOUNT, // 明细金额
|
||||||
@ -579,12 +581,61 @@ const DigitalElectronics: React.FC<{ currentUser: any }> = (props) => {
|
|||||||
revenueCode: item.TABLE_NAME,// 税收分类编码
|
revenueCode: item.TABLE_NAME,// 税收分类编码
|
||||||
taxRate: (item.DUTY_PARAGRAPH / 100).toFixed(2),// 税率
|
taxRate: (item.DUTY_PARAGRAPH / 100).toFixed(2),// 税率
|
||||||
units: item.ITEM_UNIT,// 计量单位
|
units: item.ITEM_UNIT,// 计量单位
|
||||||
specification: item.ITEM_RULE// 规格
|
specification: item.ITEM_RULE,// 规格
|
||||||
|
REALESTATE_ID: item.REALESTATE_ID,// 不动产id
|
||||||
|
BILLDETAIL_DESC: item.BILLDETAIL_DESC // 备注
|
||||||
})
|
})
|
||||||
|
REALESTATE_IDList.push(Number(item.REALESTATE_ID))
|
||||||
})
|
})
|
||||||
|
|
||||||
|
console.log('dhaskdhaslhdasl', billDetail);
|
||||||
|
// REALESTATE_ID 是,隔开的不动产id 这里去查询 记录 有多少条
|
||||||
|
const req: any = {
|
||||||
|
searchParameter: {
|
||||||
|
SERVERPART_IDS: record?.SERVERPART_ID || "",
|
||||||
|
REALESTATE_STATE: 1
|
||||||
|
},
|
||||||
|
PageIndex: 1,
|
||||||
|
PageSize: 999999,
|
||||||
|
}
|
||||||
|
let newReq: any = {
|
||||||
|
name: "",
|
||||||
|
value: encryptAES(JSON.stringify(req))
|
||||||
|
}
|
||||||
|
const data: any = await handleGetREALESTATEList(newReq)
|
||||||
|
console.log('dhaskdhaslhdasl', data);
|
||||||
|
// 这个服务区的全部不动产的数据 都在data里面
|
||||||
|
if (data && data.length > 0) {
|
||||||
|
let unitObj: any = {
|
||||||
|
1: "平方千米",
|
||||||
|
2: "平方米",
|
||||||
|
3: "公顷",
|
||||||
|
4: "亩",
|
||||||
|
5: "h㎡",
|
||||||
|
6: "k㎡",
|
||||||
|
7: "㎡"
|
||||||
|
}
|
||||||
|
data.forEach((item: any) => {
|
||||||
|
if (REALESTATE_IDList.indexOf(item.REALESTATE_ID) !== -1) {
|
||||||
|
estateLeaseItems.push({
|
||||||
|
provinceAdress: item.PROVINCE_NAME, // 省份
|
||||||
|
cityAdreess: item.CITY_NAME,// 城市
|
||||||
|
detailAddress: item.REALESTATE_ADDRESS,// 不动产详细地址
|
||||||
|
crossCitySign: item.CROSS_CITYSIGN,// 跨地(市)标志
|
||||||
|
areaunit: item.AREA_UNIT ? unitObj[item.AREA_UNIT] : "",//面积单位
|
||||||
|
startLeaseDate: item.START_LEASEDATE, // 租赁开始日期
|
||||||
|
endLeaseDate: item.END_LEASEDATE,//租赁结束日期
|
||||||
|
estateId: item.ESTATE_IDENTITY,//房屋产权证书/不动产权证号
|
||||||
|
specialIndustryNumber: item.SPECIALINDUSTRY_NUMBER,//不动产基础资料编码
|
||||||
|
carBrandNo: item.CARBRAND_NO,// 车牌号
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let obj: any = {
|
let obj: any = {
|
||||||
billNo: record?.BILL_NO, // 单据编号
|
billNo: record?.BILL_NO, // 单据编号
|
||||||
billDate: moment(record?.BILL_DATE).format('YYYY-MM-DD'), // 单据日期
|
billDate: moment(record?.BILL_DATE).format('YYYY-MM-DD'), // 单据日期
|
||||||
@ -625,13 +676,20 @@ const DigitalElectronics: React.FC<{ currentUser: any }> = (props) => {
|
|||||||
// originalIssueTime: record?.originalIssueTime,
|
// originalIssueTime: record?.originalIssueTime,
|
||||||
// blueInvoiceType: record?.blueInvoiceType,
|
// blueInvoiceType: record?.blueInvoiceType,
|
||||||
// blueinvoiceCode: record?.blueinvoiceCode,
|
// blueinvoiceCode: record?.blueinvoiceCode,
|
||||||
billDetail: billDetailReq
|
billDetail: billDetailReq,
|
||||||
|
estateLeaseItems: estateLeaseItems,
|
||||||
|
specialType: estateLeaseItems && estateLeaseItems.length > 0 ? 'E06' : '00'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log('objobj', obj);
|
||||||
|
console.log('billDetailbillDetailbillDetail', billDetail);
|
||||||
|
console.log('estateLeaseItemsestateLeaseItemsestateLeaseItems', estateLeaseItems);
|
||||||
// 构造原始数据
|
// 构造原始数据
|
||||||
const originalData = [obj]; // 将record作为data数组的一项
|
const originalData = [obj]; // 将record作为data数组的一项
|
||||||
// 将data字段进行base64加密
|
// 将data字段进行base64加密
|
||||||
const dataString = JSON.stringify(originalData);
|
const dataString = JSON.stringify(originalData);
|
||||||
|
console.log('dataStringdataStringdataString', dataString);
|
||||||
|
|
||||||
const encryptedData = btoa(unescape(encodeURIComponent(dataString))); // base64编码,支持中文
|
const encryptedData = btoa(unescape(encodeURIComponent(dataString))); // base64编码,支持中文
|
||||||
// 构造开票请求数据
|
// 构造开票请求数据
|
||||||
const invoiceData = {
|
const invoiceData = {
|
||||||
@ -656,11 +714,14 @@ const DigitalElectronics: React.FC<{ currentUser: any }> = (props) => {
|
|||||||
|
|
||||||
if (response && response.success) {
|
if (response && response.success) {
|
||||||
let res: any = JSON.parse(decodeURIComponent(escape(atob(response.data))));
|
let res: any = JSON.parse(decodeURIComponent(escape(atob(response.data))));
|
||||||
|
console.log('resresresresres', res);
|
||||||
message.success({ content: `单据 ${record.BILL_NO} 开票申请已提交成功`, key: 'invoice' });
|
message.success({ content: `单据 ${record.BILL_NO} 开票申请已提交成功`, key: 'invoice' });
|
||||||
actionRef.current?.reload()
|
actionRef.current?.reload()
|
||||||
// 他们的调用成功了 再调用我们自己的 同步票据信息表 的接口
|
// 他们的调用成功了 再调用我们自己的 同步票据信息表 的接口
|
||||||
handleSynchroBILL(1, record)
|
handleSynchroBILL(1, {
|
||||||
|
...record,
|
||||||
|
DetailList: billDetail
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@ -901,28 +962,6 @@ const DigitalElectronics: React.FC<{ currentUser: any }> = (props) => {
|
|||||||
const handleSynchroBILL = async (type: number, obj: any) => {
|
const handleSynchroBILL = async (type: number, obj: any) => {
|
||||||
// type 1 开票的同步状态 即 9000 2 开票的红冲状态 即 9990
|
// type 1 开票的同步状态 即 9000 2 开票的红冲状态 即 9990
|
||||||
// 发票明细列表
|
// 发票明细列表
|
||||||
let detailList: any = []
|
|
||||||
if (obj?.billDetail && obj?.billDetail.length > 0) {
|
|
||||||
obj?.billDetail.forEach((item: any) => {
|
|
||||||
detailList.push({
|
|
||||||
ITEM_NAME: item.goodsName,// 款项名称
|
|
||||||
ITEM_RULE: item.specification,// 规格型号
|
|
||||||
ITEM_UNIT: item.units,// 计量单位
|
|
||||||
INVOICE_COUNT: item.quantity,// 开票数量
|
|
||||||
INVOICE_PRICE: item.price,// 开票单价
|
|
||||||
INVOICE_AMOUNT: item.amount,// 开票金额
|
|
||||||
DUTY_PARAGRAPH: item.taxRate,// 开票税率
|
|
||||||
INVOICE_TAX: item.taxAmount,// 开票税额
|
|
||||||
INVOICE_DISCOUNT: item.discountAmount,// 折扣金额
|
|
||||||
INVOICE_DISCOUNTTAX: "",// 折扣税额
|
|
||||||
ITEM_ACTAMOUNT: "",// 款项价税合计
|
|
||||||
ITEM_DEDUCTIONAMOUNT: "",// 扣除额
|
|
||||||
ITEM_ID: "",// 关联数据表内码(多个)
|
|
||||||
TABLE_NAME: "",// 数据表名称
|
|
||||||
OPERATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss'),// 操作时间
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
let req: any = {
|
let req: any = {
|
||||||
...obj,
|
...obj,
|
||||||
BILL_TYPE: obj.BILL_TYPE || "", // 票据类型(1000:增值税专用发票;2000:普通发票) ,
|
BILL_TYPE: obj.BILL_TYPE || "", // 票据类型(1000:增值税专用发票;2000:普通发票) ,
|
||||||
@ -1116,7 +1155,7 @@ const DigitalElectronics: React.FC<{ currentUser: any }> = (props) => {
|
|||||||
</ProForm>
|
</ProForm>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
||||||
<InvoiceDetial showDetail={showDetailModal} setShowDetail={setShowDetailModal} parentRow={currentRow} setParentRow={setCurrentRow} />
|
<InvoiceDetial showDetail={showDetailModal} setShowDetail={setShowDetailModal} parentRow={currentRow} setParentRow={setCurrentRow} parentTableRef={actionRef} />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -14,6 +14,7 @@ const authority: PageAuthority = {
|
|||||||
'/RentCalculation/index': ['/RentCalculation/index'],
|
'/RentCalculation/index': ['/RentCalculation/index'],
|
||||||
'/rentComparison/index': ['/rentComparison/index'],
|
'/rentComparison/index': ['/rentComparison/index'],
|
||||||
'/realEstate/index': ['/realEstate/index'],
|
'/realEstate/index': ['/realEstate/index'],
|
||||||
|
'/ComplaintApproval/index': ['/ComplaintApproval/index'],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -88,7 +88,7 @@ const RealEstate = ({ serverPartId, isComponent, onRef, selectRealEstateId }: {
|
|||||||
width: 150,
|
width: 150,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
render: (_, record) => {
|
render: (_, record) => {
|
||||||
return record?.ESTATE_IDENTITY ? isComponent ? record?.ESTATE_IDENTITY : <a onClick={() => {
|
return record?.ESTATE_IDENTITY ? <a onClick={() => {
|
||||||
setCurrentRow(record)
|
setCurrentRow(record)
|
||||||
setShowDetail(true)
|
setShowDetail(true)
|
||||||
}}>
|
}}>
|
||||||
@ -104,7 +104,7 @@ const RealEstate = ({ serverPartId, isComponent, onRef, selectRealEstateId }: {
|
|||||||
width: 150,
|
width: 150,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
render: (_, record) => {
|
render: (_, record) => {
|
||||||
return record?.SPECIALINDUSTRY_NUMBER ? isComponent ? record?.ESTATE_IDENTITY : <a onClick={() => {
|
return record?.SPECIALINDUSTRY_NUMBER ? <a onClick={() => {
|
||||||
setCurrentRow(record)
|
setCurrentRow(record)
|
||||||
setShowDetail(true)
|
setShowDetail(true)
|
||||||
}}>
|
}}>
|
||||||
@ -161,7 +161,17 @@ const RealEstate = ({ serverPartId, isComponent, onRef, selectRealEstateId }: {
|
|||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
width: 120,
|
width: 120,
|
||||||
align: 'center'
|
align: 'center',
|
||||||
|
valueType: "select",
|
||||||
|
valueEnum: {
|
||||||
|
1: "平方千米",
|
||||||
|
2: "平方米",
|
||||||
|
3: "公顷",
|
||||||
|
4: "亩",
|
||||||
|
5: "h㎡",
|
||||||
|
6: "k㎡",
|
||||||
|
7: "㎡"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "租赁期限",
|
title: "租赁期限",
|
||||||
@ -294,6 +304,7 @@ const RealEstate = ({ serverPartId, isComponent, onRef, selectRealEstateId }: {
|
|||||||
headerTitle={'不动产列表'}
|
headerTitle={'不动产列表'}
|
||||||
search={isComponent ? false : { span: 6, }}
|
search={isComponent ? false : { span: 6, }}
|
||||||
request={async (params) => {
|
request={async (params) => {
|
||||||
|
|
||||||
if (!selectedId && !isComponent) {
|
if (!selectedId && !isComponent) {
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
@ -325,7 +336,7 @@ const RealEstate = ({ serverPartId, isComponent, onRef, selectRealEstateId }: {
|
|||||||
return { data: [], success: true }
|
return { data: [], success: true }
|
||||||
}}
|
}}
|
||||||
rowSelection={isComponent ? {
|
rowSelection={isComponent ? {
|
||||||
type: 'checkbox',
|
type: 'radio',
|
||||||
defaultSelectedRowKeys: selectRealEstateId || [],
|
defaultSelectedRowKeys: selectRealEstateId || [],
|
||||||
onChange: (_, row) => {
|
onChange: (_, row) => {
|
||||||
console.log('__', _);
|
console.log('__', _);
|
||||||
@ -335,7 +346,7 @@ const RealEstate = ({ serverPartId, isComponent, onRef, selectRealEstateId }: {
|
|||||||
}
|
}
|
||||||
} : false}
|
} : false}
|
||||||
toolbar={{
|
toolbar={{
|
||||||
actions: [
|
actions: isComponent ? [] : [
|
||||||
<Button type="primary" onClick={() => {
|
<Button type="primary" onClick={() => {
|
||||||
setShowDetail(true)
|
setShowDetail(true)
|
||||||
}}>添加不动产</Button>
|
}}>添加不动产</Button>
|
||||||
@ -356,24 +367,25 @@ const RealEstate = ({ serverPartId, isComponent, onRef, selectRealEstateId }: {
|
|||||||
}}
|
}}
|
||||||
confirmLoading={confirmLoading}
|
confirmLoading={confirmLoading}
|
||||||
footer={
|
footer={
|
||||||
<ModalFooter
|
isComponent ? false :
|
||||||
confirmLoading={confirmLoading}
|
<ModalFooter
|
||||||
hideDelete={!currentRow?.REALESTATE_ID}
|
confirmLoading={confirmLoading}
|
||||||
handleDelete={async () => {
|
hideDelete={!currentRow?.REALESTATE_ID}
|
||||||
setConfirmLoading(true)
|
handleDelete={async () => {
|
||||||
await handleDeleteOrUpdate(currentRow?.REALESTATE_ID)
|
|
||||||
}}
|
|
||||||
handleCancel={() => {
|
|
||||||
setCurrentRow(undefined)
|
|
||||||
setShowDetail(false)
|
|
||||||
}}
|
|
||||||
handleOK={() => {
|
|
||||||
modalFormRef.current?.validateFields().then(async (res) => {
|
|
||||||
setConfirmLoading(true)
|
setConfirmLoading(true)
|
||||||
await handleAddOrUpdate(res)
|
await handleDeleteOrUpdate(currentRow?.REALESTATE_ID)
|
||||||
})
|
}}
|
||||||
}}
|
handleCancel={() => {
|
||||||
/>
|
setCurrentRow(undefined)
|
||||||
|
setShowDetail(false)
|
||||||
|
}}
|
||||||
|
handleOK={() => {
|
||||||
|
modalFormRef.current?.validateFields().then(async (res) => {
|
||||||
|
setConfirmLoading(true)
|
||||||
|
await handleAddOrUpdate(res)
|
||||||
|
})
|
||||||
|
}}
|
||||||
|
/>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<ProForm
|
<ProForm
|
||||||
@ -406,6 +418,7 @@ const RealEstate = ({ serverPartId, isComponent, onRef, selectRealEstateId }: {
|
|||||||
required: true,
|
required: true,
|
||||||
message: '请选择不动产类型!'
|
message: '请选择不动产类型!'
|
||||||
}]}
|
}]}
|
||||||
|
readonly={isComponent}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
|
|
||||||
@ -454,12 +467,14 @@ const RealEstate = ({ serverPartId, isComponent, onRef, selectRealEstateId }: {
|
|||||||
required: true,
|
required: true,
|
||||||
message: '请选择服务区!'
|
message: '请选择服务区!'
|
||||||
}]}
|
}]}
|
||||||
|
readonly={isComponent}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={8} style={{ display: 'none' }}>
|
<Col span={8} style={{ display: 'none' }}>
|
||||||
<ProFormText
|
<ProFormText
|
||||||
label={'服务区'}
|
label={'服务区'}
|
||||||
name={'SERVERPART_NAME'}
|
name={'SERVERPART_NAME'}
|
||||||
|
readonly={isComponent}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={8}>
|
<Col span={8}>
|
||||||
@ -467,6 +482,8 @@ const RealEstate = ({ serverPartId, isComponent, onRef, selectRealEstateId }: {
|
|||||||
label={'租赁日期'}
|
label={'租赁日期'}
|
||||||
name={"LEASEDATE"}
|
name={"LEASEDATE"}
|
||||||
style={{ width: '100%' }}
|
style={{ width: '100%' }}
|
||||||
|
rules={[{ required: true, message: '请选择租赁日期!' }]}
|
||||||
|
readonly={isComponent}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
|
|
||||||
@ -474,12 +491,16 @@ const RealEstate = ({ serverPartId, isComponent, onRef, selectRealEstateId }: {
|
|||||||
<ProFormText
|
<ProFormText
|
||||||
label={'省份名称'}
|
label={'省份名称'}
|
||||||
name={'PROVINCE_NAME'}
|
name={'PROVINCE_NAME'}
|
||||||
|
rules={[{ required: true, message: '请输入省份名称!' }]}
|
||||||
|
readonly={isComponent}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={8} >
|
<Col span={8} >
|
||||||
<ProFormText
|
<ProFormText
|
||||||
label={'城市名称'}
|
label={'城市名称'}
|
||||||
name={'CITY_NAME'}
|
name={'CITY_NAME'}
|
||||||
|
rules={[{ required: true, message: '请输入城市名称!' }]}
|
||||||
|
readonly={isComponent}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={8} >
|
<Col span={8} >
|
||||||
@ -490,12 +511,15 @@ const RealEstate = ({ serverPartId, isComponent, onRef, selectRealEstateId }: {
|
|||||||
{ label: "是", value: 1 },
|
{ label: "是", value: 1 },
|
||||||
{ label: "否", value: 0 },
|
{ label: "否", value: 0 },
|
||||||
]}
|
]}
|
||||||
|
readonly={isComponent}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={24} >
|
<Col span={24} >
|
||||||
<ProFormTextArea
|
<ProFormTextArea
|
||||||
label={'详细地址'}
|
label={'详细地址'}
|
||||||
name={'REALESTATE_ADDRESS'}
|
name={'REALESTATE_ADDRESS'}
|
||||||
|
rules={[{ required: true, message: '请输入详细地址!' }]}
|
||||||
|
readonly={isComponent}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={8} >
|
<Col span={8} >
|
||||||
@ -511,6 +535,8 @@ const RealEstate = ({ serverPartId, isComponent, onRef, selectRealEstateId }: {
|
|||||||
{ label: "k㎡", value: 6 },
|
{ label: "k㎡", value: 6 },
|
||||||
{ label: "㎡", value: 7 }
|
{ label: "㎡", value: 7 }
|
||||||
]}
|
]}
|
||||||
|
rules={[{ required: true, message: '请选择面积单位!' }]}
|
||||||
|
readonly={isComponent}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={8} >
|
<Col span={8} >
|
||||||
@ -527,6 +553,7 @@ const RealEstate = ({ serverPartId, isComponent, onRef, selectRealEstateId }: {
|
|||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
]}
|
]}
|
||||||
|
readonly={isComponent}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={8} >
|
<Col span={8} >
|
||||||
@ -543,6 +570,7 @@ const RealEstate = ({ serverPartId, isComponent, onRef, selectRealEstateId }: {
|
|||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
]}
|
]}
|
||||||
|
readonly={isComponent}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
|
|
||||||
|
|||||||
@ -22,10 +22,11 @@ interface ParamsType {
|
|||||||
setShowDetail: (v: boolean) => void;
|
setShowDetail: (v: boolean) => void;
|
||||||
parentRow: any;
|
parentRow: any;
|
||||||
setParentRow: (v: any) => void;
|
setParentRow: (v: any) => void;
|
||||||
|
parentTableRef?: any; // 父表格实例
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const InvoiceDetail = ({ showDetail, setShowDetail, parentRow, setParentRow }: ParamsType) => {
|
const InvoiceDetail = ({ showDetail, setShowDetail, parentRow, setParentRow, parentTableRef }: ParamsType) => {
|
||||||
const realEstateRef = useRef<any>();
|
const realEstateRef = useRef<any>();
|
||||||
const formRef = useRef<FormInstance<any>>();
|
const formRef = useRef<FormInstance<any>>();
|
||||||
const detailActionRef = useRef<ActionType>();
|
const detailActionRef = useRef<ActionType>();
|
||||||
@ -60,6 +61,10 @@ const InvoiceDetail = ({ showDetail, setShowDetail, parentRow, setParentRow }: P
|
|||||||
const [selectRealEstateId, setSelectRealEstateId] = useState<any>();
|
const [selectRealEstateId, setSelectRealEstateId] = useState<any>();
|
||||||
// 选择不动产的loading
|
// 选择不动产的loading
|
||||||
const [realEstateLoading, setRealEstateLoading] = useState<boolean>(false);
|
const [realEstateLoading, setRealEstateLoading] = useState<boolean>(false);
|
||||||
|
// 当前发票明细 点击的行的信息
|
||||||
|
const [currentRow, setCurrentRow] = useState<any>();
|
||||||
|
// 解析不动产的枚举
|
||||||
|
const [realEstateEnum, setRealEstateEnum] = useState<any>();
|
||||||
|
|
||||||
|
|
||||||
const detailColumns: any = [
|
const detailColumns: any = [
|
||||||
@ -68,19 +73,19 @@ const InvoiceDetail = ({ showDetail, setShowDetail, parentRow, setParentRow }: P
|
|||||||
dataIndex: "index",
|
dataIndex: "index",
|
||||||
valueType: "index",
|
valueType: "index",
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 80
|
width: 70
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: <div style={{ textAlign: 'center' }}>款项名称</div>,
|
title: <div style={{ textAlign: 'center' }}>款项名称</div>,
|
||||||
align: 'left',
|
align: 'left',
|
||||||
width: 250,
|
width: 230,
|
||||||
dataIndex: "ITEM_NAME",
|
dataIndex: "ITEM_NAME",
|
||||||
ellipsis: true
|
ellipsis: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: <div style={{ textAlign: 'center' }}>税务代码</div>,
|
title: <div style={{ textAlign: 'center' }}>税务代码</div>,
|
||||||
align: 'left',
|
align: 'left',
|
||||||
width: 200,
|
width: 180,
|
||||||
dataIndex: "TABLE_NAME",
|
dataIndex: "TABLE_NAME",
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
render: (_, record) => {
|
render: (_, record) => {
|
||||||
@ -96,11 +101,10 @@ const InvoiceDetail = ({ showDetail, setShowDetail, parentRow, setParentRow }: P
|
|||||||
}} /> : record.TABLE_NAME
|
}} /> : record.TABLE_NAME
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
title: <div style={{ textAlign: 'center' }}>税率</div>,
|
title: <div style={{ textAlign: 'center' }}>税率</div>,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 120,
|
width: 80,
|
||||||
dataIndex: "DUTY_PARAGRAPH",
|
dataIndex: "DUTY_PARAGRAPH",
|
||||||
render: (_, record) => {
|
render: (_, record) => {
|
||||||
return isEdit ?
|
return isEdit ?
|
||||||
@ -125,7 +129,7 @@ const InvoiceDetail = ({ showDetail, setShowDetail, parentRow, setParentRow }: P
|
|||||||
{
|
{
|
||||||
title: <div style={{ textAlign: 'center' }}>商品条码</div>,
|
title: <div style={{ textAlign: 'center' }}>商品条码</div>,
|
||||||
align: 'left',
|
align: 'left',
|
||||||
width: 150,
|
width: 120,
|
||||||
dataIndex: "ITEM_ID",
|
dataIndex: "ITEM_ID",
|
||||||
ellipsis: true
|
ellipsis: true
|
||||||
},
|
},
|
||||||
@ -133,13 +137,15 @@ const InvoiceDetail = ({ showDetail, setShowDetail, parentRow, setParentRow }: P
|
|||||||
title: <div style={{ textAlign: 'center' }}>规格型号</div>,
|
title: <div style={{ textAlign: 'center' }}>规格型号</div>,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 120,
|
width: 120,
|
||||||
dataIndex: "ITEM_RULE"
|
dataIndex: "ITEM_RULE",
|
||||||
|
ellipsis: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: <div style={{ textAlign: 'center' }}>计量单位</div>,
|
title: <div style={{ textAlign: 'center' }}>计量单位</div>,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 100,
|
width: 100,
|
||||||
dataIndex: "ITEM_UNIT"
|
dataIndex: "ITEM_UNIT",
|
||||||
|
ellipsis: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: <div style={{ textAlign: 'center' }}>数量</div>,
|
title: <div style={{ textAlign: 'center' }}>数量</div>,
|
||||||
@ -175,6 +181,26 @@ const InvoiceDetail = ({ showDetail, setShowDetail, parentRow, setParentRow }: P
|
|||||||
width: 120,
|
width: 120,
|
||||||
dataIndex: "INVOICE_DISCOUNT"
|
dataIndex: "INVOICE_DISCOUNT"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: "不动产",
|
||||||
|
dataIndex: "option",
|
||||||
|
width: 120,
|
||||||
|
align: 'center',
|
||||||
|
render: (_: any, record: any) => {
|
||||||
|
return record?.REALESTATE_ID ?
|
||||||
|
<a onClick={() => {
|
||||||
|
setCurrentRow(record)
|
||||||
|
setSelectRealEstateId([Number(record?.REALESTATE_ID)])
|
||||||
|
setSelectRealEstateModal(true)
|
||||||
|
}}>
|
||||||
|
{realEstateEnum && realEstateEnum[record?.REALESTATE_ID] ? realEstateEnum[record?.REALESTATE_ID] : record?.REALESTATE_ID}
|
||||||
|
</a> :
|
||||||
|
< Button type={'primary'} onClick={async () => {
|
||||||
|
setCurrentRow(record)
|
||||||
|
setSelectRealEstateModal(true)
|
||||||
|
}}> 选择不动产</Button >
|
||||||
|
}
|
||||||
|
}
|
||||||
// {
|
// {
|
||||||
// title: <div style={{ textAlign: 'center' }}>操作时间</div>,
|
// title: <div style={{ textAlign: 'center' }}>操作时间</div>,
|
||||||
// align: 'center',
|
// align: 'center',
|
||||||
@ -311,7 +337,17 @@ const InvoiceDetail = ({ showDetail, setShowDetail, parentRow, setParentRow }: P
|
|||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
width: 120,
|
width: 120,
|
||||||
align: 'center'
|
align: 'center',
|
||||||
|
valueType: "select",
|
||||||
|
valueEnum: {
|
||||||
|
1: "平方千米",
|
||||||
|
2: "平方米",
|
||||||
|
3: "公顷",
|
||||||
|
4: "亩",
|
||||||
|
5: "h㎡",
|
||||||
|
6: "k㎡",
|
||||||
|
7: "㎡"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "租赁期限",
|
title: "租赁期限",
|
||||||
@ -350,10 +386,34 @@ const InvoiceDetail = ({ showDetail, setShowDetail, parentRow, setParentRow }: P
|
|||||||
const handleGetSelectRealEstate = (data: any) => {
|
const handleGetSelectRealEstate = (data: any) => {
|
||||||
setRealEstateData(data)
|
setRealEstateData(data)
|
||||||
}
|
}
|
||||||
|
// 获取到这个服务区的全部 不动产信息 并给枚举的解析赋值
|
||||||
|
const handleGetThisServerpartRealEstateData = async () => {
|
||||||
|
const req: any = {
|
||||||
|
searchParameter: {
|
||||||
|
SERVERPART_IDS: parentRow?.SERVERPART_ID || "",
|
||||||
|
REALESTATE_STATE: 1
|
||||||
|
},
|
||||||
|
PageIndex: 1,
|
||||||
|
PageSize: 999999,
|
||||||
|
}
|
||||||
|
let newReq: any = {
|
||||||
|
name: "",
|
||||||
|
value: encryptAES(JSON.stringify(req))
|
||||||
|
}
|
||||||
|
const data: any = await handleGetREALESTATEList(newReq)
|
||||||
|
console.log('datadatadata', data);
|
||||||
|
let obj: any = {}
|
||||||
|
if (data && data.length > 0) {
|
||||||
|
data.forEach((item: any) => {
|
||||||
|
obj[item.REALESTATE_ID] = item.ESTATE_IDENTITY
|
||||||
|
})
|
||||||
|
}
|
||||||
|
setRealEstateEnum(obj)
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Drawer
|
<Drawer
|
||||||
width="70%"
|
width="80%"
|
||||||
open={showDetail}
|
open={showDetail}
|
||||||
title="票据详情"
|
title="票据详情"
|
||||||
onClose={() => {
|
onClose={() => {
|
||||||
@ -484,6 +544,9 @@ const InvoiceDetail = ({ showDetail, setShowDetail, parentRow, setParentRow }: P
|
|||||||
scroll={{ x: "100%", y: '500px' }}
|
scroll={{ x: "100%", y: '500px' }}
|
||||||
pagination={false}
|
pagination={false}
|
||||||
request={async () => {
|
request={async () => {
|
||||||
|
// 调用一次 获取这个服务区里面的全部 不动产信息
|
||||||
|
handleGetThisServerpartRealEstateData()
|
||||||
|
// 拿到发票明细
|
||||||
const billDetail = await handleGetBILLDETAILList({
|
const billDetail = await handleGetBILLDETAILList({
|
||||||
SearchParameter: {
|
SearchParameter: {
|
||||||
BILL_ID: parentRow?.BILL_ID
|
BILL_ID: parentRow?.BILL_ID
|
||||||
@ -494,13 +557,6 @@ const InvoiceDetail = ({ showDetail, setShowDetail, parentRow, setParentRow }: P
|
|||||||
})
|
})
|
||||||
|
|
||||||
if (billDetail && billDetail.length > 0) {
|
if (billDetail && billDetail.length > 0) {
|
||||||
let idList: any = billDetail[0].REALESTATE_ID ? billDetail[0].REALESTATE_ID.split(',') : ""
|
|
||||||
console.log('idListidListidList', idList);
|
|
||||||
if (idList && idList.length > 0) {
|
|
||||||
detailActionRef.current?.reload()
|
|
||||||
setSelectRealEstateId(idList)
|
|
||||||
}
|
|
||||||
|
|
||||||
setTableEditData(billDetail)
|
setTableEditData(billDetail)
|
||||||
setReqDetailList(billDetail)
|
setReqDetailList(billDetail)
|
||||||
return { data: billDetail, success: true }
|
return { data: billDetail, success: true }
|
||||||
@ -553,7 +609,7 @@ const InvoiceDetail = ({ showDetail, setShowDetail, parentRow, setParentRow }: P
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* 不动产信息 */}
|
{/* 不动产信息 */}
|
||||||
<div style={{ marginTop: 24 }}>
|
{/* <div style={{ marginTop: 24 }}>
|
||||||
<Space direction="vertical" style={{ width: '100%' }}>
|
<Space direction="vertical" style={{ width: '100%' }}>
|
||||||
<Text strong>不动产信息</Text>
|
<Text strong>不动产信息</Text>
|
||||||
</Space>
|
</Space>
|
||||||
@ -612,7 +668,7 @@ const InvoiceDetail = ({ showDetail, setShowDetail, parentRow, setParentRow }: P
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> */}
|
||||||
|
|
||||||
{/* 审批意见 */}
|
{/* 审批意见 */}
|
||||||
<div style={{ marginTop: 24 }}>
|
<div style={{ marginTop: 24 }}>
|
||||||
@ -668,21 +724,34 @@ const InvoiceDetail = ({ showDetail, setShowDetail, parentRow, setParentRow }: P
|
|||||||
setSelectRealEstateModal(false)
|
setSelectRealEstateModal(false)
|
||||||
}}
|
}}
|
||||||
confirmLoading={realEstateLoading}
|
confirmLoading={realEstateLoading}
|
||||||
|
|
||||||
onOk={async () => {
|
onOk={async () => {
|
||||||
|
// 已经开票申请了的 就不能改变不动产数据了
|
||||||
|
if (parentRow?.BILL_STATE > 2000) {
|
||||||
|
setCurrentRow(undefined)
|
||||||
|
setSelectRealEstateModal(false)
|
||||||
|
setRealEstateLoading(false)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
let data = realEstateRef?.current?.selectRowDetail
|
let data = realEstateRef?.current?.selectRowDetail
|
||||||
console.log('32131', data);
|
console.log('32131', data);
|
||||||
// 开始保存内容
|
// 开始保存内容
|
||||||
handleGetSelectRealEstate(data)
|
handleGetSelectRealEstate(data)
|
||||||
|
console.log('tableEditDatatableEditDatatableEditData', tableEditData);
|
||||||
|
console.log('currentRow', currentRow);
|
||||||
if (tableEditData && tableEditData.length > 0) {
|
if (tableEditData && tableEditData.length > 0) {
|
||||||
setRealEstateLoading(true)
|
setRealEstateLoading(true)
|
||||||
let list: any = JSON.parse(JSON.stringify(tableEditData))
|
let list: any = JSON.parse(JSON.stringify(tableEditData))
|
||||||
let idList: any = []
|
let idList: any = []
|
||||||
if (data && data.length > 0) {
|
if (data && data.length > 0) {
|
||||||
idList = data.map((item: any) => item.REALESTATE_ID)
|
idList = data.map((item: any) => Number(item.REALESTATE_ID))
|
||||||
}
|
}
|
||||||
|
|
||||||
list.forEach((item: any) => {
|
list.forEach((item: any) => {
|
||||||
item.REALESTATE_ID = idList ? idList.toString() : ""
|
if (item.REALESTATE_ID === currentRow?.REALESTATE_ID) {
|
||||||
|
item.REALESTATE_ID = idList && idList.length > 0 ? Number(idList.toString()) : ""
|
||||||
|
}
|
||||||
})
|
})
|
||||||
setSelectRealEstateId(idList)
|
setSelectRealEstateId(idList)
|
||||||
let newreqResult: any = {
|
let newreqResult: any = {
|
||||||
@ -693,11 +762,14 @@ const InvoiceDetail = ({ showDetail, setShowDetail, parentRow, setParentRow }: P
|
|||||||
if (res.Result_Code === 100) {
|
if (res.Result_Code === 100) {
|
||||||
message.success('同步成功!')
|
message.success('同步成功!')
|
||||||
detailActionRef.current?.reload()
|
detailActionRef.current?.reload()
|
||||||
|
setCurrentRow(undefined)
|
||||||
|
if (parentTableRef) {
|
||||||
|
parentTableRef.current?.reload()
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
message.error(data.Result_Desc)
|
message.error(data.Result_Desc)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setSelectRealEstateModal(false)
|
setSelectRealEstateModal(false)
|
||||||
setRealEstateLoading(false)
|
setRealEstateLoading(false)
|
||||||
}}
|
}}
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import moment from "moment";
|
|||||||
import { encryptAES } from "@/utils/handleAes";
|
import { encryptAES } from "@/utils/handleAes";
|
||||||
import { ProForm, ProFormSelect, ProFormTextArea } from "@ant-design/pro-components";
|
import { ProForm, ProFormSelect, ProFormTextArea } from "@ant-design/pro-components";
|
||||||
import InvoiceDetial from "./components/InvoiceDetial";
|
import InvoiceDetial from "./components/InvoiceDetial";
|
||||||
|
import { handleGetREALESTATEList } from "../realEstate/service";
|
||||||
|
|
||||||
interface ConnectState {
|
interface ConnectState {
|
||||||
user: {
|
user: {
|
||||||
@ -76,6 +77,22 @@ const RedReversal: React.FC<{ currentUser: any }> = (props) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const columns: any = [
|
const columns: any = [
|
||||||
|
{
|
||||||
|
title: "查询内容",
|
||||||
|
dataIndex: "searchText",
|
||||||
|
hideInTable: true,
|
||||||
|
fieldProps: {
|
||||||
|
placeholder: "请输入经办人/单据号",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "含税开票金额",
|
||||||
|
dataIndex: "INVOICE_TAXAMOUNT",
|
||||||
|
hideInTable: true,
|
||||||
|
fieldProps: {
|
||||||
|
placeholder: "请输入含税开票金额",
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '服务区名称',
|
title: '服务区名称',
|
||||||
dataIndex: 'SERVERPART_NAME',
|
dataIndex: 'SERVERPART_NAME',
|
||||||
@ -243,7 +260,8 @@ const RedReversal: React.FC<{ currentUser: any }> = (props) => {
|
|||||||
<Button danger style={{ marginLeft: "8px" }} type="primary" size="small">退回开票</Button>
|
<Button danger style={{ marginLeft: "8px" }} type="primary" size="small">退回开票</Button>
|
||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
</div>
|
</div>
|
||||||
: record?.BILL_TYPE === 2000 && record?.BILL_STATE >= 9200 && record?.BILL_STATE !== 9999 ?
|
: record?.BILL_STATE >= 9200 && record?.BILL_STATE !== 9999 ?
|
||||||
|
// record?.BILL_TYPE === 2000 &&
|
||||||
<div>
|
<div>
|
||||||
<Popconfirm
|
<Popconfirm
|
||||||
title="确认红冲发票?"
|
title="确认红冲发票?"
|
||||||
@ -447,7 +465,7 @@ const RedReversal: React.FC<{ currentUser: any }> = (props) => {
|
|||||||
const cleanString = (str: string) => {
|
const cleanString = (str: string) => {
|
||||||
return str.replace(/[\s]/g, '');
|
return str.replace(/[\s]/g, '');
|
||||||
}
|
}
|
||||||
// 红冲发票
|
// 红冲发票(开票红冲 普票专票都可以使用)
|
||||||
const handleRedGoBill = async (record?: any) => {
|
const handleRedGoBill = async (record?: any) => {
|
||||||
// 这个方法 比较复杂 我做一下注释
|
// 这个方法 比较复杂 我做一下注释
|
||||||
// 先拿到表单数据 里面有 红冲类型和 红冲原因
|
// 先拿到表单数据 里面有 红冲类型和 红冲原因
|
||||||
@ -472,6 +490,9 @@ const RedReversal: React.FC<{ currentUser: any }> = (props) => {
|
|||||||
SortStr: "BILLDETAIL_ID"
|
SortStr: "BILLDETAIL_ID"
|
||||||
})
|
})
|
||||||
|
|
||||||
|
console.log('billDetailbillDetail', billDetail);
|
||||||
|
|
||||||
|
|
||||||
// 调用金票云那里的列表接口
|
// 调用金票云那里的列表接口
|
||||||
// 构造查询数据
|
// 构造查询数据
|
||||||
const queryData = {
|
const queryData = {
|
||||||
@ -512,7 +533,13 @@ const RedReversal: React.FC<{ currentUser: any }> = (props) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let billDetailReq: any = []
|
let billDetailReq: any = []
|
||||||
|
// 给自己接口的
|
||||||
|
let DetailList: any = []
|
||||||
|
// 可能存在的不动产数据
|
||||||
|
let estateLeaseItems: any = []
|
||||||
if (billDetail && billDetail.length > 0) {
|
if (billDetail && billDetail.length > 0) {
|
||||||
|
// 从当前商品的详情里面取出 用的到的 不动产id
|
||||||
|
let REALESTATE_IDList: Number[] = []
|
||||||
billDetail.forEach((item: any) => {
|
billDetail.forEach((item: any) => {
|
||||||
billDetailReq.push({
|
billDetailReq.push({
|
||||||
amount: -item.INVOICE_AMOUNT, // 明细金额
|
amount: -item.INVOICE_AMOUNT, // 明细金额
|
||||||
@ -524,11 +551,68 @@ const RedReversal: React.FC<{ currentUser: any }> = (props) => {
|
|||||||
revenueCode: item.TABLE_NAME,// 税收分类编码
|
revenueCode: item.TABLE_NAME,// 税收分类编码
|
||||||
taxRate: (item.DUTY_PARAGRAPH / 100).toFixed(2),// 税率
|
taxRate: (item.DUTY_PARAGRAPH / 100).toFixed(2),// 税率
|
||||||
units: item.ITEM_UNIT,// 计量单位
|
units: item.ITEM_UNIT,// 计量单位
|
||||||
|
specification: item.ITEM_RULE,// 规格
|
||||||
|
REALESTATE_ID: item.REALESTATE_ID,// 不动产id
|
||||||
|
BILLDETAIL_DESC: item.BILLDETAIL_DESC // 备注
|
||||||
})
|
})
|
||||||
|
|
||||||
|
DetailList.push({
|
||||||
|
...item,
|
||||||
|
INVOICE_AMOUNT: -item.INVOICE_AMOUNT,
|
||||||
|
INVOICE_COUNT: -item.INVOICE_COUNT,
|
||||||
|
INVOICE_TAX: -item.INVOICE_TAX
|
||||||
|
})
|
||||||
|
|
||||||
|
REALESTATE_IDList.push(Number(item.REALESTATE_ID))
|
||||||
})
|
})
|
||||||
|
console.log('dhaskdhaslhdasl', billDetail);
|
||||||
|
// REALESTATE_ID 是,隔开的不动产id 这里去查询 记录 有多少条
|
||||||
|
const req: any = {
|
||||||
|
searchParameter: {
|
||||||
|
SERVERPART_IDS: record?.SERVERPART_ID || "",
|
||||||
|
REALESTATE_STATE: 1
|
||||||
|
},
|
||||||
|
PageIndex: 1,
|
||||||
|
PageSize: 999999,
|
||||||
|
}
|
||||||
|
let newReq: any = {
|
||||||
|
name: "",
|
||||||
|
value: encryptAES(JSON.stringify(req))
|
||||||
|
}
|
||||||
|
const data: any = await handleGetREALESTATEList(newReq)
|
||||||
|
console.log('dhaskdhaslhdasl', data);
|
||||||
|
// 这个服务区的全部不动产的数据 都在data里面
|
||||||
|
if (data && data.length > 0) {
|
||||||
|
let unitObj: any = {
|
||||||
|
1: "平方千米",
|
||||||
|
2: "平方米",
|
||||||
|
3: "公顷",
|
||||||
|
4: "亩",
|
||||||
|
5: "h㎡",
|
||||||
|
6: "k㎡",
|
||||||
|
7: "㎡"
|
||||||
|
}
|
||||||
|
data.forEach((item: any) => {
|
||||||
|
if (REALESTATE_IDList.indexOf(item.REALESTATE_ID) !== -1) {
|
||||||
|
estateLeaseItems.push({
|
||||||
|
provinceAdress: item.PROVINCE_NAME, // 省份
|
||||||
|
cityAdreess: item.CITY_NAME,// 城市
|
||||||
|
detailAddress: item.REALESTATE_ADDRESS,// 不动产详细地址
|
||||||
|
crossCitySign: item.CROSS_CITYSIGN,// 跨地(市)标志
|
||||||
|
areaunit: item.AREA_UNIT ? unitObj[item.AREA_UNIT] : "",//面积单位
|
||||||
|
startLeaseDate: item.START_LEASEDATE, // 租赁开始日期
|
||||||
|
endLeaseDate: item.END_LEASEDATE,//租赁结束日期
|
||||||
|
estateId: item.ESTATE_IDENTITY,//房屋产权证书/不动产权证号
|
||||||
|
specialIndustryNumber: item.SPECIALINDUSTRY_NUMBER,//不动产基础资料编码
|
||||||
|
carBrandNo: item.CARBRAND_NO,// 车牌号
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let newDesc: string = ''
|
let newDesc: string = ''
|
||||||
let addStr: string = `被红冲蓝字数电发票号码:${record?.blueinvoiceNo || ""}\t\t红字发票信息确认单编号:${record?.BILL_NO ? `HC-${record?.BILL_NO}` : ""};\n`
|
let addStr: string = `被红冲蓝字数电发票号码:${record?.blueinvoiceNo || ""}\t\t红字发票信息确认单编号:${record?.BILL_NO ? `HC-${record?.BILL_NO}` : ""};\n`
|
||||||
|
|
||||||
@ -574,7 +658,10 @@ const RedReversal: React.FC<{ currentUser: any }> = (props) => {
|
|||||||
blueinvoiceCode: "",
|
blueinvoiceCode: "",
|
||||||
billDetail: billDetailReq,
|
billDetail: billDetailReq,
|
||||||
remark: `被红冲蓝字数电发票号码:${record?.SERIAL_NO}\t\t红字发票信息确认单编号:${record?.BILL_NO ? `HC-${record?.BILL_NO}` : ""};\n` + record?.BILL_DESC,
|
remark: `被红冲蓝字数电发票号码:${record?.SERIAL_NO}\t\t红字发票信息确认单编号:${record?.BILL_NO ? `HC-${record?.BILL_NO}` : ""};\n` + record?.BILL_DESC,
|
||||||
|
estateLeaseItems: estateLeaseItems,
|
||||||
|
specialType: estateLeaseItems && estateLeaseItems.length > 0 ? 'E06' : '00'
|
||||||
}
|
}
|
||||||
|
console.log('objobj', obj);
|
||||||
|
|
||||||
// 构造原始数据
|
// 构造原始数据
|
||||||
const originalData = [obj]; // 将record作为data数组的一项
|
const originalData = [obj]; // 将record作为data数组的一项
|
||||||
@ -619,15 +706,26 @@ const RedReversal: React.FC<{ currentUser: any }> = (props) => {
|
|||||||
billDetail: billDetail
|
billDetail: billDetail
|
||||||
})
|
})
|
||||||
// 针对这个红冲 开一张新票子 编码为新的红冲编码 状态为9000 开票中 且票据类型变为 3000 红票 BILL_TYPE
|
// 针对这个红冲 开一张新票子 编码为新的红冲编码 状态为9000 开票中 且票据类型变为 3000 红票 BILL_TYPE
|
||||||
|
// 因为 DetailList 里面要把id去掉 所以要处理一下
|
||||||
|
let newDetailList: any = []
|
||||||
|
if (DetailList && DetailList.length > 0) {
|
||||||
|
DetailList.forEach((item: any) => {
|
||||||
|
newDetailList.push({
|
||||||
|
...item,
|
||||||
|
BILLDETAIL_ID: null,
|
||||||
|
BILL_ID: null,
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
await handleUpdateOldBill({
|
await handleUpdateOldBill({
|
||||||
...record,
|
...record,
|
||||||
billDetail: billDetail,
|
DetailList: newDetailList,
|
||||||
BILL_TYPE: 3000,
|
BILL_TYPE: 3000,
|
||||||
BILL_STATE: 9000,
|
BILL_STATE: 9000,
|
||||||
BILL_NO: `HC-${record?.BILL_NO}`,
|
BILL_NO: `HC-${record?.BILL_NO}`,
|
||||||
BILL_DATE: moment().format('YYYY-MM-DD'),
|
BILL_DATE: moment().format('YYYY-MM-DD'),
|
||||||
BILL_DESC: formData?.redReasonSelect ? redReasonObj[formData?.redReasonSelect] : "",
|
BILL_DESC: formData?.redReasonSelect ? redReasonObj[formData?.redReasonSelect] : "",
|
||||||
BILL_ID: "",
|
BILL_ID: null,
|
||||||
BILL_TAXAMOUNT: -record?.BILL_TAXAMOUNT,
|
BILL_TAXAMOUNT: -record?.BILL_TAXAMOUNT,
|
||||||
BILL_AMOUNT: -record?.BILL_AMOUNT,
|
BILL_AMOUNT: -record?.BILL_AMOUNT,
|
||||||
INVOICE_TAXAMOUNT: -record?.INVOICE_TAXAMOUNT,
|
INVOICE_TAXAMOUNT: -record?.INVOICE_TAXAMOUNT,
|
||||||
@ -897,28 +995,6 @@ const RedReversal: React.FC<{ currentUser: any }> = (props) => {
|
|||||||
const handleSynchroBILL = async (type: number, obj: any) => {
|
const handleSynchroBILL = async (type: number, obj: any) => {
|
||||||
// type 1 开票的同步状态 即 9000 2 开票的红冲状态 即 9990
|
// type 1 开票的同步状态 即 9000 2 开票的红冲状态 即 9990
|
||||||
// 发票明细列表
|
// 发票明细列表
|
||||||
let detailList: any = []
|
|
||||||
if (obj?.billDetail && obj?.billDetail.length > 0) {
|
|
||||||
obj?.billDetail.forEach((item: any) => {
|
|
||||||
detailList.push({
|
|
||||||
ITEM_NAME: item.goodsName,// 款项名称
|
|
||||||
ITEM_RULE: item.specification,// 规格型号
|
|
||||||
ITEM_UNIT: item.units,// 计量单位
|
|
||||||
INVOICE_COUNT: item.quantity,// 开票数量
|
|
||||||
INVOICE_PRICE: item.price,// 开票单价
|
|
||||||
INVOICE_AMOUNT: item.amount,// 开票金额
|
|
||||||
DUTY_PARAGRAPH: item.taxRate,// 开票税率
|
|
||||||
INVOICE_TAX: item.taxAmount,// 开票税额
|
|
||||||
INVOICE_DISCOUNT: item.discountAmount,// 折扣金额
|
|
||||||
INVOICE_DISCOUNTTAX: "",// 折扣税额
|
|
||||||
ITEM_ACTAMOUNT: "",// 款项价税合计
|
|
||||||
ITEM_DEDUCTIONAMOUNT: "",// 扣除额
|
|
||||||
ITEM_ID: "",// 关联数据表内码(多个)
|
|
||||||
TABLE_NAME: "",// 数据表名称
|
|
||||||
OPERATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss'),// 操作时间
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
let req: any = {
|
let req: any = {
|
||||||
...obj,
|
...obj,
|
||||||
BILL_TYPE: obj.BILL_TYPE || "", // 票据类型(1000:增值税专用发票;2000:普通发票) ,
|
BILL_TYPE: obj.BILL_TYPE || "", // 票据类型(1000:增值税专用发票;2000:普通发票) ,
|
||||||
@ -953,6 +1029,7 @@ const RedReversal: React.FC<{ currentUser: any }> = (props) => {
|
|||||||
BILL_STATE: type === 1 ? 9000 : type === 2 ? '9990' : '',// 票据状态
|
BILL_STATE: type === 1 ? 9000 : type === 2 ? '9990' : '',// 票据状态
|
||||||
DetailList: obj?.DetailList,// 发票明细列表
|
DetailList: obj?.DetailList,// 发票明细列表
|
||||||
}
|
}
|
||||||
|
console.log('reqreq', req);
|
||||||
const data = await handleSynchroBILLInterface(req)
|
const data = await handleSynchroBILLInterface(req)
|
||||||
}
|
}
|
||||||
// 获取当前用户信息
|
// 获取当前用户信息
|
||||||
@ -992,6 +1069,8 @@ const RedReversal: React.FC<{ currentUser: any }> = (props) => {
|
|||||||
...record,
|
...record,
|
||||||
}
|
}
|
||||||
const data = await handleSynchroBILLInterface(req)
|
const data = await handleSynchroBILLInterface(req)
|
||||||
|
// 新的也要同步 红冲发起申请的流程记录
|
||||||
|
await handleSynchroAPPLYAPPROVEFun(3, data.Result_Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
useEffect(async () => {
|
useEffect(async () => {
|
||||||
@ -1015,8 +1094,7 @@ const RedReversal: React.FC<{ currentUser: any }> = (props) => {
|
|||||||
}}
|
}}
|
||||||
scroll={{ x: "100%", y: '400px' }}
|
scroll={{ x: "100%", y: '400px' }}
|
||||||
headerTitle={<span style={{ color: "#1890ff", fontSize: 14, fontWeight: 600 }}>可红冲列表</span>}
|
headerTitle={<span style={{ color: "#1890ff", fontSize: 14, fontWeight: 600 }}>可红冲列表</span>}
|
||||||
// search={{ span: 6, labelWidth: 100 }}
|
search={{ span: 6, labelWidth: 100 }}
|
||||||
search={false}
|
|
||||||
request={async (params: any, sorter: any) => {
|
request={async (params: any, sorter: any) => {
|
||||||
const search = window.location.search;
|
const search = window.location.search;
|
||||||
const addressParams = Object.fromEntries(new URLSearchParams(search).entries());
|
const addressParams = Object.fromEntries(new URLSearchParams(search).entries());
|
||||||
@ -1028,18 +1106,22 @@ const RedReversal: React.FC<{ currentUser: any }> = (props) => {
|
|||||||
return value ? `${n} ${value.replace('end', '')}` : ''
|
return value ? `${n} ${value.replace('end', '')}` : ''
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
// 获取票据信息表列表
|
// 获取票据信息表列表
|
||||||
const req: any = {
|
const req: any = {
|
||||||
SearchParameter: {
|
SearchParameter: {
|
||||||
BILL_TYPES: "2000",// 现在只支持普票红冲 所以找普票 且状态为 普票的已开票即可
|
BILL_TYPES: "1000,2000",// 看普票 和 专票
|
||||||
SERVERPART_IDS: userInfo?.ServerpartIds,
|
SERVERPART_IDS: userInfo?.ServerpartIds,
|
||||||
BILL_STATES: "9200"
|
BILL_STATES: "9200",
|
||||||
|
INVOICE_TAXAMOUNT: params?.INVOICE_TAXAMOUNT || ""
|
||||||
// BILL_TYPES: "1000,2000"
|
// BILL_TYPES: "1000,2000"
|
||||||
},
|
},
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 999999,
|
PageSize: 999999,
|
||||||
sortstr: sortstr.length ? sortstr.toString() : "BILL_ID desc",
|
sortstr: sortstr.length ? sortstr.toString() : "BILL_ID desc",
|
||||||
|
keyWord: {
|
||||||
|
Key: "BILL_PERSON,BILL_NO",
|
||||||
|
Value: params?.searchText || ""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const data = await handleGetBILLList(req)
|
const data = await handleGetBILLList(req)
|
||||||
@ -1082,7 +1164,7 @@ const RedReversal: React.FC<{ currentUser: any }> = (props) => {
|
|||||||
// 获取票据信息表列表
|
// 获取票据信息表列表
|
||||||
const req: any = {
|
const req: any = {
|
||||||
SearchParameter: {
|
SearchParameter: {
|
||||||
BILL_TYPES: "3000",// 现在只支持普票红冲 所以找普票 且状态为 普票的已开票即可
|
BILL_TYPES: "3000",// 只看红票
|
||||||
SERVERPART_IDS: userInfo?.ServerpartIds,
|
SERVERPART_IDS: userInfo?.ServerpartIds,
|
||||||
BILL_STATES: "9000"
|
BILL_STATES: "9000"
|
||||||
// BILL_TYPES: "1000,2000"
|
// BILL_TYPES: "1000,2000"
|
||||||
@ -1102,6 +1184,11 @@ const RedReversal: React.FC<{ currentUser: any }> = (props) => {
|
|||||||
value: columnsStateBottomMap,
|
value: columnsStateBottomMap,
|
||||||
onChange: setColumnsStateBottomMap,
|
onChange: setColumnsStateBottomMap,
|
||||||
}}
|
}}
|
||||||
|
toolbar={{
|
||||||
|
actions: [
|
||||||
|
|
||||||
|
]
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* 用来输入红冲原因的 */}
|
{/* 用来输入红冲原因的 */}
|
||||||
@ -1128,6 +1215,14 @@ const RedReversal: React.FC<{ currentUser: any }> = (props) => {
|
|||||||
onFinish={() => {
|
onFinish={() => {
|
||||||
setConfirmLoading(true)
|
setConfirmLoading(true)
|
||||||
handleRedGoBill(currentRow)
|
handleRedGoBill(currentRow)
|
||||||
|
// if (currentRow?.BILL_TYPE === 2000) {
|
||||||
|
// // 普票的情况下
|
||||||
|
// handleRedGoBill(currentRow)
|
||||||
|
// } else {
|
||||||
|
// // 专票红冲
|
||||||
|
// handleRedGoBill(currentRow)
|
||||||
|
// // handleSpecialBillRed(currentRow)
|
||||||
|
// }
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<ProFormSelect
|
<ProFormSelect
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user