update
This commit is contained in:
parent
c426f612e5
commit
877d0d339f
@ -6,17 +6,22 @@
|
|||||||
* @Description: 合作方分润 组件
|
* @Description: 合作方分润 组件
|
||||||
* @FilePath: \cloud-platform\src\pages\BussinessProject\components\ShareBenefit.tsx
|
* @FilePath: \cloud-platform\src\pages\BussinessProject\components\ShareBenefit.tsx
|
||||||
*/
|
*/
|
||||||
|
// 合作分润
|
||||||
import { useRef, useState } from 'react';
|
import { useRef, useState } from 'react';
|
||||||
import { Drawer, message, Space } from 'antd';
|
import { Button, Drawer, message, Modal, Popconfirm, Space, Image } from 'antd';
|
||||||
import ProTable from '@ant-design/pro-table';
|
import ProTable from '@ant-design/pro-table';
|
||||||
import type { ActionType, ProColumns } from '@ant-design/pro-table';
|
import type { ActionType, ProColumns } from '@ant-design/pro-table';
|
||||||
import type { BusinessProjectModel, RevenueConfirmModel } from '../data';
|
import type { BusinessProjectModel, RevenueConfirmModel } from '../data';
|
||||||
import { createRevenueAccount, getRevenuenConfirmList, handleAgain, handleGetSplitRes } from '../service'
|
import { createRevenueAccount, getRevenuenConfirmList, getShopRoyaltyDetail, handleAgain, handleGetSplitRes, handleGetSynchroShopRoyalty } from '../service'
|
||||||
import RevenueList from './RevenueList';
|
import RevenueList from './RevenueList';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { fmoney } from "@/services/options";
|
import { fmoney } from "@/services/options";
|
||||||
import { getDetail } from "@/pages/contract/service";
|
import { getDetail } from "@/pages/contract/service";
|
||||||
import Item from 'antd/lib/list/Item';
|
import Item from 'antd/lib/list/Item';
|
||||||
|
import ProForm, { ProFormUploadButton } from '@ant-design/pro-form';
|
||||||
|
import { deleteAHYDPicture, getPictureList, uploadAHYDPicture } from '@/services/picture';
|
||||||
|
import { handleDeletePicture } from '@/pages/basicManage/serverpartAssets/service';
|
||||||
|
import { ExclamationCircleOutlined } from '@ant-design/icons';
|
||||||
|
|
||||||
// 更新回款信息
|
// 更新回款信息
|
||||||
const handleAddUpdate = async (dataType: 1000 | 2000, fields: number) => {
|
const handleAddUpdate = async (dataType: 1000 | 2000, fields: number) => {
|
||||||
@ -41,11 +46,24 @@ const ShareBenefit: React.FC<{ props: BusinessProjectModel, showEdit?: boolean,
|
|||||||
{ props, showEdit, startDate, endDate, otherDate, showType, relatedContractsList }: { props: BusinessProjectModel, showEdit?: boolean, startDate?: string, endDate?: string, otherDate?: any, showType?: any, relatedContractsList?: any }) => {
|
{ props, showEdit, startDate, endDate, otherDate, showType, relatedContractsList }: { props: BusinessProjectModel, showEdit?: boolean, startDate?: string, endDate?: string, otherDate?: any, showType?: any, relatedContractsList?: any }) => {
|
||||||
// const { SERVERPARTSHOP_ID, SERVERPARTSHOP_NAME } = props
|
// const { SERVERPARTSHOP_ID, SERVERPARTSHOP_NAME } = props
|
||||||
const actionRef = useRef<ActionType>() // 表格对应的对象
|
const actionRef = useRef<ActionType>() // 表格对应的对象
|
||||||
|
// 线下结算的表单内容
|
||||||
|
const offlineSettlementFormRef = useRef<any>()
|
||||||
const [showDetail, setShowDetail] = useState<boolean>(false) // 是否显示详情
|
const [showDetail, setShowDetail] = useState<boolean>(false) // 是否显示详情
|
||||||
const [currentRow, setCurrentRow] = useState<BusinessProjectModel | any>(undefined) // 选中的当前行
|
const [currentRow, setCurrentRow] = useState<BusinessProjectModel | any>(undefined) // 选中的当前行
|
||||||
const [tableLoading, setTableLoading] = useState<boolean>(false)
|
const [tableLoading, setTableLoading] = useState<boolean>(false)
|
||||||
// 关联合同需要遍历的表格
|
// 关联合同需要遍历的表格
|
||||||
const [relateTableData, setRelateTableData] = useState<any>()
|
const [relateTableData, setRelateTableData] = useState<any>()
|
||||||
|
// 线下结算悬浮框
|
||||||
|
const [offlineSettlementModal, setOfflineSettlementModal] = useState<boolean>(false)
|
||||||
|
// 上传的文件列表
|
||||||
|
const [fileList, setFileList] = useState<any>()
|
||||||
|
// 线下结算悬浮框的loading效果
|
||||||
|
const [offlineSettlementLoading, setOfflineSettlementLoading] = useState<boolean>(false)
|
||||||
|
// 拆分记录详情
|
||||||
|
const [shopRoyaltyDetail, setShopRoyaltyDetail] = useState<any>()
|
||||||
|
const { confirm } = Modal;
|
||||||
|
// 预览图片
|
||||||
|
const [imagePreviewVisible, setImagePreviewVisible] = useState<boolean>(false)
|
||||||
const revenuenColumns: any = [
|
const revenuenColumns: any = [
|
||||||
{
|
{
|
||||||
title: '开始日期',
|
title: '开始日期',
|
||||||
@ -169,58 +187,96 @@ const ShareBenefit: React.FC<{ props: BusinessProjectModel, showEdit?: boolean,
|
|||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
valueType: 'option',
|
valueType: 'option',
|
||||||
width: 80,
|
width: 200,
|
||||||
hideInTable: showType === 'Nooperate' ? true : !(showEdit === undefined || showEdit),
|
hideInTable: showType === 'Nooperate' ? true : !(showEdit === undefined || showEdit),
|
||||||
render: (_, record) => (
|
render: (_, record) => {
|
||||||
new Date(record?.STARTDATE).getTime() < new Date().getTime() && record.showAgainBtn ?
|
return <div>
|
||||||
<Space>
|
<a style={{ marginRight: "8px" }} onClick={() => {
|
||||||
<a
|
setCurrentRow(record)
|
||||||
key="revenue"
|
setOfflineSettlementModal(true)
|
||||||
onClick={async () => {
|
}}>
|
||||||
// const amount1000 = await handleAddUpdate(1000,
|
{record?.EXPENSE_TYPE === 1000 ? '查看结算凭证' : '线下结算'}
|
||||||
// record?.SHOPROYALTY_ID ? record?.SHOPROYALTY_ID : 0)
|
</a >
|
||||||
// if (amount1000) {
|
|
||||||
// actionRef.current?.reload()
|
|
||||||
// }
|
|
||||||
setTableLoading(true)
|
|
||||||
|
|
||||||
let req = {}
|
{
|
||||||
const yesterday = moment().subtract(1, 'day').startOf('day').format('YYYY-MM-DD')
|
new Date(record?.STARTDATE).getTime() < new Date().getTime() && record.showAgainBtn ?
|
||||||
if (new Date(yesterday).getTime() < new Date(moment(record.ENDDATE).format('YYYY-MM-DD')).getTime()) {
|
<Space>
|
||||||
req = {
|
|
||||||
StartDate: moment(record.STARTDATE).format('YYYY-MM-DD'),
|
<a
|
||||||
EndDate: moment(yesterday).format('YYYY-MM-DD'),
|
key="revenue"
|
||||||
ProjectId: props.BUSINESSPROJECT_ID,
|
onClick={async () => {
|
||||||
// OutBusinessType:props.BUSINESS_TYPE
|
// const amount1000 = await handleAddUpdate(1000,
|
||||||
}
|
// record?.SHOPROYALTY_ID ? record?.SHOPROYALTY_ID : 0)
|
||||||
} else {
|
// if (amount1000) {
|
||||||
req = {
|
// actionRef.current?.reload()
|
||||||
StartDate: moment(record.STARTDATE).format('YYYY-MM-DD'),
|
// }
|
||||||
EndDate: moment(record.ENDDATE).format('YYYY-MM-DD'),
|
setTableLoading(true)
|
||||||
ProjectId: props.BUSINESSPROJECT_ID,
|
|
||||||
// OutBusinessType:props.BUSINESS_TYPE
|
let req = {}
|
||||||
}
|
const yesterday = moment().subtract(1, 'day').startOf('day').format('YYYY-MM-DD')
|
||||||
}
|
if (new Date(yesterday).getTime() < new Date(moment(record.ENDDATE).format('YYYY-MM-DD')).getTime()) {
|
||||||
const data = await handleAgain(req)
|
req = {
|
||||||
setTableLoading(false)
|
StartDate: moment(record.STARTDATE).format('YYYY-MM-DD'),
|
||||||
if (data.Result_Code === 100) {
|
EndDate: moment(yesterday).format('YYYY-MM-DD'),
|
||||||
actionRef.current?.reload()
|
ProjectId: props.BUSINESSPROJECT_ID,
|
||||||
message.success(data.Result_Desc)
|
// OutBusinessType:props.BUSINESS_TYPE
|
||||||
} else {
|
}
|
||||||
message.error(data.Result_Desc)
|
} else {
|
||||||
}
|
req = {
|
||||||
}}
|
StartDate: moment(record.STARTDATE).format('YYYY-MM-DD'),
|
||||||
>
|
EndDate: moment(record.ENDDATE).format('YYYY-MM-DD'),
|
||||||
重新生成
|
ProjectId: props.BUSINESSPROJECT_ID,
|
||||||
</a>
|
// OutBusinessType:props.BUSINESS_TYPE
|
||||||
</Space> : ''
|
}
|
||||||
),
|
}
|
||||||
|
const data = await handleAgain(req)
|
||||||
|
setTableLoading(false)
|
||||||
|
if (data.Result_Code === 100) {
|
||||||
|
actionRef.current?.reload()
|
||||||
|
message.success(data.Result_Desc)
|
||||||
|
} else {
|
||||||
|
message.error(data.Result_Desc)
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
重新生成
|
||||||
|
</a>
|
||||||
|
</Space> : ''
|
||||||
|
}
|
||||||
|
</div >
|
||||||
|
|
||||||
|
},
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
const relateRevenuenColumns: any = [
|
const relateRevenuenColumns: any = [
|
||||||
...revenuenColumns.slice(0, 9)
|
...revenuenColumns.slice(0, 9)
|
||||||
]
|
]
|
||||||
|
// 校验图片大小
|
||||||
|
const beforeUpload = (file: any) => {
|
||||||
|
console.log('file', file);
|
||||||
|
|
||||||
|
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
|
||||||
|
if (!isJpgOrPng) {
|
||||||
|
message.error('你只能上传 JPG或PNG 格式的图片文件!');
|
||||||
|
setFileList([])
|
||||||
|
return isJpgOrPng;
|
||||||
|
}
|
||||||
|
console.log('2');
|
||||||
|
|
||||||
|
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||||
|
if (!isLt2M) {
|
||||||
|
message.error('图片大小不超过 2MB!');
|
||||||
|
}
|
||||||
|
return isJpgOrPng && isLt2M;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 预览上传后的图片
|
||||||
|
const handlePreview = async () => {
|
||||||
|
setFileList(fileList)
|
||||||
|
setImagePreviewVisible(true)
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
// 拿到关联合同项目数据
|
// 拿到关联合同项目数据
|
||||||
const handleGetRelatedData = async (list: any) => {
|
const handleGetRelatedData = async (list: any) => {
|
||||||
@ -345,6 +401,23 @@ const ShareBenefit: React.FC<{ props: BusinessProjectModel, showEdit?: boolean,
|
|||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{fileList && fileList.length > 0 && <div style={{ display: 'none' }}>
|
||||||
|
<Image.PreviewGroup
|
||||||
|
preview={{
|
||||||
|
visible: imagePreviewVisible,
|
||||||
|
onVisibleChange: vis => {
|
||||||
|
setImagePreviewVisible(vis)
|
||||||
|
}
|
||||||
|
|
||||||
|
}}>
|
||||||
|
{
|
||||||
|
fileList.map((n: any) =>
|
||||||
|
<Image src={n.url} key={n.url} />
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
</Image.PreviewGroup>
|
||||||
|
</div>}
|
||||||
|
|
||||||
{/* 查看项目详情 右侧弹出的抽屉 */}
|
{/* 查看项目详情 右侧弹出的抽屉 */}
|
||||||
<Drawer
|
<Drawer
|
||||||
@ -353,6 +426,7 @@ const ShareBenefit: React.FC<{ props: BusinessProjectModel, showEdit?: boolean,
|
|||||||
visible={showDetail} // 抽屉弹框是否显示状态
|
visible={showDetail} // 抽屉弹框是否显示状态
|
||||||
onClose={() => { // 关闭抽屉 设置抽屉状态为关闭
|
onClose={() => { // 关闭抽屉 设置抽屉状态为关闭
|
||||||
setShowDetail(false);
|
setShowDetail(false);
|
||||||
|
setCurrentRow(undefined)
|
||||||
}}
|
}}
|
||||||
bodyStyle={{ backgroundColor: "#f9f9f9", padding: 0 }}
|
bodyStyle={{ backgroundColor: "#f9f9f9", padding: 0 }}
|
||||||
closable={false}
|
closable={false}
|
||||||
@ -364,6 +438,201 @@ const ShareBenefit: React.FC<{ props: BusinessProjectModel, showEdit?: boolean,
|
|||||||
StartDate={moment(currentRow?.STARTDATE).format('YYYY-MM-DD')}
|
StartDate={moment(currentRow?.STARTDATE).format('YYYY-MM-DD')}
|
||||||
EndDate={moment(currentRow?.ENDDATE).format('YYYY-MM-DD')} onShow={showDetail}></RevenueList>}
|
EndDate={moment(currentRow?.ENDDATE).format('YYYY-MM-DD')} onShow={showDetail}></RevenueList>}
|
||||||
</Drawer>
|
</Drawer>
|
||||||
|
|
||||||
|
{/* 线下结算上传的凭证悬浮框 */}
|
||||||
|
<Modal
|
||||||
|
title={"线下结算凭证上传"}
|
||||||
|
destroyOnClose={true}
|
||||||
|
width={'60%'}
|
||||||
|
bodyStyle={{
|
||||||
|
height: '700px', // 你可以根据需要调整高度
|
||||||
|
overflowY: 'auto',
|
||||||
|
}}
|
||||||
|
visible={offlineSettlementModal}
|
||||||
|
onCancel={() => {
|
||||||
|
setOfflineSettlementModal(false)
|
||||||
|
setCurrentRow(null)
|
||||||
|
setFileList([])
|
||||||
|
setShopRoyaltyDetail(undefined)
|
||||||
|
}}
|
||||||
|
footer={currentRow?.EXPENSE_TYPE === 1000 ?
|
||||||
|
<div>
|
||||||
|
<Popconfirm title={'确认转为线上结算?'}
|
||||||
|
onConfirm={async () => {
|
||||||
|
const req: any = {
|
||||||
|
...shopRoyaltyDetail,
|
||||||
|
EXPENSE_TYPE: 2000
|
||||||
|
}
|
||||||
|
console.log('reqreda', req);
|
||||||
|
setOfflineSettlementLoading(true)
|
||||||
|
const result: any = await handleGetSynchroShopRoyalty(req)
|
||||||
|
setOfflineSettlementLoading(false)
|
||||||
|
if (result.Result_Code === 100) {
|
||||||
|
message.success('同步成功!')
|
||||||
|
|
||||||
|
setOfflineSettlementModal(false)
|
||||||
|
setCurrentRow(null)
|
||||||
|
setFileList([])
|
||||||
|
|
||||||
|
actionRef.current?.reload()
|
||||||
|
} else {
|
||||||
|
message.error(result.Result_Desc)
|
||||||
|
}
|
||||||
|
}}>
|
||||||
|
<Button loading={offlineSettlementLoading} type={'primary'} danger>
|
||||||
|
线上结算
|
||||||
|
</Button>
|
||||||
|
</Popconfirm>
|
||||||
|
</div>
|
||||||
|
: <div>
|
||||||
|
<Button onClick={() => {
|
||||||
|
setOfflineSettlementModal(false)
|
||||||
|
setCurrentRow(null)
|
||||||
|
setShopRoyaltyDetail(undefined)
|
||||||
|
setFileList([])
|
||||||
|
}}>取消</Button>
|
||||||
|
<Button loading={offlineSettlementLoading} type={'primary'} onClick={() => {
|
||||||
|
offlineSettlementFormRef.current?.validateFields().then(async (res: any) => {
|
||||||
|
console.log('reqrq', res);
|
||||||
|
const formData = new FormData()
|
||||||
|
for (const file of res.settlementVoucher) {
|
||||||
|
if (file.ImageId) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
const originalFile = file.originFileObj || file;
|
||||||
|
formData.append('files[]', originalFile);
|
||||||
|
formData.append('ImageName', originalFile.name);
|
||||||
|
}
|
||||||
|
|
||||||
|
formData.append('TableId', currentRow?.SHOPROYALTY_ID);
|
||||||
|
formData.append('TableType', "1134");
|
||||||
|
setOfflineSettlementLoading(true)
|
||||||
|
let data = await uploadAHYDPicture(formData)
|
||||||
|
setOfflineSettlementLoading(false)
|
||||||
|
console.log('dahsjdhas', data);
|
||||||
|
if (data.Result_Code === 100) {
|
||||||
|
const req: any = {
|
||||||
|
...shopRoyaltyDetail,
|
||||||
|
EXPENSE_TYPE: 1000
|
||||||
|
}
|
||||||
|
console.log('reqreda', req);
|
||||||
|
const result: any = await handleGetSynchroShopRoyalty(req)
|
||||||
|
console.log('resultresult', result);
|
||||||
|
if (result.Result_Code === 100) {
|
||||||
|
message.success('同步成功!')
|
||||||
|
|
||||||
|
setOfflineSettlementModal(false)
|
||||||
|
setCurrentRow(null)
|
||||||
|
setFileList([])
|
||||||
|
|
||||||
|
actionRef.current?.reload()
|
||||||
|
} else {
|
||||||
|
message.error(result.Result_Desc)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
message.error(data.Result_Desc)
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
}}>确认</Button>
|
||||||
|
</div>}
|
||||||
|
>
|
||||||
|
<ProForm
|
||||||
|
formRef={offlineSettlementFormRef}
|
||||||
|
submitter={false}
|
||||||
|
request={async () => {
|
||||||
|
// 当前合作分润 的详情 去请求一下
|
||||||
|
const detail: any = await getShopRoyaltyDetail(currentRow?.SHOPROYALTY_ID)
|
||||||
|
setShopRoyaltyDetail(detail)
|
||||||
|
// if (currentRow?.EXPENSE_TYPE === 1000) {
|
||||||
|
const data = await getPictureList(currentRow?.SHOPROYALTY_ID, '1134')
|
||||||
|
console.log('图片附件', data);
|
||||||
|
if (data.data && data.data.length > 0) {
|
||||||
|
let fileList: any = []
|
||||||
|
data.data.forEach((item: any) => {
|
||||||
|
fileList.push({
|
||||||
|
uid: item.ImageId,
|
||||||
|
name: item.ImageName,
|
||||||
|
status: 'done',
|
||||||
|
url: item.ImageUrl,
|
||||||
|
path: item.ImagePath
|
||||||
|
})
|
||||||
|
})
|
||||||
|
setFileList(fileList)
|
||||||
|
return { ...detail }
|
||||||
|
} else {
|
||||||
|
return { ...detail }
|
||||||
|
}
|
||||||
|
// } else {
|
||||||
|
// return {
|
||||||
|
// ...detail
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<ProFormUploadButton
|
||||||
|
label={"结算凭证"}
|
||||||
|
name="settlementVoucher"
|
||||||
|
listType="picture-card"
|
||||||
|
accept="image/*"
|
||||||
|
rules={[
|
||||||
|
{ required: true, message: "请上传结算凭证!" }
|
||||||
|
]}
|
||||||
|
disabled={currentRow?.EXPENSE_TYPE === 1000}
|
||||||
|
fieldProps={{
|
||||||
|
beforeUpload,
|
||||||
|
onPreview: handlePreview,
|
||||||
|
fileList: fileList, // 绑定 fileList
|
||||||
|
customRequest: ({ file, onSuccess }) => {
|
||||||
|
// 自定义上传,不实际发送请求
|
||||||
|
setTimeout(() => {
|
||||||
|
if (onSuccess) {
|
||||||
|
onSuccess({});
|
||||||
|
}
|
||||||
|
}, 0);
|
||||||
|
},
|
||||||
|
onChange: async (info: any) => {
|
||||||
|
console.log('infoinfoinfo', info);
|
||||||
|
|
||||||
|
if (info.file.status === 'removed') {
|
||||||
|
const index = fileList.findIndex((n: any) => n.uid === info.file.uid);
|
||||||
|
confirm({
|
||||||
|
title: '确认删除该文件吗?',
|
||||||
|
icon: <ExclamationCircleOutlined />,
|
||||||
|
async onOk() {
|
||||||
|
if (info.file.uid) {
|
||||||
|
const deleteLoading = message.loading('正在删除...')
|
||||||
|
const success = await deleteAHYDPicture(info.file?.path, info.file?.uid, '', '3000')
|
||||||
|
deleteLoading()
|
||||||
|
|
||||||
|
if (success) {
|
||||||
|
const files = [...fileList]
|
||||||
|
files.splice(index, 1)
|
||||||
|
setFileList(files)
|
||||||
|
message.success("删除成功")
|
||||||
|
actionRef.current?.reload()
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
message.error("删除失败")
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
const files = [...fileList];
|
||||||
|
files.splice(index, 1);
|
||||||
|
setFileList(files);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onCancel() {
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
setFileList(info.fileList)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</ProForm>
|
||||||
|
</Modal>
|
||||||
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,6 +6,8 @@
|
|||||||
* @Description: 经营项目列表页面
|
* @Description: 经营项目列表页面
|
||||||
* @FilePath: \cloud-platform\src\pages\BussinessProject\list.tsx
|
* @FilePath: \cloud-platform\src\pages\BussinessProject\list.tsx
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// 经营项目管理
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import Draggable from "react-draggable";
|
import Draggable from "react-draggable";
|
||||||
import SubMenu from "antd/lib/menu/SubMenu";
|
import SubMenu from "antd/lib/menu/SubMenu";
|
||||||
|
|||||||
@ -146,22 +146,22 @@ export async function getPaymentConfirmList(params?: any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// getPaymentConfirmList 的get请求方式
|
// getPaymentConfirmList 的get请求方式
|
||||||
export async function getPaymentConfirmListGet(params?: any){
|
export async function getPaymentConfirmListGet(params?: any) {
|
||||||
const data = await request('/BusinessProject/GetPaymentConfirmList', {
|
const data = await request('/BusinessProject/GetPaymentConfirmList', {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
params,
|
params,
|
||||||
})
|
})
|
||||||
|
|
||||||
if (data.Result_Code !== 100) {
|
if (data.Result_Code !== 100) {
|
||||||
return {
|
return {
|
||||||
data: [],
|
data: [],
|
||||||
current: 1,
|
current: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
total: 0,
|
total: 0,
|
||||||
success: false
|
success: false
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return tableList(data.Result_Data);
|
return tableList(data.Result_Data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -315,21 +315,38 @@ export async function handleAgain(params?: any) {
|
|||||||
// 获取年度经营项目拆分结果
|
// 获取年度经营项目拆分结果
|
||||||
export async function handleGetSplitRes(params?: any) {
|
export async function handleGetSplitRes(params?: any) {
|
||||||
|
|
||||||
const data = await request('/BusinessProject/GetAnnualSplit', {
|
const data = await request('/BusinessProject/GetAnnualSplit', {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
params,
|
params,
|
||||||
})
|
})
|
||||||
|
|
||||||
if (data.Result_Code !== 100) {
|
if (data.Result_Code !== 100) {
|
||||||
return {
|
return {
|
||||||
data: [],
|
data: [],
|
||||||
otherData: null,
|
otherData: null,
|
||||||
current: 1,
|
current: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
total: 0,
|
total: 0,
|
||||||
success: false
|
success: false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return tableList(data.Result_Data);
|
return tableList(data.Result_Data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 同步 合作分润 里面的记录
|
||||||
|
export async function handleGetSynchroShopRoyalty(params?: any) {
|
||||||
|
|
||||||
|
const data = await request('/BusinessProject/SynchroShopRoyalty', {
|
||||||
|
method: 'POST',
|
||||||
|
data: params,
|
||||||
|
})
|
||||||
|
|
||||||
|
if (data.Result_Code !== 100) {
|
||||||
|
return data
|
||||||
|
}
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
@ -11,7 +11,7 @@ import type { UserModel } from "../data";
|
|||||||
import type { CurrentUser } from '@/models/user';
|
import type { CurrentUser } from '@/models/user';
|
||||||
|
|
||||||
import { getMerchantTree, getMerchantTreeNosessoin, getOnwer } from "@/services/options";
|
import { getMerchantTree, getMerchantTreeNosessoin, getOnwer } from "@/services/options";
|
||||||
import { getUserDetail, getUserTypeTree, getServerpartTree, updataUser, modifyUserPassword, getMerchantShopTree, getWeiChatPush, handleGetServiceList, handleDeleteUSER, handleSynchroBEHAVIORRECORD } from "../service";
|
import { getUserDetail, getUserTypeTree, getServerpartTree, updataUser, modifyUserPassword, getMerchantShopTree, getWeiChatPush, handleGetServiceList, handleDeleteUSER, handleSynchroBEHAVIORRECORD, handleResetPassword } from "../service";
|
||||||
import { getRoleList, getSystemMenuTree, handleAnalysisPermission, handleSupplierList } from "../../Roles/service";
|
import { getRoleList, getSystemMenuTree, handleAnalysisPermission, handleSupplierList } from "../../Roles/service";
|
||||||
import BusinessManDrawer from "@/pages/basicManage/businessMan/components/businessManDrawer";
|
import BusinessManDrawer from "@/pages/basicManage/businessMan/components/businessManDrawer";
|
||||||
import session from "@/utils/session";
|
import session from "@/utils/session";
|
||||||
@ -36,9 +36,10 @@ const handleAddUpdate = async (item: UserModel, type: boolean) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 重置账号密码请求
|
// 重置账号密码请求
|
||||||
const handelResetPassWord = async (item: { UserId: number, Password: string }) => {
|
const handelResetPassWord = async (item: any) => {
|
||||||
const loading = message.loading("正在提交...")
|
const loading = message.loading("正在提交...")
|
||||||
const result = await modifyUserPassword(item)
|
// const result = await modifyUserPassword(item)
|
||||||
|
const result = await handleResetPassword(item)
|
||||||
loading()
|
loading()
|
||||||
if (result.Result_Code !== 100) {
|
if (result.Result_Code !== 100) {
|
||||||
message.error(`${result.Result_Desc}` || `${result.Result_Code}:账户密码重置失败`)
|
message.error(`${result.Result_Desc}` || `${result.Result_Code}:账户密码重置失败`)
|
||||||
@ -293,6 +294,12 @@ const Edit = ({ tableTab, openType, detail, reloadTable, currentUser, selectTab,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 判断账号的正则
|
||||||
|
// 1表示全数字 0 表示 默认
|
||||||
|
const handleUserCode = (str: string) => {
|
||||||
|
return /^[0-9]+$/.test(str) ? 1 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -529,7 +536,27 @@ const Edit = ({ tableTab, openType, detail, reloadTable, currentUser, selectTab,
|
|||||||
|
|
||||||
{detail?.USER_ID &&
|
{detail?.USER_ID &&
|
||||||
<Button type="primary" danger onClick={() => {
|
<Button type="primary" danger onClick={() => {
|
||||||
handelResetPassWord({ UserId: initialDetail.USER_ID, Password: initialDetail.USER_PASSPORT })
|
// handelResetPassWord({ UserId: initialDetail.USER_ID, Password: initialDetail.USER_PASSPORT })
|
||||||
|
// 重置密码的入参
|
||||||
|
|
||||||
|
let useType: number = handleUserCode(initialDetail?.USER_PASSWORD)
|
||||||
|
|
||||||
|
console.log('user', useType);
|
||||||
|
|
||||||
|
console.log('initialDetail', initialDetail);
|
||||||
|
const req: any = {
|
||||||
|
DataType: 1000,// 数据类型 1000【用户修改密码】 2000【用户找回密码】
|
||||||
|
User_Id_Encrypted: initialDetail?.USER_ID_Encrypted, // 账户内码(加密)
|
||||||
|
OriginPassword: initialDetail?.USER_PASSWORD,// 原账户密码
|
||||||
|
UserMobilephone: initialDetail?.USER_MOBILEPHONE, // 手机号码
|
||||||
|
IdentityCode: "",// 手机号码
|
||||||
|
NewPassword: useType === 1 ? `${initialDetail?.USER_PASSPORT}!@#` : useType === 0 ? `${initialDetail?.USER_PASSPORT}123!@#` : ''// 新账户密码
|
||||||
|
// 1 要加!@#
|
||||||
|
// 0 要加123!@#
|
||||||
|
}
|
||||||
|
console.log('reqreq', req);
|
||||||
|
|
||||||
|
handelResetPassWord(req)
|
||||||
}}>重置账号密码</Button>
|
}}>重置账号密码</Button>
|
||||||
}
|
}
|
||||||
{dom[0]}
|
{dom[0]}
|
||||||
|
|||||||
@ -333,6 +333,7 @@ const UserList: React.FC<{ currentUser: CurrentUser | undefined }> = (props) =>
|
|||||||
setOpenType('')
|
setOpenType('')
|
||||||
}}
|
}}
|
||||||
closable={false}
|
closable={false}
|
||||||
|
className={"userInfoDrawer"}
|
||||||
bodyStyle={createModalVisible ? { backgroundColor: "#f9f9f9", padding: 0 } : {}}
|
bodyStyle={createModalVisible ? { backgroundColor: "#f9f9f9", padding: 0 } : {}}
|
||||||
>
|
>
|
||||||
{/* 编辑或新增账号 */}
|
{/* 编辑或新增账号 */}
|
||||||
|
|||||||
@ -13,6 +13,23 @@ import { tableList, wrapTreeNode } from '@/utils/format';
|
|||||||
import type { UserModel } from './data';
|
import type { UserModel } from './data';
|
||||||
// import type { ModuleItem } from './data';
|
// import type { ModuleItem } from './data';
|
||||||
|
|
||||||
|
|
||||||
|
// 新的-获取列表数据
|
||||||
|
export async function handleGetNewUserList(params?: any) {
|
||||||
|
const data = await request('/Platform/GetUserList', {
|
||||||
|
method: 'POST',
|
||||||
|
data: params,
|
||||||
|
})
|
||||||
|
|
||||||
|
if (data.Result_Code !== 100) {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
|
||||||
|
return data.Result_Data.List
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 获取列表数据
|
// 获取列表数据
|
||||||
export async function getUserList(params?: any) {
|
export async function getUserList(params?: any) {
|
||||||
const data = await request('/Platform/GetUserList', {
|
const data = await request('/Platform/GetUserList', {
|
||||||
@ -110,6 +127,20 @@ export async function modifyUserPassword(data: { UserId: number, Password: strin
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 不知道原先的重置密码 为啥要这么写 感觉不对 重新写一个
|
||||||
|
export async function handleResetPassword(params: any) {
|
||||||
|
const data = await request('/FrameWork/ModifyUserPassword', {
|
||||||
|
method: 'POST',
|
||||||
|
data: params,
|
||||||
|
})
|
||||||
|
|
||||||
|
if (data.Result_Code !== 100) {
|
||||||
|
return data
|
||||||
|
}
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
// 获取商户账号服务区门店模块权限
|
// 获取商户账号服务区门店模块权限
|
||||||
export async function getMerchantShopTree(params: { BusinessManId?: any, provinceCode?: number }) {
|
export async function getMerchantShopTree(params: { BusinessManId?: any, provinceCode?: number }) {
|
||||||
const data = await request(`/FrameWork/GetMerchantShopTree`, {
|
const data = await request(`/FrameWork/GetMerchantShopTree`, {
|
||||||
|
|||||||
@ -13,9 +13,10 @@ import ProTable from "@ant-design/pro-table";
|
|||||||
import LeftSelectTree from "@/pages/reports/settlementAccount/component/leftSelectTree";
|
import LeftSelectTree from "@/pages/reports/settlementAccount/component/leftSelectTree";
|
||||||
import PageTitleBox from "@/components/PageTitleBox";
|
import PageTitleBox from "@/components/PageTitleBox";
|
||||||
import Draggable from "react-draggable";
|
import Draggable from "react-draggable";
|
||||||
import { getUserList, getUserTypeTree } from "../Users/service";
|
import { getUserList, getUserTypeTree, handleGetNewUserList } from "../Users/service";
|
||||||
import { handleGetSERVERPARTList, handleModifyUserCityAuthority } from "./service";
|
import { handleGetSERVERPARTList, handleModifyUserCityAuthority } from "./service";
|
||||||
import ProForm, { ProFormCheckbox } from "@ant-design/pro-form";
|
import ProForm, { ProFormCheckbox } from "@ant-design/pro-form";
|
||||||
|
import './style.less'
|
||||||
|
|
||||||
|
|
||||||
const BatchAuthorization: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
const BatchAuthorization: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||||
@ -97,7 +98,7 @@ const BatchAuthorization: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
if (item.children && item.children.length === 1) {
|
if (item.children && item.children.length === 1) {
|
||||||
list.push(item.children[0])
|
list.push(item.children[0])
|
||||||
} else {
|
} else {
|
||||||
if (item.value !== 89 &&item.value !== 424 && item.value !== 586) {
|
if (item.value !== 89 && item.value !== 424 && item.value !== 586) {
|
||||||
list.push(item)
|
list.push(item)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -176,8 +177,8 @@ const BatchAuthorization: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
setPrintOut(el);
|
setPrintOut(el);
|
||||||
}} >
|
}} >
|
||||||
<div style={{ backgroundColor: '#fff', display: 'flex' }}>
|
<div style={{ backgroundColor: '#fff', display: 'flex' }}>
|
||||||
{/* <LeftSelectTree setSelectedId={setSelectedId} setCollapsible={setCollapsible} collapsible={collapsible} /> */}
|
<LeftSelectTree setSelectedId={setSelectedId} setCollapsible={setCollapsible} collapsible={collapsible} />
|
||||||
<ProCard
|
{/* <ProCard
|
||||||
style={{ width: !collapsible ? "300px" : "60px" }}
|
style={{ width: !collapsible ? "300px" : "60px" }}
|
||||||
className="pageTable-leftnav"
|
className="pageTable-leftnav"
|
||||||
bodyStyle={{ padding: 0, paddingTop: 20, paddingLeft: 20 }}
|
bodyStyle={{ padding: 0, paddingTop: 20, paddingLeft: 20 }}
|
||||||
@ -206,7 +207,7 @@ const BatchAuthorization: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
setSelectedId(selectedIds.map(n => n?.value)?.toString() || '')
|
setSelectedId(selectedIds.map(n => n?.value)?.toString() || '')
|
||||||
}}
|
}}
|
||||||
/> : ''}
|
/> : ''}
|
||||||
</ProCard>
|
</ProCard> */}
|
||||||
<div style={{
|
<div style={{
|
||||||
width: !collapsible ? 'calc(100% - 300px)' : 'calc(100% - 60px)',
|
width: !collapsible ? 'calc(100% - 300px)' : 'calc(100% - 60px)',
|
||||||
paddingTop: 0,
|
paddingTop: 0,
|
||||||
@ -222,7 +223,7 @@ const BatchAuthorization: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
expandable={{
|
expandable={{
|
||||||
expandRowByClick: true
|
expandRowByClick: true
|
||||||
}}
|
}}
|
||||||
scroll={{ x: "100%", y: "calc(100vh - 430px)" }}
|
scroll={{ x: "100%", y: "calc(100vh - 480px)" }}
|
||||||
headerTitle={<PageTitleBox props={props} />} // 列表表头
|
headerTitle={<PageTitleBox props={props} />} // 列表表头
|
||||||
search={{ span: 6 }}
|
search={{ span: 6 }}
|
||||||
request={async (params) => {
|
request={async (params) => {
|
||||||
@ -286,8 +287,9 @@ const BatchAuthorization: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
title={<div className="batchAuthorization">批量授权</div>}
|
title={<div className="batchAuthorization">批量授权</div>}
|
||||||
destroyOnClose={true}
|
destroyOnClose={true}
|
||||||
width={1400}
|
width={1400}
|
||||||
|
className="batchAuthorizationModal"
|
||||||
bodyStyle={{
|
bodyStyle={{
|
||||||
height: '700px', // 你可以根据需要调整高度
|
height: '700px', // 你可以根据需要调整高度
|
||||||
overflowY: 'auto',
|
overflowY: 'auto',
|
||||||
}}
|
}}
|
||||||
open={showModal}
|
open={showModal}
|
||||||
@ -397,22 +399,40 @@ const BatchAuthorization: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
const value = sorter[n]
|
const value = sorter[n]
|
||||||
return value ? `${n} ${value.replace('end', '')}` : ''
|
return value ? `${n} ${value.replace('end', '')}` : ''
|
||||||
})
|
})
|
||||||
const data = await getUserList({
|
|
||||||
...params,
|
const req: any = {
|
||||||
USER_STATUS: 1,
|
SearchParameter: {
|
||||||
USER_PATTERN: tableTab,
|
USER_STATUS: 1,
|
||||||
UserTypeIds: userTypeId && userTypeId[tableTab] ? userTypeId[tableTab].toString() : '',
|
USER_PATTERN: tableTab,
|
||||||
|
UserTypeIds: userTypeId && userTypeId[tableTab] ? userTypeId[tableTab].toString() : '',
|
||||||
|
},
|
||||||
SortStr: sortstr ? sortstr.toString() : 'USER_INDEX',
|
SortStr: sortstr ? sortstr.toString() : 'USER_INDEX',
|
||||||
keyWord: { key: "USER_PASSPORT,USER_NAME,USER_MOBILEPHONE,PROVINCE_UNIT,BUSINESSMAN_NAME", value: params.searchValue }, // 关键词查询
|
keyWord: { key: "USER_PASSPORT,USER_NAME,USER_MOBILEPHONE,PROVINCE_UNIT,BUSINESSMAN_NAME", value: params.searchValue },
|
||||||
})
|
pageindex: 1,
|
||||||
return data
|
pagesize: 999999
|
||||||
|
}
|
||||||
|
const data = await handleGetNewUserList(req)
|
||||||
|
|
||||||
|
console.log('datadatadata', data);
|
||||||
|
return { data: data, success: true }
|
||||||
|
|
||||||
|
// const data = await getUserList({
|
||||||
|
// ...params,
|
||||||
|
// USER_STATUS: 1,
|
||||||
|
// USER_PATTERN: tableTab,
|
||||||
|
// UserTypeIds: userTypeId && userTypeId[tableTab] ? userTypeId[tableTab].toString() : '',
|
||||||
|
// SortStr: sortstr ? sortstr.toString() : 'USER_INDEX',
|
||||||
|
// keyWord: { key: "USER_PASSPORT,USER_NAME,USER_MOBILEPHONE,PROVINCE_UNIT,BUSINESSMAN_NAME", value: params.searchValue }, // 关键词查询
|
||||||
|
// })
|
||||||
|
// return data
|
||||||
}}
|
}}
|
||||||
|
scroll={{ y: 390 }}
|
||||||
onReset={() => {
|
onReset={() => {
|
||||||
actionRef.current?.reload()
|
actionRef.current?.reload()
|
||||||
}}
|
}}
|
||||||
params={{ USER_PATTERN: tableTab }}
|
params={{ USER_PATTERN: tableTab }}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
pagination={{ defaultPageSize: 10 }}
|
// pagination={{ defaultPageSize: 10 }}
|
||||||
rowSelection={{
|
rowSelection={{
|
||||||
onChange: (selectedRowKeys, selectedRows) => {
|
onChange: (selectedRowKeys, selectedRows) => {
|
||||||
setSelectedRowKeysList(selectedRowKeys)
|
setSelectedRowKeysList(selectedRowKeys)
|
||||||
|
|||||||
7
src/pages/Setting/batchAuthorization/style.less
Normal file
7
src/pages/Setting/batchAuthorization/style.less
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
.batchAuthorizationModal {
|
||||||
|
.pageTable-leftnav {
|
||||||
|
.ant-tree-list-holder {
|
||||||
|
height: 580px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -106,6 +106,8 @@ const ContractTable: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
const compactType = session.get("COMPACT_CHARACTERObj")
|
const compactType = session.get("COMPACT_CHARACTERObj")
|
||||||
// 合同类型子项
|
// 合同类型子项
|
||||||
const COMPACT_DETAILS = session.get("COMPACT_DETAILSObj")
|
const COMPACT_DETAILS = session.get("COMPACT_DETAILSObj")
|
||||||
|
// 合同主体的筛选
|
||||||
|
const serverpartObj = session.get('serverpartObj')
|
||||||
// 右上角选择的类型
|
// 右上角选择的类型
|
||||||
const [BIGCOMPACT_DETAILS, SETBIGCOMPACT_DETAILS] = useState<any>()
|
const [BIGCOMPACT_DETAILS, SETBIGCOMPACT_DETAILS] = useState<any>()
|
||||||
// 退场时间
|
// 退场时间
|
||||||
@ -311,6 +313,19 @@ const ContractTable: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
valueEnum: COMPACT_DETAILS,
|
valueEnum: COMPACT_DETAILS,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '合同主体',
|
||||||
|
dataIndex: 'SERVERPART_IDS',
|
||||||
|
valueType: 'select',
|
||||||
|
align: 'center',
|
||||||
|
width: 130,
|
||||||
|
valueEnum: serverpartObj,
|
||||||
|
ellipsis: true,
|
||||||
|
fieldProps: {
|
||||||
|
showSearch: true,
|
||||||
|
filterOption: (input: any, option: any) => (option?.label ?? '').toLowerCase().includes(input.toLowerCase()),
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '开始日期',
|
title: '开始日期',
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
|
|||||||
@ -280,8 +280,6 @@ const monthSearch: React.FC<{ currentUser?: CurrentUser }> = (props) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const columns: any = [
|
const columns: any = [
|
||||||
{
|
{
|
||||||
title: '结算状态',
|
title: '结算状态',
|
||||||
@ -305,7 +303,6 @@ const monthSearch: React.FC<{ currentUser?: CurrentUser }> = (props) => {
|
|||||||
}} onClick={() => {
|
}} onClick={() => {
|
||||||
setCurrentState(record?.BusinessProcess_State)
|
setCurrentState(record?.BusinessProcess_State)
|
||||||
setCurrentType(record?.Operation_Type)
|
setCurrentType(record?.Operation_Type)
|
||||||
console.log('record', record);
|
|
||||||
const nowState: any = record?.BusinessProcess_State ? record?.BusinessProcess_State === 1000 ? record?.BusinessApproval_ID ? 1 : 0 : record?.BusinessProcess_State === 9000 ? 9 : 1 : ''
|
const nowState: any = record?.BusinessProcess_State ? record?.BusinessProcess_State === 1000 ? record?.BusinessApproval_ID ? 1 : 0 : record?.BusinessProcess_State === 9000 ? 9 : 1 : ''
|
||||||
setCurrentApprovalstate(nowState)
|
setCurrentApprovalstate(nowState)
|
||||||
if (record?.Operation_Type === '12') {
|
if (record?.Operation_Type === '12') {
|
||||||
@ -333,6 +330,15 @@ const monthSearch: React.FC<{ currentUser?: CurrentUser }> = (props) => {
|
|||||||
BUSINESSAPPROVAL_ID: record?.BusinessApproval_ID
|
BUSINESSAPPROVAL_ID: record?.BusinessApproval_ID
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
console.log('项目拆分审批流程查询行数据', {
|
||||||
|
...record,
|
||||||
|
SETTLEMENT_STATE: record?.BusinessProcess_State === 9000 ? 1 : 2,
|
||||||
|
PEND_STATE: record?.PendState,
|
||||||
|
APPLY_PROCCESS: record?.BusinessProcess_State === 1000,
|
||||||
|
BUSINESSAPPROVAL_ID: record?.BusinessApproval_ID,
|
||||||
|
SERVERPARTSHOP_ID: record?.ServerpartShop_ID
|
||||||
|
});
|
||||||
|
|
||||||
setCurrentRow({
|
setCurrentRow({
|
||||||
...record,
|
...record,
|
||||||
SETTLEMENT_STATE: record?.BusinessProcess_State === 9000 ? 1 : 2,
|
SETTLEMENT_STATE: record?.BusinessProcess_State === 9000 ? 1 : 2,
|
||||||
@ -591,7 +597,6 @@ const monthSearch: React.FC<{ currentUser?: CurrentUser }> = (props) => {
|
|||||||
const stateSelectList: any = ["2", "0", "1", "2", "3000"]
|
const stateSelectList: any = ["2", "0", "1", "2", "3000"]
|
||||||
const processState: any = ['', "1000", "2000", "9000", "3000"]
|
const processState: any = ['', "1000", "2000", "9000", "3000"]
|
||||||
|
|
||||||
|
|
||||||
const defaultColumns: any = [
|
const defaultColumns: any = [
|
||||||
{
|
{
|
||||||
title: '类型',
|
title: '类型',
|
||||||
@ -1167,8 +1172,6 @@ const monthSearch: React.FC<{ currentUser?: CurrentUser }> = (props) => {
|
|||||||
tempTable.remove() // 防止重复打印一个内容
|
tempTable.remove() // 防止重复打印一个内容
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
|
||||||
@ -1216,7 +1219,6 @@ const monthSearch: React.FC<{ currentUser?: CurrentUser }> = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
<div id='hiddenBox' style={{ position: 'fixed', zIndex: -1, top: 0, left: 0 }} />
|
<div id='hiddenBox' style={{ position: 'fixed', zIndex: -1, top: 0, left: 0 }} />
|
||||||
|
|
||||||
|
|
||||||
<ProTable
|
<ProTable
|
||||||
actionRef={actionRef}
|
actionRef={actionRef}
|
||||||
formRef={formRef}
|
formRef={formRef}
|
||||||
@ -1232,17 +1234,11 @@ const monthSearch: React.FC<{ currentUser?: CurrentUser }> = (props) => {
|
|||||||
headerTitle={<PageTitleBox props={props} />}
|
headerTitle={<PageTitleBox props={props} />}
|
||||||
search={{ span: 6 }}
|
search={{ span: 6 }}
|
||||||
request={async (params) => {
|
request={async (params) => {
|
||||||
// if (isFirst) {
|
|
||||||
// setIsFirst(false)
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
console.log('params', params);
|
|
||||||
|
|
||||||
setSearchParams(params)
|
setSearchParams(params)
|
||||||
const req: any = {
|
const req: any = {
|
||||||
SearchParameter: {
|
SearchParameter: {
|
||||||
// stateSelectList ["2", "0", "1", "2", "3000"]
|
// stateSelectList ["2", "0", "1", "2", "3000"]
|
||||||
|
|
||||||
PendState: stateSelectList[Number(params?.PendState)] === '3000' ? 1 : stateSelectList[Number(params?.PendState)],
|
PendState: stateSelectList[Number(params?.PendState)] === '3000' ? 1 : stateSelectList[Number(params?.PendState)],
|
||||||
BusinessProcess_State: params?.PendState === '1' || params?.PendState === '2' ? '' : processState[Number(params?.PendState)],
|
BusinessProcess_State: params?.PendState === '1' || params?.PendState === '2' ? '' : processState[Number(params?.PendState)],
|
||||||
// BusinessProcess_State: stateSelectList[Number(params?.PendState)] === '3000' || stateSelectList[Number(params?.PendState)] === '9000' ? stateSelectList[Number(params?.PendState)] : '',
|
// BusinessProcess_State: stateSelectList[Number(params?.PendState)] === '3000' || stateSelectList[Number(params?.PendState)] === '9000' ? stateSelectList[Number(params?.PendState)] : '',
|
||||||
@ -1303,7 +1299,6 @@ const monthSearch: React.FC<{ currentUser?: CurrentUser }> = (props) => {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
<Modal
|
<Modal
|
||||||
title={
|
title={
|
||||||
<div
|
<div
|
||||||
|
|||||||
@ -2930,6 +2930,7 @@ const YearExamineDetailTable = ({ parentRow, currentApprovalstate, onRef, setIsS
|
|||||||
StartDate={moment(currentDetailRow?.StartDate).format('YYYY-MM-DD')}
|
StartDate={moment(currentDetailRow?.StartDate).format('YYYY-MM-DD')}
|
||||||
EndDate={moment(currentDetailRow?.EndDate).format('YYYY-MM-DD')} type={'monthSettlement'}></RevenueList>}
|
EndDate={moment(currentDetailRow?.EndDate).format('YYYY-MM-DD')} type={'monthSettlement'}></RevenueList>}
|
||||||
</Drawer>
|
</Drawer>
|
||||||
|
|
||||||
{/* 上传附件的悬浮框 */}
|
{/* 上传附件的悬浮框 */}
|
||||||
{
|
{
|
||||||
showImgList && showImgList.length > 0 && <div style={{ display: 'none' }}>
|
showImgList && showImgList.length > 0 && <div style={{ display: 'none' }}>
|
||||||
@ -2953,6 +2954,7 @@ const YearExamineDetailTable = ({ parentRow, currentApprovalstate, onRef, setIsS
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
<Modal
|
<Modal
|
||||||
width={500}
|
width={500}
|
||||||
open={showUpLoadFile}
|
open={showUpLoadFile}
|
||||||
|
|||||||
@ -94,9 +94,11 @@ const settlementAccount: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
<span style={{ marginLeft: '4px', color: 'red' }}>【撤场项目】</span>
|
<span style={{ marginLeft: '4px', color: 'red' }}>【撤场项目】</span>
|
||||||
</Tooltip> : ''
|
</Tooltip> : ''
|
||||||
}
|
}
|
||||||
{record?.BUSINESSPROJECT_NAME.slice(0, indexStr)}
|
<Tooltip title={record?.BUSINESSPROJECT_NAME}>
|
||||||
<span style={{ color: '#ffc352' }}>{searchContent}</span>
|
{record?.BUSINESSPROJECT_NAME.slice(0, indexStr)}
|
||||||
{record?.BUSINESSPROJECT_NAME.slice(indexStr + (searchContent?.length || 0))}
|
<span style={{ color: '#ffc352' }}>{searchContent}</span>
|
||||||
|
{record?.BUSINESSPROJECT_NAME.slice(indexStr + (searchContent?.length || 0))}
|
||||||
|
</Tooltip>
|
||||||
{record?.noShop ? <Tooltip title="缺少门店">
|
{record?.noShop ? <Tooltip title="缺少门店">
|
||||||
<span style={{ fontWeight: 'bold', marginLeft: '4px', color: 'red' }}>?</span>
|
<span style={{ fontWeight: 'bold', marginLeft: '4px', color: 'red' }}>?</span>
|
||||||
</Tooltip> : ''}
|
</Tooltip> : ''}
|
||||||
@ -114,7 +116,10 @@ const settlementAccount: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
|||||||
<span style={{ marginLeft: '4px', color: 'red' }}>【撤场项目】</span>
|
<span style={{ marginLeft: '4px', color: 'red' }}>【撤场项目】</span>
|
||||||
</Tooltip> : ''
|
</Tooltip> : ''
|
||||||
}
|
}
|
||||||
{record?.BUSINESSPROJECT_NAME}
|
|
||||||
|
<Tooltip title={record?.BUSINESSPROJECT_NAME}>
|
||||||
|
{record?.BUSINESSPROJECT_NAME}
|
||||||
|
</Tooltip>
|
||||||
{record?.noShop ? <Tooltip title="缺少门店">
|
{record?.noShop ? <Tooltip title="缺少门店">
|
||||||
<span style={{ fontWeight: 'bold', marginLeft: '4px', color: 'red' }}>?</span>
|
<span style={{ fontWeight: 'bold', marginLeft: '4px', color: 'red' }}>?</span>
|
||||||
</Tooltip> : ''}
|
</Tooltip> : ''}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user