提交 4f7fb4bb 作者: 龚洪江

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

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