提交 4f7fb4bb 作者: 龚洪江

功能:商城订单流程,确认订单,合同签署

上级 8da97540
import { InterFunction } from '~/api/interface'; import { InterFunction } from '~/api/interface';
//fdd-企业实名认证
export type companyVerifyUrlType = InterFunction<{ port: number }, string>;
// fdd-企业实名认证信息
export type userFddInfoType = InterFunction<
{ port: number },
{
id: number;
unionId: string;
customerId: string;
personVerifyStatus: number;
entVerifyStatus: number;
accountType: number;
createTime: string;
updateTime: string;
}
>;
// fdd-上传合同 // fdd-上传合同
export type uploadContractType = InterFunction< export type uploadContractType = InterFunction<
{ {
...@@ -55,3 +72,7 @@ export type signContractType = InterFunction< ...@@ -55,3 +72,7 @@ export type signContractType = InterFunction<
}, },
string string
>; >;
// fdd-合同预览
export type viewContractType = InterFunction<{ contractId: string }, string>;
// fdd-合同下载
export type downloadContractType = InterFunction<{ contractId: string }, string>;
...@@ -1122,6 +1122,23 @@ type mallOrderType = { ...@@ -1122,6 +1122,23 @@ type mallOrderType = {
* 抵扣钱包余额 * 抵扣钱包余额
*/ */
walletAmount?: number; walletAmount?: number;
userName: string;
contractInfoDTO?: {
id: number;
unionId: string;
orderNo: string;
contractNo: string;
contractTitle: string;
signStatus: number;
singerTime: null;
createTime: string;
updateTime: string;
archiveDate: string;
aremark: string;
bremark: string;
atransactionId: string;
btransactionId: string;
};
}; };
export type mallOrderListType = InterListFunction< export type mallOrderListType = InterListFunction<
{ {
......
...@@ -353,8 +353,3 @@ export type getUserAddressInfoType = InterFunction< ...@@ -353,8 +353,3 @@ export type getUserAddressInfoType = InterFunction<
id: number; id: number;
} }
>; >;
//fdd-企业实名认证
export type companyVerifyUrlType = InterFunction<{ port: number }, string>;
// fdd-企业实名认证信息
export type userFddInfoType = InterFunction<{ port: number }, any>;
import { signContractType, uploadContractType } from '~/api/interface/fddInterfaceType'; import {
companyVerifyUrlType,
downloadContractType,
signContractType,
uploadContractType,
userFddInfoType,
viewContractType,
} from '~/api/interface/fddInterfaceType';
import axios from '../request'; import axios from '../request';
export class FddInterfaceAPI { export class FddInterfaceAPI {
// fdd-企业实名认证
static getCompanyVerifyUrl: companyVerifyUrlType = (params) =>
axios.get('/userapp/fdd/auth/getCompanyVerifyUrl', { params });
// fdd-获取企业实名认证信息
static getAppUserFddInfo: userFddInfoType = (params) =>
axios.get('/userapp/fdd/auth/getAppUserFddInfo', { params });
// fdd-上传合同 // fdd-上传合同
static uploadContract: uploadContractType = (data) => static uploadContract: uploadContractType = (data) =>
axios.post('/userapp/fdd/contract/uploadContract', data); axios.post('/userapp/fdd/contract/uploadContract', data);
// fdd-签署合同 // fdd-签署合同
static signContract: signContractType = (params) => static signContract: signContractType = (params) =>
axios.get('/userapp/fdd/contract/stamp', { params }); axios.get('/userapp/fdd/contract/stamp', { params });
//fdd-合同预览
static viewContract: viewContractType = (params) =>
axios.get('/userapp/fdd/contract/viewContract', { params });
// fdd-合同下载
static downloadContract: downloadContractType = (params) =>
axios.get('/userapp/fdd/contract/downloadContract', { params });
} }
...@@ -2,7 +2,6 @@ import { ...@@ -2,7 +2,6 @@ import {
addressInsetType, addressInsetType,
addressListType, addressListType,
bindingCompanyMemberType, bindingCompanyMemberType,
companyVerifyUrlType,
deleteAddressType, deleteAddressType,
deleteRoleInfoType, deleteRoleInfoType,
editAddressType, editAddressType,
...@@ -27,7 +26,6 @@ import { ...@@ -27,7 +26,6 @@ import {
updatePasswordType, updatePasswordType,
updateRoleInfoType, updateRoleInfoType,
updateRoleMenuInfoType, updateRoleMenuInfoType,
userFddInfoType,
} from '../interface/systemManageType'; } from '../interface/systemManageType';
import axios from '../request'; import axios from '../request';
...@@ -125,10 +123,4 @@ export class SystemManageAPI { ...@@ -125,10 +123,4 @@ export class SystemManageAPI {
// 地址管理-根据地址id查找 // 地址管理-根据地址id查找
static getUserAddressInfo: getUserAddressInfoType = (params) => static getUserAddressInfo: getUserAddressInfoType = (params) =>
axios.get('/oms/user-address/getUserAddressInfo', { params }); axios.get('/oms/user-address/getUserAddressInfo', { params });
// fdd-企业实名认证
static getCompanyVerifyUrl: companyVerifyUrlType = (params) =>
axios.get('/userapp/fdd/auth/getCompanyVerifyUrl', { params });
// fdd-获取企业实名认证信息
static getAppUserFddInfo: userFddInfoType = (params) =>
axios.get('/userapp/fdd/auth/getAppUserFddInfo', { params });
} }
...@@ -136,6 +136,9 @@ $page-background: #f3f6ff; ...@@ -136,6 +136,9 @@ $page-background: #f3f6ff;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
.fdd-auth{
margin-right: 10px;
}
.current-project { .current-project {
display: flex; display: flex;
align-items: center; align-items: center;
......
import { useState } from 'react'; import { useEffect, useState } from 'react';
import { Header } from 'antd/es/layout/layout'; import { Header } from 'antd/es/layout/layout';
import { DownOutlined, UpOutlined } from '@ant-design/icons'; import { DownOutlined, UpOutlined } from '@ant-design/icons';
import { Button, Dropdown, Image, MenuProps, Modal } from 'antd'; import { Button, Dropdown, Image, MenuProps, Modal } from 'antd';
...@@ -8,6 +8,12 @@ import { REMOVE_MENU, REMOVE_MENU_ID, SET_COLLAPSE } from '~/store/module/menu'; ...@@ -8,6 +8,12 @@ import { REMOVE_MENU, REMOVE_MENU_ID, SET_COLLAPSE } from '~/store/module/menu';
import { useDispatch, useSelector } from 'react-redux'; import { useDispatch, useSelector } from 'react-redux';
import { useNavigate } from 'react-router-dom'; import { useNavigate } from 'react-router-dom';
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
import { FddInterfaceAPI } from '~/api';
import { InterDataType } from '~/api/interface';
import { userFddInfoType } from '~/api/interface/fddInterfaceType';
// fdd实名认证信息类型
type fddAuthType = InterDataType<userFddInfoType>;
export function TitleView() { export function TitleView() {
// 弹窗 // 弹窗
...@@ -18,6 +24,9 @@ export function TitleView() { ...@@ -18,6 +24,9 @@ export function TitleView() {
const navigate = useNavigate(); const navigate = useNavigate();
// 菜单栏是否收起 // 菜单栏是否收起
const [isActive, setIsActive] = useState(false); const [isActive, setIsActive] = useState(false);
// fdd实名认证信息
const [fddAuthInfo, setFddAuthInfo] = useState<fddAuthType>();
// 用户信息 // 用户信息
const { userInfo } = useSelector((state: any) => state.UserInfo); const { userInfo } = useSelector((state: any) => state.UserInfo);
// 菜单栏收起 // 菜单栏收起
...@@ -25,6 +34,13 @@ export function TitleView() { ...@@ -25,6 +34,13 @@ export function TitleView() {
setIsActive(!isActive); setIsActive(!isActive);
dispatch(SET_COLLAPSE(!isActive)); dispatch(SET_COLLAPSE(!isActive));
}; };
// 获取fdd实名认证信息
const getAppUserFddInfo = () => {
FddInterfaceAPI.getAppUserFddInfo({ port: 1 }).then(({ result }) => {
setFddAuthInfo(result);
});
};
// 右上角按钮 // 右上角按钮
const items: MenuProps['items'] = [ const items: MenuProps['items'] = [
{ {
...@@ -50,6 +66,10 @@ export function TitleView() { ...@@ -50,6 +66,10 @@ export function TitleView() {
), ),
}, },
]; ];
useEffect(() => {
getAppUserFddInfo();
}, []);
return ( return (
<Header <Header
style={{ style={{
...@@ -87,6 +107,12 @@ export function TitleView() { ...@@ -87,6 +107,12 @@ export function TitleView() {
<div className='user-company'>{userInfo?.companyInfoVO?.companyName}</div> <div className='user-company'>{userInfo?.companyInfoVO?.companyName}</div>
<div className='user-name'>{userInfo?.accountNo}</div> <div className='user-name'>{userInfo?.accountNo}</div>
</div> </div>
<div
className='fdd-auth'
style={{ color: fddAuthInfo?.entVerifyStatus === 4 ? '#1890ff' : 'red' }}
>
{fddAuthInfo?.entVerifyStatus === 4 ? '已认证' : '未认证'}
</div>
<Dropdown <Dropdown
overlayStyle={{ textAlign: 'center' }} overlayStyle={{ textAlign: 'center' }}
menu={{ items }} menu={{ items }}
......
.detail-rich-text{ .detail-rich-text{
image,video{ image,video{
max-width: 100%; //max-width: 100%;
} }
} }
import React from 'react'; import React from 'react';
import { Button, Image } from 'antd'; import { Button } from 'antd';
import { getMallOrderDetailById, mallOrderDetailType } from '~/api/interface/orderManageType'; import { mallOrderDetailType } from '~/api/interface/orderManageType';
import { InterDataType } from '~/api/interface'; import { InterDataType } from '~/api/interface';
import { contractStatusList } from '~/utils/dictionary';
import { FddInterfaceAPI } from '~/api';
import { decode } from 'js-base64';
import FileSaver from 'file-saver';
// 接口返回的类型 // 接口返回的类型
type DataType = InterDataType<mallOrderDetailType>; type DataType = InterDataType<mallOrderDetailType>;
...@@ -11,26 +15,61 @@ type PropsType = { ...@@ -11,26 +15,61 @@ type PropsType = {
}; };
const DetailPurchaser: React.FC<PropsType> = ({ detail }) => { const DetailPurchaser: React.FC<PropsType> = ({ detail }) => {
return ( // 合同预览
<div className={'detail-purchaser detail-half'}> const contractPreview = () => {
<div className={'detail-title'}>买家信息</div> if (detail?.contractInfoDTO?.contractNo) {
<div className={'detail-text'}>UID:</div> FddInterfaceAPI.viewContract({ contractId: detail?.contractInfoDTO?.contractNo }).then(
<div className={'detail-text'}>姓名: </div> ({ result }) => {
<div className={'detail-text'}>手机号: </div> window.open(decode(result), '_blank');
<div className={'detail-text'}>备注:</div> },
);
{/*<div style={{ display: 'none' }}>*/} }
{/* <div className={'detail-title'}>合同信息</div>*/} };
{/* <div className={'detail-text'}>合同编号: UAV202334741131</div>*/} // 合同下载
{/* <div className={'detail-text'}>合同状态: 已归档</div>*/} const downloadContract = () => {
{/* <div className={'detail-text'}>*/} if (detail?.contractInfoDTO?.contractNo) {
{/* 合同操作:*/} FddInterfaceAPI.downloadContract({ contractId: detail?.contractInfoDTO?.contractNo }).then(
{/* <Button type={'link'}>平台签署</Button>*/} ({ result }) => {
{/* <Button type={'link'}>查看</Button>*/} FileSaver.saveAs(decode(result), `${detail?.contractInfoDTO?.contractNo}.pdf`);
{/* <Button type={'link'}>下载</Button>*/} },
{/* </div>*/} );
{/*</div>*/} }
};
return (
<div className='detail-purchaser detail-half'>
<div className='detail-title'>买家信息</div>
<div className='detail-text'>UID:</div>
<div className='detail-text'>姓名: </div>
<div className='detail-text'>手机号: </div>
<div className='detail-text'>备注:</div>
{detail?.contractInfoDTO ? (
<div>
<div className='detail-title'>合同信息</div>
<div className='detail-text'>合同编号: {detail.contractInfoDTO.contractNo}</div>
<div className='detail-text'>合同标题: {detail.contractInfoDTO.contractTitle}</div>
<div className='detail-text'>
合同状态:
<span style={{ color: 'red' }}>
{
contractStatusList.find((v) => v.value === detail.contractInfoDTO?.signStatus)
?.label
}
</span>
</div>
<div className='detail-text'>
合同操作:
<Button type='link' onClick={contractPreview}>
查看
</Button>
<Button type='link' onClick={downloadContract}>
下载
</Button>
</div>
</div>
) : (
''
)}
{/*<div className={'detail-title'}>付款凭证</div>*/} {/*<div className={'detail-title'}>付款凭证</div>*/}
{/*<div className={'detail-text'}>预付款:</div>*/} {/*<div className={'detail-text'}>预付款:</div>*/}
{/*<div className={'detail-image'}>*/} {/*<div className={'detail-image'}>*/}
......
...@@ -56,7 +56,7 @@ const SureOrder: FC<ModalProps & selfProps> = ({ open, onOk, onCancel, mallOrder ...@@ -56,7 +56,7 @@ const SureOrder: FC<ModalProps & selfProps> = ({ open, onOk, onCancel, mallOrder
title: '价格', title: '价格',
align: 'center', align: 'center',
dataIndex: 'unitPrice', dataIndex: 'unitPrice',
render: (text: number) => text.toFixed(2).toLocaleString(), render: (text: number) => text.toLocaleString(),
}, },
{ {
title: '数量', title: '数量',
...@@ -114,6 +114,10 @@ const SureOrder: FC<ModalProps & selfProps> = ({ open, onOk, onCancel, mallOrder ...@@ -114,6 +114,10 @@ const SureOrder: FC<ModalProps & selfProps> = ({ open, onOk, onCancel, mallOrder
OrderManageAPI.confirmOrder({ ...values[0], id: mallOrderItem.id }).then( OrderManageAPI.confirmOrder({ ...values[0], id: mallOrderItem.id }).then(
({ code, message: msg }) => { ({ code, message: msg }) => {
if (code === '200') { if (code === '200') {
message.success('确认订单成功');
orderInfoForm.resetFields();
contractForm.resetFields();
setContractFileList([]);
onOk(); onOk();
} else { } else {
message.error(msg); message.error(msg);
......
...@@ -151,6 +151,7 @@ function ProductOrderView() { ...@@ -151,6 +151,7 @@ function ProductOrderView() {
setSureOrderShow(false); setSureOrderShow(false);
}; };
const sureOrderOk = () => { const sureOrderOk = () => {
getTableList(query);
setSureOrderShow(false); setSureOrderShow(false);
}; };
// 凭证审批 // 凭证审批
...@@ -230,7 +231,7 @@ function ProductOrderView() { ...@@ -230,7 +231,7 @@ function ProductOrderView() {
dataIndex: 'orderTotalAmount', dataIndex: 'orderTotalAmount',
align: 'center', align: 'center',
render: (text) => ( render: (text) => (
<TableItem tr={<div className='goods-text'>{text?.toFixed(2).toLocaleString()}</div>} /> <TableItem tr={<div className='goods-text'>{text?.toLocaleString()}</div>} />
), ),
}, },
{ {
...@@ -260,7 +261,7 @@ function ProductOrderView() { ...@@ -260,7 +261,7 @@ function ProductOrderView() {
<TableItem <TableItem
tr={record.skuDTOList.map((v) => ( tr={record.skuDTOList.map((v) => (
<div key={v.id} className='goods-text'> <div key={v.id} className='goods-text'>
¥{v.unitPrice} ¥{v.unitPrice?.toLocaleString()}
</div> </div>
))} ))}
/> />
...@@ -279,7 +280,7 @@ function ProductOrderView() { ...@@ -279,7 +280,7 @@ function ProductOrderView() {
dataIndex: 'otherAmount', dataIndex: 'otherAmount',
align: 'center', align: 'center',
render: (text) => ( render: (text) => (
<TableItem tr={<div className='goods-text'>¥{text?.toFixed(2).toLocaleString()}</div>} /> <TableItem tr={<div className='goods-text'>¥{text?.toLocaleString()}</div>} />
), ),
}, },
{ {
...@@ -287,7 +288,7 @@ function ProductOrderView() { ...@@ -287,7 +288,7 @@ function ProductOrderView() {
dataIndex: 'shareAmount', dataIndex: 'shareAmount',
align: 'center', align: 'center',
render: (text) => ( render: (text) => (
<TableItem tr={<div className='goods-text'>¥{text?.toFixed(2).toLocaleString()}</div>} /> <TableItem tr={<div className='goods-text'>¥{text?.toLocaleString()}</div>} />
), ),
}, },
{ {
...@@ -295,12 +296,14 @@ function ProductOrderView() { ...@@ -295,12 +296,14 @@ function ProductOrderView() {
dataIndex: 'uid', dataIndex: 'uid',
align: 'center', align: 'center',
width: '15%', width: '15%',
render: (text, _record) => ( render: (_text: any, record) => (
<TableItem <TableItem
tr={ tr={
<> <>
<div className='goods-text'>{text}</div> <div className='goods-text'>
{/*<div>{record.userName}</div>*/} <div>{record.userName}</div>
</div>
{/*<div>{record.entName}</div>*/} {/*<div>{record.entName}</div>*/}
</> </>
} }
......
import { useEffect, useState } from 'react'; import { useEffect, useState } from 'react';
import { SystemManageAPI } from '~/api'; import { FddInterfaceAPI } from '~/api';
import { decode } from 'js-base64'; import { decode } from 'js-base64';
const RealNameAuth = () => { const RealNameAuth = () => {
...@@ -7,7 +7,7 @@ const RealNameAuth = () => { ...@@ -7,7 +7,7 @@ const RealNameAuth = () => {
// 获取第三方认证连接 // 获取第三方认证连接
const getCompanyVerifyUrl = () => { const getCompanyVerifyUrl = () => {
SystemManageAPI.getCompanyVerifyUrl({ port: 1 }).then(({ result }) => { FddInterfaceAPI.getCompanyVerifyUrl({ port: 1 }).then(({ result }) => {
if (result) { if (result) {
setAuthUrl(decode(result)); setAuthUrl(decode(result));
} }
......
...@@ -96,3 +96,31 @@ export const withdrawStatusList = [ ...@@ -96,3 +96,31 @@ export const withdrawStatusList = [
value: 'approve', value: 'approve',
}, },
]; ];
// 合同状态字典
// 状态: 0、等待平台签署 1、平台签署失败 2、等待(买家/供应商)签署(平台签署成功) 3、(买家/供应商)签署失败 4、(买家/供应商)签署成功、5、归档
export const contractStatusList = [
{
label: '等待平台签署',
value: 0,
},
{
label: '平台签署失败',
value: 1,
},
{
label: '等待买家签署(平台签署成功)',
value: 2,
},
{
label: '买家签署失败',
value: 3,
},
{
label: '买家签署成功',
value: 4,
},
{
label: '归档',
value: 5,
},
];
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论