update
This commit is contained in:
parent
c426f612e5
commit
877d0d339f
@ -6,17 +6,22 @@
|
||||
* @Description: 合作方分润 组件
|
||||
* @FilePath: \cloud-platform\src\pages\BussinessProject\components\ShareBenefit.tsx
|
||||
*/
|
||||
// 合作分润
|
||||
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 type { ActionType, ProColumns } from '@ant-design/pro-table';
|
||||
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 moment from 'moment';
|
||||
import { fmoney } from "@/services/options";
|
||||
import { getDetail } from "@/pages/contract/service";
|
||||
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) => {
|
||||
@ -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 }) => {
|
||||
// const { SERVERPARTSHOP_ID, SERVERPARTSHOP_NAME } = props
|
||||
const actionRef = useRef<ActionType>() // 表格对应的对象
|
||||
// 线下结算的表单内容
|
||||
const offlineSettlementFormRef = useRef<any>()
|
||||
const [showDetail, setShowDetail] = useState<boolean>(false) // 是否显示详情
|
||||
const [currentRow, setCurrentRow] = useState<BusinessProjectModel | any>(undefined) // 选中的当前行
|
||||
const [tableLoading, setTableLoading] = useState<boolean>(false)
|
||||
// 关联合同需要遍历的表格
|
||||
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 = [
|
||||
{
|
||||
title: '开始日期',
|
||||
@ -169,11 +187,21 @@ const ShareBenefit: React.FC<{ props: BusinessProjectModel, showEdit?: boolean,
|
||||
{
|
||||
title: '操作',
|
||||
valueType: 'option',
|
||||
width: 80,
|
||||
width: 200,
|
||||
hideInTable: showType === 'Nooperate' ? true : !(showEdit === undefined || showEdit),
|
||||
render: (_, record) => (
|
||||
render: (_, record) => {
|
||||
return <div>
|
||||
<a style={{ marginRight: "8px" }} onClick={() => {
|
||||
setCurrentRow(record)
|
||||
setOfflineSettlementModal(true)
|
||||
}}>
|
||||
{record?.EXPENSE_TYPE === 1000 ? '查看结算凭证' : '线下结算'}
|
||||
</a >
|
||||
|
||||
{
|
||||
new Date(record?.STARTDATE).getTime() < new Date().getTime() && record.showAgainBtn ?
|
||||
<Space>
|
||||
|
||||
<a
|
||||
key="revenue"
|
||||
onClick={async () => {
|
||||
@ -214,13 +242,41 @@ const ShareBenefit: React.FC<{ props: BusinessProjectModel, showEdit?: boolean,
|
||||
重新生成
|
||||
</a>
|
||||
</Space> : ''
|
||||
),
|
||||
}
|
||||
</div >
|
||||
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
const relateRevenuenColumns: any = [
|
||||
...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) => {
|
||||
@ -345,6 +401,23 @@ const ShareBenefit: React.FC<{ props: BusinessProjectModel, showEdit?: boolean,
|
||||
}
|
||||
</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
|
||||
@ -353,6 +426,7 @@ const ShareBenefit: React.FC<{ props: BusinessProjectModel, showEdit?: boolean,
|
||||
visible={showDetail} // 抽屉弹框是否显示状态
|
||||
onClose={() => { // 关闭抽屉 设置抽屉状态为关闭
|
||||
setShowDetail(false);
|
||||
setCurrentRow(undefined)
|
||||
}}
|
||||
bodyStyle={{ backgroundColor: "#f9f9f9", padding: 0 }}
|
||||
closable={false}
|
||||
@ -364,6 +438,201 @@ const ShareBenefit: React.FC<{ props: BusinessProjectModel, showEdit?: boolean,
|
||||
StartDate={moment(currentRow?.STARTDATE).format('YYYY-MM-DD')}
|
||||
EndDate={moment(currentRow?.ENDDATE).format('YYYY-MM-DD')} onShow={showDetail}></RevenueList>}
|
||||
</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: 经营项目列表页面
|
||||
* @FilePath: \cloud-platform\src\pages\BussinessProject\list.tsx
|
||||
*/
|
||||
|
||||
// 经营项目管理
|
||||
import React from "react";
|
||||
import Draggable from "react-draggable";
|
||||
import SubMenu from "antd/lib/menu/SubMenu";
|
||||
|
||||
@ -333,3 +333,20 @@ export async function handleGetSplitRes(params?: any) {
|
||||
|
||||
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 { 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 BusinessManDrawer from "@/pages/basicManage/businessMan/components/businessManDrawer";
|
||||
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 result = await modifyUserPassword(item)
|
||||
// const result = await modifyUserPassword(item)
|
||||
const result = await handleResetPassword(item)
|
||||
loading()
|
||||
if (result.Result_Code !== 100) {
|
||||
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 (
|
||||
@ -529,7 +536,27 @@ const Edit = ({ tableTab, openType, detail, reloadTable, currentUser, selectTab,
|
||||
|
||||
{detail?.USER_ID &&
|
||||
<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>
|
||||
}
|
||||
{dom[0]}
|
||||
|
||||
@ -333,6 +333,7 @@ const UserList: React.FC<{ currentUser: CurrentUser | undefined }> = (props) =>
|
||||
setOpenType('')
|
||||
}}
|
||||
closable={false}
|
||||
className={"userInfoDrawer"}
|
||||
bodyStyle={createModalVisible ? { backgroundColor: "#f9f9f9", padding: 0 } : {}}
|
||||
>
|
||||
{/* 编辑或新增账号 */}
|
||||
|
||||
@ -13,6 +13,23 @@ import { tableList, wrapTreeNode } from '@/utils/format';
|
||||
import type { UserModel } 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) {
|
||||
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 }) {
|
||||
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 PageTitleBox from "@/components/PageTitleBox";
|
||||
import Draggable from "react-draggable";
|
||||
import { getUserList, getUserTypeTree } from "../Users/service";
|
||||
import { getUserList, getUserTypeTree, handleGetNewUserList } from "../Users/service";
|
||||
import { handleGetSERVERPARTList, handleModifyUserCityAuthority } from "./service";
|
||||
import ProForm, { ProFormCheckbox } from "@ant-design/pro-form";
|
||||
import './style.less'
|
||||
|
||||
|
||||
const BatchAuthorization: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
@ -176,8 +177,8 @@ const BatchAuthorization: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
setPrintOut(el);
|
||||
}} >
|
||||
<div style={{ backgroundColor: '#fff', display: 'flex' }}>
|
||||
{/* <LeftSelectTree setSelectedId={setSelectedId} setCollapsible={setCollapsible} collapsible={collapsible} /> */}
|
||||
<ProCard
|
||||
<LeftSelectTree setSelectedId={setSelectedId} setCollapsible={setCollapsible} collapsible={collapsible} />
|
||||
{/* <ProCard
|
||||
style={{ width: !collapsible ? "300px" : "60px" }}
|
||||
className="pageTable-leftnav"
|
||||
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() || '')
|
||||
}}
|
||||
/> : ''}
|
||||
</ProCard>
|
||||
</ProCard> */}
|
||||
<div style={{
|
||||
width: !collapsible ? 'calc(100% - 300px)' : 'calc(100% - 60px)',
|
||||
paddingTop: 0,
|
||||
@ -222,7 +223,7 @@ const BatchAuthorization: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
expandable={{
|
||||
expandRowByClick: true
|
||||
}}
|
||||
scroll={{ x: "100%", y: "calc(100vh - 430px)" }}
|
||||
scroll={{ x: "100%", y: "calc(100vh - 480px)" }}
|
||||
headerTitle={<PageTitleBox props={props} />} // 列表表头
|
||||
search={{ span: 6 }}
|
||||
request={async (params) => {
|
||||
@ -286,6 +287,7 @@ const BatchAuthorization: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
title={<div className="batchAuthorization">批量授权</div>}
|
||||
destroyOnClose={true}
|
||||
width={1400}
|
||||
className="batchAuthorizationModal"
|
||||
bodyStyle={{
|
||||
height: '700px', // 你可以根据需要调整高度
|
||||
overflowY: 'auto',
|
||||
@ -397,22 +399,40 @@ const BatchAuthorization: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
const value = sorter[n]
|
||||
return value ? `${n} ${value.replace('end', '')}` : ''
|
||||
})
|
||||
const data = await getUserList({
|
||||
...params,
|
||||
|
||||
const req: any = {
|
||||
SearchParameter: {
|
||||
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
|
||||
keyWord: { key: "USER_PASSPORT,USER_NAME,USER_MOBILEPHONE,PROVINCE_UNIT,BUSINESSMAN_NAME", value: params.searchValue },
|
||||
pageindex: 1,
|
||||
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={() => {
|
||||
actionRef.current?.reload()
|
||||
}}
|
||||
params={{ USER_PATTERN: tableTab }}
|
||||
columns={columns}
|
||||
pagination={{ defaultPageSize: 10 }}
|
||||
// pagination={{ defaultPageSize: 10 }}
|
||||
rowSelection={{
|
||||
onChange: (selectedRowKeys, selectedRows) => {
|
||||
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 COMPACT_DETAILS = session.get("COMPACT_DETAILSObj")
|
||||
// 合同主体的筛选
|
||||
const serverpartObj = session.get('serverpartObj')
|
||||
// 右上角选择的类型
|
||||
const [BIGCOMPACT_DETAILS, SETBIGCOMPACT_DETAILS] = useState<any>()
|
||||
// 退场时间
|
||||
@ -311,6 +313,19 @@ const ContractTable: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
valueEnum: COMPACT_DETAILS,
|
||||
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: '开始日期',
|
||||
hideInSearch: true,
|
||||
|
||||
@ -280,8 +280,6 @@ const monthSearch: React.FC<{ currentUser?: CurrentUser }> = (props) => {
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
const columns: any = [
|
||||
{
|
||||
title: '结算状态',
|
||||
@ -305,7 +303,6 @@ const monthSearch: React.FC<{ currentUser?: CurrentUser }> = (props) => {
|
||||
}} onClick={() => {
|
||||
setCurrentState(record?.BusinessProcess_State)
|
||||
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 : ''
|
||||
setCurrentApprovalstate(nowState)
|
||||
if (record?.Operation_Type === '12') {
|
||||
@ -333,6 +330,15 @@ const monthSearch: React.FC<{ currentUser?: CurrentUser }> = (props) => {
|
||||
BUSINESSAPPROVAL_ID: record?.BusinessApproval_ID
|
||||
})
|
||||
} 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({
|
||||
...record,
|
||||
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 processState: any = ['', "1000", "2000", "9000", "3000"]
|
||||
|
||||
|
||||
const defaultColumns: any = [
|
||||
{
|
||||
title: '类型',
|
||||
@ -1167,8 +1172,6 @@ const monthSearch: React.FC<{ currentUser?: CurrentUser }> = (props) => {
|
||||
tempTable.remove() // 防止重复打印一个内容
|
||||
}
|
||||
|
||||
|
||||
|
||||
return (
|
||||
<div>
|
||||
|
||||
@ -1216,7 +1219,6 @@ const monthSearch: React.FC<{ currentUser?: CurrentUser }> = (props) => {
|
||||
</div>
|
||||
<div id='hiddenBox' style={{ position: 'fixed', zIndex: -1, top: 0, left: 0 }} />
|
||||
|
||||
|
||||
<ProTable
|
||||
actionRef={actionRef}
|
||||
formRef={formRef}
|
||||
@ -1232,17 +1234,11 @@ const monthSearch: React.FC<{ currentUser?: CurrentUser }> = (props) => {
|
||||
headerTitle={<PageTitleBox props={props} />}
|
||||
search={{ span: 6 }}
|
||||
request={async (params) => {
|
||||
// if (isFirst) {
|
||||
// setIsFirst(false)
|
||||
// return
|
||||
// }
|
||||
console.log('params', params);
|
||||
|
||||
setSearchParams(params)
|
||||
const req: any = {
|
||||
SearchParameter: {
|
||||
// stateSelectList ["2", "0", "1", "2", "3000"]
|
||||
|
||||
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: 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
|
||||
title={
|
||||
<div
|
||||
|
||||
@ -2930,6 +2930,7 @@ const YearExamineDetailTable = ({ parentRow, currentApprovalstate, onRef, setIsS
|
||||
StartDate={moment(currentDetailRow?.StartDate).format('YYYY-MM-DD')}
|
||||
EndDate={moment(currentDetailRow?.EndDate).format('YYYY-MM-DD')} type={'monthSettlement'}></RevenueList>}
|
||||
</Drawer>
|
||||
|
||||
{/* 上传附件的悬浮框 */}
|
||||
{
|
||||
showImgList && showImgList.length > 0 && <div style={{ display: 'none' }}>
|
||||
@ -2953,6 +2954,7 @@ const YearExamineDetailTable = ({ parentRow, currentApprovalstate, onRef, setIsS
|
||||
|
||||
</div>
|
||||
}
|
||||
|
||||
<Modal
|
||||
width={500}
|
||||
open={showUpLoadFile}
|
||||
|
||||
@ -94,9 +94,11 @@ const settlementAccount: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
<span style={{ marginLeft: '4px', color: 'red' }}>【撤场项目】</span>
|
||||
</Tooltip> : ''
|
||||
}
|
||||
<Tooltip title={record?.BUSINESSPROJECT_NAME}>
|
||||
{record?.BUSINESSPROJECT_NAME.slice(0, indexStr)}
|
||||
<span style={{ color: '#ffc352' }}>{searchContent}</span>
|
||||
{record?.BUSINESSPROJECT_NAME.slice(indexStr + (searchContent?.length || 0))}
|
||||
</Tooltip>
|
||||
{record?.noShop ? <Tooltip title="缺少门店">
|
||||
<span style={{ fontWeight: 'bold', marginLeft: '4px', color: 'red' }}>?</span>
|
||||
</Tooltip> : ''}
|
||||
@ -114,7 +116,10 @@ const settlementAccount: React.FC<{ currentUser: CurrentUser }> = (props) => {
|
||||
<span style={{ marginLeft: '4px', color: 'red' }}>【撤场项目】</span>
|
||||
</Tooltip> : ''
|
||||
}
|
||||
|
||||
<Tooltip title={record?.BUSINESSPROJECT_NAME}>
|
||||
{record?.BUSINESSPROJECT_NAME}
|
||||
</Tooltip>
|
||||
{record?.noShop ? <Tooltip title="缺少门店">
|
||||
<span style={{ fontWeight: 'bold', marginLeft: '4px', color: 'red' }}>?</span>
|
||||
</Tooltip> : ''}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user