提交 6a43f7b9 作者: 龚洪江

Merge branch 'develop'

...@@ -14,4 +14,4 @@ patches: ...@@ -14,4 +14,4 @@ patches:
images: images:
- name: REGISTRY/NAMESPACE/IMAGE:TAG - name: REGISTRY/NAMESPACE/IMAGE:TAG
newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/admin newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/admin
newTag: b3715add25197d0446cad6c949abca7c31295f27 newTag: 082304f0fc4d7b6f9a14d945cc2fdbfadd17e737
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
"antd": "^5.4.2", "antd": "^5.4.2",
"axios": "^1.4.0", "axios": "^1.4.0",
"dayjs": "^1.11.7", "dayjs": "^1.11.7",
"echarts": "^5.4.3",
"events": "^3.3.0", "events": "^3.3.0",
"file-saver": "^2.0.5", "file-saver": "^2.0.5",
"js-base64": "^3.7.3", "js-base64": "^3.7.3",
......
...@@ -29,6 +29,9 @@ dependencies: ...@@ -29,6 +29,9 @@ dependencies:
dayjs: dayjs:
specifier: ^1.11.7 specifier: ^1.11.7
version: registry.npmmirror.com/dayjs@1.11.7 version: registry.npmmirror.com/dayjs@1.11.7
echarts:
specifier: ^5.4.3
version: registry.npmmirror.com/echarts@5.4.3
events: events:
specifier: ^3.3.0 specifier: ^3.3.0
version: registry.npmmirror.com/events@3.3.0 version: registry.npmmirror.com/events@3.3.0
...@@ -2352,6 +2355,15 @@ packages: ...@@ -2352,6 +2355,15 @@ packages:
ssr-window: registry.npmmirror.com/ssr-window@3.0.0 ssr-window: registry.npmmirror.com/ssr-window@3.0.0
dev: false dev: false
registry.npmmirror.com/echarts@5.4.3:
resolution: {integrity: sha512-mYKxLxhzy6zyTi/FaEbJMOZU1ULGEQHaeIeuMR5L+JnJTpz+YR03mnnpBhbR4+UYJAgiXgpyTVLffPAjOTLkZA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/echarts/-/echarts-5.4.3.tgz}
name: echarts
version: 5.4.3
dependencies:
tslib: registry.npmmirror.com/tslib@2.3.0
zrender: registry.npmmirror.com/zrender@5.4.4
dev: false
registry.npmmirror.com/electron-to-chromium@1.4.404: registry.npmmirror.com/electron-to-chromium@1.4.404:
resolution: {integrity: sha512-te57sWvQdpxmyd1GiswaodKdXdPgn9cN4ht8JlNa04QgtrfnUdWEo1261rY2vaC6TKaiHn0E7QerJWPKFCvMVw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.4.404.tgz} resolution: {integrity: sha512-te57sWvQdpxmyd1GiswaodKdXdPgn9cN4ht8JlNa04QgtrfnUdWEo1261rY2vaC6TKaiHn0E7QerJWPKFCvMVw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.4.404.tgz}
name: electron-to-chromium name: electron-to-chromium
...@@ -5509,6 +5521,12 @@ packages: ...@@ -5509,6 +5521,12 @@ packages:
version: 1.14.1 version: 1.14.1
dev: true dev: true
registry.npmmirror.com/tslib@2.3.0:
resolution: {integrity: sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz}
name: tslib
version: 2.3.0
dev: false
registry.npmmirror.com/tslib@2.5.3: registry.npmmirror.com/tslib@2.5.3:
resolution: {integrity: sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/tslib/-/tslib-2.5.3.tgz} resolution: {integrity: sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/tslib/-/tslib-2.5.3.tgz}
name: tslib name: tslib
...@@ -5796,3 +5814,11 @@ packages: ...@@ -5796,3 +5814,11 @@ packages:
version: 0.1.0 version: 0.1.0
engines: {node: '>=10'} engines: {node: '>=10'}
dev: true dev: true
registry.npmmirror.com/zrender@5.4.4:
resolution: {integrity: sha512-0VxCNJ7AGOMCWeHVyTrGzUgrK4asT4ml9PEkeGirAkKNYXYzoPJCLvmyfdoOXcjTHPs10OZVMfD1Rwg16AZyYw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/zrender/-/zrender-5.4.4.tgz}
name: zrender
version: 5.4.4
dependencies:
tslib: registry.npmmirror.com/tslib@2.3.0
dev: false
import './assets/style/App.scss'; import './assets/style/App.scss';
import PrivateRouter from '~/router/privateRouter'; import PrivateRouter from '~/router/privateRouter';
import { BrowserRouter } from 'react-router-dom'; import { BrowserRouter } from 'react-router-dom';
import { useEffect } from 'react';
const App = () => ( const App = () => {
const resizeListener = () => {
// 定义设计图的尺寸 3840
const designSize = 1920;
// 获取 html 元素
const html = document.documentElement;
// 定义窗口的宽度
const clientW = html.clientWidth;
// html 的fontsize 大小
const htmlRem = (clientW * 12) / designSize;
html.style.fontSize = htmlRem + 'px';
};
useEffect(() => {
window.addEventListener('resize', resizeListener);
resizeListener();
}, []);
return (
<> <>
<BrowserRouter> <BrowserRouter>
<PrivateRouter /> <PrivateRouter />
</BrowserRouter> </BrowserRouter>
</> </>
); );
};
export default App; export default App;
...@@ -16,6 +16,8 @@ import { PilotTrainAPI } from './modules/pilotTrainAPI'; ...@@ -16,6 +16,8 @@ import { PilotTrainAPI } from './modules/pilotTrainAPI';
import { FlyerCenterAPI } from './modules/flyerCenterAPI'; import { FlyerCenterAPI } from './modules/flyerCenterAPI';
import { RentManageAPI } from './modules/rentManageAPI'; import { RentManageAPI } from './modules/rentManageAPI';
import { DepleteManageTypeAPI } from './modules/depleteManageTypeAPI'; import { DepleteManageTypeAPI } from './modules/depleteManageTypeAPI';
import { FddInterfaceAPI } from './modules/fddInterfaceAPI';
import { DataDashboardsAPI } from './modules/dataDashboardsAPI';
export { export {
CommonAPI, CommonAPI,
...@@ -36,4 +38,6 @@ export { ...@@ -36,4 +38,6 @@ export {
FlyerCenterAPI, FlyerCenterAPI,
RentManageAPI, RentManageAPI,
DepleteManageTypeAPI, DepleteManageTypeAPI,
FddInterfaceAPI,
DataDashboardsAPI,
}; };
import { InterFunction } from '~/api/interface';
// 数据看板-用户概况
export type userReportDataType = InterFunction<
any,
{
/**
* 飞手认证数量
*/
dronePilotCount?: number;
/**
* 实名认证数量
*/
realNameCount?: number;
/**
* 用户数量
*/
userCount?: number;
/**
* 昨日活跃用户数量
*/
yesterdayActiveUserCount?: number;
/**
* 昨日新增用户数量
*/
yesterdayAddUserCount?: number;
}
>;
//数据看板-信息发布
export type releaseReportDataType = InterFunction<
any,
{
/**
* 订单发布数量
*/
orderReleaseCount?: number;
/**
* 帖子发布数量
*/
postsReleaseCount?: number;
/**
* 信息发布总数
*/
releaseCount?: number;
/**
* 话题发布数量
*/
topicReleaseCount?: number;
}
>;
// 数据看板-加盟信息
export type userJoinReportDataType = InterFunction<
any,
{
/**
* 品牌商
*/
brandStore?: number;
/**
* 入驻商家总数
*/
joinStoreCount?: number;
/**
* 出租商品
*/
leaseProduct?: number;
/**
* 租赁商
*/
leaseStore?: number;
/**
* 在线课程
*/
onlineCourse?: number;
/**
* 维修商
*/
repairStore?: number;
/**
* 销售商品
*/
saleProduct?: number;
/**
* 服务商品
*/
serviceProduct?: number;
/**
* 服务商
*/
serviceStore?: number;
/**
* 培训机构
*/
trainingInstitution?: number;
}
>;
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<
{
/**
* 合同地址
*/
docUrl: string;
/**
* 订单编号
*/
orderNo: string;
/**
* 端口:0小程序 1后台
*/
port: number;
/**
* 合同标题
*/
title: string;
},
{
id: number;
unionId: string;
orderNo: string;
contractNo: string;
contractTitle: string;
signStatus: number;
singerTime: string;
createTime: string;
updateTime: string;
archiveDate: string;
aremark: string;
bremark: string;
atransactionId: number;
btransactionId: number;
}
>;
// fdd-签署合同
export type signContractType = InterFunction<
{
/**
* 合同编号
*/
contractId: string;
/**
* 小程序页面跳转地址
*/
pages?: string;
/**
* 端口:0小程序 1后台
*/
port: number;
},
string
>;
// fdd-合同预览
export type viewContractType = InterFunction<{ contractId: string }, string>;
// fdd-合同下载
export type downloadContractType = InterFunction<{ contractId: string }, string>;
...@@ -155,6 +155,7 @@ type goodsItemType = { ...@@ -155,6 +155,7 @@ type goodsItemType = {
id: number; id: number;
specValuesList: { specName: string; id: number }[]; specValuesList: { specName: string; id: number }[];
}[]; }[];
priceShow: number;
}; };
export type addMallGoodsType = InterFunction<goodsItemType, any>; export type addMallGoodsType = InterFunction<goodsItemType, any>;
//商品-编辑(新) //商品-编辑(新)
......
...@@ -933,7 +933,7 @@ type mallOrderType = { ...@@ -933,7 +933,7 @@ type mallOrderType = {
/** /**
* 订单编号 * 订单编号
*/ */
orderNo?: string; orderNo: string;
/** /**
* 订单实付总额 * 订单实付总额
*/ */
...@@ -965,7 +965,7 @@ type mallOrderType = { ...@@ -965,7 +965,7 @@ type mallOrderType = {
/** /**
* 支付凭证 * 支付凭证
*/ */
payImgList?: string; payImgList: string;
/** /**
* 备注信息 * 备注信息
*/ */
...@@ -1122,6 +1122,25 @@ type mallOrderType = { ...@@ -1122,6 +1122,25 @@ type mallOrderType = {
* 抵扣钱包余额 * 抵扣钱包余额
*/ */
walletAmount?: number; walletAmount?: number;
userName: string;
phoneNum: string;
nickname: 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<
{ {
...@@ -1192,6 +1211,7 @@ export type mallOrderSendType = InterFunction< ...@@ -1192,6 +1211,7 @@ export type mallOrderSendType = InterFunction<
* 订单id * 订单id
*/ */
uavOrderId?: number; uavOrderId?: number;
id?: number;
}, },
any any
>; >;
...@@ -1209,3 +1229,406 @@ export type sellerRemarkType = InterFunction< ...@@ -1209,3 +1229,406 @@ export type sellerRemarkType = InterFunction<
}, },
any any
>; >;
// 商城订单-确认订单
export type confirmOrderType = InterFunction<
{
/**
* 订单交期
*/
deliveryTime: string;
/**
* 订单id
*/
id: number;
/**
* 订单实付总额
*/
orderTotalAmount?: number;
/**
* 卖家备注
*/
sellerRemark?: string;
},
any
>;
// 根据用户id获取钱包信息
export type walletAmountType = InterFunction<
{ userAccountId?: number },
{
/**
* 云享金余额
*/
cashAmt?: number;
/**
* 已冻结云享金
*/
cashFreeze?: number;
/**
* id
*/
id?: number;
/**
* 已提现的金额
*/
rebateWdl?: number;
/**
* 佣金余额
*/
salaryAmt?: number;
/**
* 已冻结佣金
*/
salaryFreeze?: number;
/**
* 总金额
*/
totalAmount?: number;
/**
* 云享金总金额
*/
totalCash?: number;
/**
* 冻结总额
*/
totalFreeze?: number;
/**
* 佣金总额度
*/
totalSalary?: number;
/**
* 用户ID
*/
userAccountId?: number;
/**
* 用户姓名
*/
userName?: string;
/**
* 提现冻结金额
*/
wdlFreeze?: number;
}
>;
// 商城订单-凭证审批
export type approvalOrderType = InterFunction<
{
/**
* 审核状态,0待审批,1通过,2未通过
*/
checkStatus: number;
/**
* 支付凭证
*/
payImgList?: string;
/**
* 未通过原因
*/
refuseReason?: string;
/**
* 订单id
*/
uavOrderId: number;
id: number;
},
any
>;
// 采购订单-列表
type purchaseOrderItemType = {
id: number;
orderNo: string;
backUserAccountId: number;
thirdUserAccountId: number;
uavOrderId: number;
orderAmount: number;
statusCode: number;
createTime: number;
userRemark: null;
sellerRemark: null;
skuDTOList: {
/**
* 下单时间
*/
createTime?: Date;
/**
* 订单规格id
*/
id?: number;
/**
* 商品id
*/
mallGoodsId?: number;
/**
* 购买数量
*/
orderNum: number;
/**
* 商品规格id
*/
priceStockId?: number;
/**
* 商品规格
*/
productSpec: string;
/**
* 商品规格图片
*/
skuImage?: string;
/**
* 商品规格编号
*/
skuNo?: string;
/**
* 商品名称
*/
tradeName?: string;
/**
* 订单id
*/
uavOrderId?: number;
/**
* 单价
*/
unitPrice?: number;
}[];
uavOrderExpressDTO: {
id: number;
uavOrderId: number;
sendExpNo: string;
sendExpCode: string;
takeName: string;
takePhone: string;
takeRegion: string;
takeAddress: string;
sendTime: number;
receiveTime: null;
receive: number;
};
uavOrderPayDTOS: Array<unknown>;
contractInfoDTO?: {
id: number;
unionId: string;
orderNo: string;
contractNo: string;
contractTitle: string;
signStatus: number;
singerTime: null;
createTime: string;
updateTime: string;
archiveDate: null;
aremark: string;
bremark: null;
atransactionId: string;
btransactionId: null;
};
companyName: string;
thirdPhoneNum: string;
payDTOS: {
/**
* 审核状态,0待审批,1通过,2未通过
*/
checkStatus?: number;
/**
* 提交时间
*/
createTime?: Date;
/**
* id
*/
id?: number;
/**
* 支付凭证
*/
payImgList: string;
/**
* 备注信息
*/
payRemark?: string;
/**
* 未通过原因
*/
refuseReason?: string;
/**
* 订单id
*/
uavOrderId?: number;
}[];
kdnExpDTO?: {
logisticCode?: string;
shipperCode?: string;
stateEx?: string;
traces?: {
acceptStation?: string;
acceptTime?: string;
action?: string;
location?: string;
}[];
};
uavOrderNo: string;
buyCompanyName: string;
phoneNum: string;
};
export type listPurchaseOrderType = InterListFunction<
{
/**
* 结束时间
*/
endTime?: string;
/**
* 关键字-订单编号
*/
keyword?: string;
/**
* 开始时间
*/
startTime?: string;
/**
* 订单状态码
*/
statusCode?: number;
/**
* 商家id
*/
thirdBackUserAccountId?: number;
/**
* 用户uid
*/
uid?: string;
},
purchaseOrderItemType
>;
// 采购订单-详情
export type purchaseOrderDetailType = InterFunction<
{
/**
* id
*/
id: number;
},
purchaseOrderItemType
>;
// 采购订单-确认
export type confirmPOrderType = InterFunction<
{
/**
* 采购订单id
*/
id?: number;
/**
* 订单金额
*/
orderAmount?: number;
/**
* 平台备注
*/
userRemark?: string;
},
any
>;
// 采购订单-上传付款凭证
export type uploadPOrderType = InterFunction<
{
/**
* 审核状态,0待审批,1通过,2未通过
*/
checkStatus?: number;
/**
* 支付凭证
*/
payImgList?: string;
/**
* 备注信息
*/
payRemark?: string;
/**
* 订单id
*/
uavOrderId?: number;
},
any
>;
// 采购订单-审核
export type uavPoCheckPayType = InterFunction<
{
/**
* 审核状态,0待审批,1通过,2未通过
*/
checkStatus?: number;
/**
* id
*/
id?: number;
/**
* 未通过原因
*/
refuseReason?: string;
/**
* 订单id
*/
uavOrderId?: number;
},
any
>;
// 采购订单-发货
export type uavPoSendType = InterFunction<
{
/**
* 快递编码
*/
sendExpCode?: string;
/**
* 快递编号
*/
sendExpNo?: string;
/**
* 发货-收货详细地址
*/
takeAddress?: string;
/**
* 取货人
*/
takeName?: string;
/**
* 取货人号码
*/
takePhone?: string;
/**
* 地区信息
*/
takeRegion?: string;
/**
* 订单id
*/
uavOrderId?: number;
},
any
>;
// 采购订单-平台备注
export type uavPoRemarkType = InterFunction<
{
/**
* content
*/
content: string;
/**
* id
*/
id: number;
},
any
>;
// 采购订单-商家备注
export type uavPoSellerRemarkType = InterFunction<
{
/**
* content
*/
content: string;
/**
* id
*/
id: number;
},
any
>;
import {
releaseReportDataType,
userJoinReportDataType,
userReportDataType,
} from '~/api/interface/dataDashboardsType';
import axios from '../request';
export class DataDashboardsAPI {
// 数据看板-用户概况
static getUserReportData: userReportDataType = () =>
axios.get('/userapp/user/report/getUserReportData');
// 数据看板-信息发布
static getReleaseReportData: releaseReportDataType = () =>
axios.get('/release/release/report/getReleaseReportData');
// 数据看板-加盟信息
static getUserJoinReportData: userJoinReportDataType = () =>
axios.get('/pms/product/report/getUserReportData');
}
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 });
}
import axios from '../request'; import axios from '../request';
import { import {
approvalOrderType,
confirmOrderType,
confirmPOrderType,
disputeType, disputeType,
flowDictionaryAndTimeType, flowDictionaryAndTimeType,
flowDictionaryType, flowDictionaryType,
...@@ -8,6 +11,7 @@ import { ...@@ -8,6 +11,7 @@ import {
listOfRentalOrdersType, listOfRentalOrdersType,
listPageManagerVerOne, listPageManagerVerOne,
listPcWechatOrderType, listPcWechatOrderType,
listPurchaseOrderType,
listTranStatusType, listTranStatusType,
logisticsDynamicsType, logisticsDynamicsType,
mallOrderDetailType, mallOrderDetailType,
...@@ -19,6 +23,7 @@ import { ...@@ -19,6 +23,7 @@ import {
orderListStatus, orderListStatus,
pfConfirmOrderWareType, pfConfirmOrderWareType,
platFormCloseOrderType, platFormCloseOrderType,
purchaseOrderDetailType,
refundOrderType, refundOrderType,
renterTakeOrderType, renterTakeOrderType,
sellerRemarkType, sellerRemarkType,
...@@ -27,6 +32,12 @@ import { ...@@ -27,6 +32,12 @@ import {
serviceOrderFormListType, serviceOrderFormListType,
serviceOrderStatusType, serviceOrderStatusType,
serviceOrderType, serviceOrderType,
uavPoCheckPayType,
uavPoRemarkType,
uavPoSellerRemarkType,
uavPoSendType,
uploadPOrderType,
walletAmountType,
} from '~/api/interface/orderManageType'; } from '~/api/interface/orderManageType';
export class OrderManageAPI { export class OrderManageAPI {
...@@ -121,4 +132,30 @@ export class OrderManageAPI { ...@@ -121,4 +132,30 @@ export class OrderManageAPI {
// 商城订单-卖家备注 // 商城订单-卖家备注
static sellerRemark: sellerRemarkType = (params) => static sellerRemark: sellerRemarkType = (params) =>
axios.get('/oms/uav-order/sellerRemark', { params }); axios.get('/oms/uav-order/sellerRemark', { params });
// 商城订单-确认订单
static confirmOrder: confirmOrderType = (data) => axios.post('/oms/uav-order/confirmOrder', data);
// 根据用户id获取钱包信息
static getWalletAmount: walletAmountType = (params) =>
axios.get('/userapp/pay/getPayWalletInfo', { params });
// 商城订单-审批凭证
static approvalOrder: approvalOrderType = (data) => axios.post('/oms/uav-order/checkPay', data);
// 采购订单-列表
static getListPurchaseOrder: listPurchaseOrderType = (data) =>
axios.post('/oms/uav-po/listPurchaseOrder', data);
// 采购订单-详情
static getPurchaseOrderDetail: purchaseOrderDetailType = (params) =>
axios.get('/oms/uav-po/getPurchaseOrder', { params });
// 采购订单-确认
static confirmPOrder: confirmPOrderType = (data) => axios.post('/oms/uav-po/confirmPOrder', data);
// 采购订单-上传付款凭证
static uploadPOrder: uploadPOrderType = (data) => axios.post('/oms/uav-po/upLoadPay', data);
// 采购订单-审核
static uavPoCheckPay: uavPoCheckPayType = (data) => axios.post('/oms/uav-po/checkPay', data);
// 采购订单-发货
static uavPoSend: uavPoSendType = (data) => axios.post('/oms/uav-po/send', data);
// 采购订单-平台备注
static setUavPoRemark: uavPoRemarkType = (params) =>
axios.get('/oms/uav-po/userRemark', { params });
static setUavPoSellerRemark: uavPoSellerRemarkType = (params) =>
axios.get('/oms/uav-po/sellerRemark', { params });
} }
...@@ -19,7 +19,7 @@ const service = axios.create({ ...@@ -19,7 +19,7 @@ const service = axios.create({
service.interceptors.request.use( service.interceptors.request.use(
(config: any) => { (config: any) => {
const token = Cookies.get('SHAREFLY-TOKEN'); const token = Cookies.get('SHAREFLY-TOKEN');
// console.log('token --->', token); // console.log('config --->', config);
if (token) { if (token) {
config.headers.token = token; config.headers.token = token;
} }
......
...@@ -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;
......
...@@ -63,11 +63,14 @@ export function MenuView() { ...@@ -63,11 +63,14 @@ export function MenuView() {
authRouterList().then((value) => { authRouterList().then((value) => {
setItems(getItem(value)); setItems(getItem(value));
}); });
}, []);
useEffect(() => {
// 设置当前选中的项目 // 设置当前选中的项目
setOpenKeys([getRoutePid(routerList, location.pathname).toString()]); setOpenKeys([getRoutePid(routerList, location.pathname).toString()]);
// 设置当前选中的项目的subMenu // 设置当前选中的项目的subMenu
setSelectedKeys([getRouteID(routerList, location.pathname).toString()]); setSelectedKeys([getRouteID(routerList, location.pathname).toString()]);
}, []); }, [location.pathname]);
return ( return (
<Sider <Sider
style={{ paddingTop: '50px' }} style={{ paddingTop: '50px' }}
......
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[0]>();
// 用户信息 // 用户信息
const { userInfo } = useSelector((state: any) => state.UserInfo); const { userInfo } = useSelector((state: any) => state.UserInfo);
// 菜单栏收起 // 菜单栏收起
...@@ -25,6 +34,15 @@ export function TitleView() { ...@@ -25,6 +34,15 @@ export function TitleView() {
setIsActive(!isActive); setIsActive(!isActive);
dispatch(SET_COLLAPSE(!isActive)); dispatch(SET_COLLAPSE(!isActive));
}; };
// 获取fdd实名认证信息
const getAppUserFddInfo = () => {
FddInterfaceAPI.getAppUserFddInfo({ port: 1 }).then(({ result }) => {
if (result) {
setFddAuthInfo(result.find((v) => v.accountType === 2));
}
});
};
// 右上角按钮 // 右上角按钮
const items: MenuProps['items'] = [ const items: MenuProps['items'] = [
{ {
...@@ -50,6 +68,10 @@ export function TitleView() { ...@@ -50,6 +68,10 @@ export function TitleView() {
), ),
}, },
]; ];
useEffect(() => {
getAppUserFddInfo();
}, []);
return ( return (
<Header <Header
style={{ style={{
...@@ -87,6 +109,12 @@ export function TitleView() { ...@@ -87,6 +109,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 }}
......
...@@ -7,7 +7,7 @@ interface selfProps { ...@@ -7,7 +7,7 @@ interface selfProps {
} }
const IframeModal: FC<ModalProps & selfProps> = ({ open, onCancel, title, url }) => { const IframeModal: FC<ModalProps & selfProps> = ({ open, onCancel, title, url }) => {
return ( return (
<Modal open={open} onCancel={onCancel} title={title}> <Modal open={open} onCancel={onCancel} title={title} width={1000} footer={null}>
<iframe src={url} title={title} style={{ width: '100%', height: '1000px' }} /> <iframe src={url} title={title} style={{ width: '100%', height: '1000px' }} />
</Modal> </Modal>
); );
......
.pay-img-wrap{
display: flex;
flex-wrap: wrap;
.ant-image{
margin-bottom: 10px;
margin-right: 10px;
}
}
import { FC, useState } from 'react';
import { Form, Modal, ModalProps, Radio, Image, Input, RadioChangeEvent, message } from 'antd';
import './index.scss';
import { OrderManageAPI } from '~/api';
interface selfProps {
onCancel: () => void;
onOk: () => void;
mallOrderItem: any;
type: number; //0:采购订单,1:商城订单
}
// 订单对象类型
// type mallOrderItemType = InterListType<mallOrderListType>[0];
const ApprovalOrder: FC<ModalProps & selfProps> = ({
open,
onCancel,
onOk,
mallOrderItem,
type,
}) => {
const [form] = Form.useForm<{ checkStatus: number; refuseReason: string }>();
const [checkStatus, setCheckStatus] = useState<number>(1);
const radioChange = (e: RadioChangeEvent) => {
setCheckStatus(e.target.value);
};
// 获取需要审批的凭证
const getApproveObj = () => {
return type === 1
? mallOrderItem?.payDTOList?.find((v: any) => v.checkStatus === 0)
: mallOrderItem?.payDTOS?.find((v: any) => v.checkStatus === 0);
};
const handleOk = () => {
if (mallOrderItem) {
form.validateFields().then((values) => {
OrderManageAPI[type === 1 ? 'approvalOrder' : 'uavPoCheckPay']({
uavOrderId: mallOrderItem?.id,
checkStatus: values.checkStatus,
refuseReason: values.refuseReason || undefined,
id: getApproveObj()?.id || 0,
}).then(({ code }) => {
if (code === '200') {
message.success('审批成功');
form.resetFields();
onOk();
}
});
});
}
};
const handleCancel = () => {
form.resetFields();
onCancel();
};
return (
<Modal open={open} title='凭证审批' onOk={handleOk} onCancel={handleCancel}>
<Form
labelCol={{ span: 3 }}
wrapperCol={{ span: 19 }}
initialValues={{ checkStatus: 1 }}
form={form}
>
<Form.Item label='状态' name='checkStatus'>
<Radio.Group onChange={radioChange}>
<Radio value={1}>通过</Radio>
<Radio value={2}>驳回</Radio>
</Radio.Group>
</Form.Item>
{checkStatus === 2 ? (
<Form.Item name='refuseReason' label='原因'>
<Input.TextArea placeholder='请输入驳回原因' rows={4} showCount maxLength={70} />
</Form.Item>
) : (
''
)}
<Form.Item label='凭证图片'>
<div className='pay-img-wrap'>
{JSON.parse(getApproveObj()?.payImgList || '[]').map((i: any, j: number) => (
<Image src={i.filePath} key={j} width={100} height={100} />
))}
</div>
</Form.Item>
<Form.Item label='凭证说明'>
<span style={{ wordBreak: 'break-all' }}>{getApproveObj()?.payRemark}</span>
</Form.Item>
</Form>
</Modal>
);
};
export default ApprovalOrder;
import { FC, useEffect, useState } from 'react'; import { FC, useEffect, useState } from 'react';
import { Cascader, Form, Input, message, Modal, ModalProps, Select } from 'antd'; import { Cascader, Form, Input, message, Modal, ModalProps, Select } from 'antd';
import { CommonAPI, OrderManageAPI } from '~/api'; import { OrderManageAPI } from '~/api';
import { InterDataType, InterListType, InterReqType } from '~/api/interface'; import { InterReqType } from '~/api/interface';
import { getSecondDistrictInfoType } from '~/api/interface/commonType'; import { mallOrderSendType } from '~/api/interface/orderManageType';
import { mallOrderListType, mallOrderSendType } from '~/api/interface/orderManageType'; import regionData from '~/assets/json/district.json';
// 地址返回类型
type locationType = InterDataType<getSecondDistrictInfoType>;
type mallOrderType = InterListType<mallOrderListType>[0];
// 发货请求类型 // 发货请求类型
type sendMallType = InterReqType<mallOrderSendType>; type sendMallType = Omit<Exclude<InterReqType<mallOrderSendType>, undefined>, 'takeRegion'> & {
takeRegion: string[];
};
interface selfProps { interface selfProps {
currentOrderItem: mallOrderType | undefined; currentOrderItem: any;
onCancel: () => void; onCancel: () => void;
onOk: () => void; onOk: () => void;
type: number; //0:采购订单,1:商城订单
} }
const ShipmentsOrder: FC<ModalProps & selfProps> = ({ onOk, onCancel, open, currentOrderItem }) => { const ShipmentsOrder: FC<ModalProps & selfProps> = ({
onOk,
onCancel,
open,
currentOrderItem,
type,
}) => {
const [form] = Form.useForm<sendMallType>(); const [form] = Form.useForm<sendMallType>();
const [listExpressInfo, setListExpressInfo] = useState<{ label: string; value: string }[]>([]); const [listExpressInfo, setListExpressInfo] = useState<{ label: string; value: string }[]>([]);
const [location, setLocation] = useState<locationType>([]);
//获取物流公司列表 //获取物流公司列表
const getExpressList = () => { const getExpressList = () => {
...@@ -27,24 +32,21 @@ const ShipmentsOrder: FC<ModalProps & selfProps> = ({ onOk, onCancel, open, curr ...@@ -27,24 +32,21 @@ const ShipmentsOrder: FC<ModalProps & selfProps> = ({ onOk, onCancel, open, curr
setListExpressInfo(result?.map((v) => ({ label: v.exName, value: v.exCode })) || []); setListExpressInfo(result?.map((v) => ({ label: v.exName, value: v.exCode })) || []);
}); });
}; };
// 获取地址信息
const getLocation = () => {
CommonAPI.getSecondDistrictInfo().then(({ result }) => {
setLocation(result || []);
});
};
const handleOk = () => { const handleOk = () => {
form.validateFields().then((value) => { form.validateFields().then((value) => {
OrderManageAPI.mallOrderSend({ ...value, uavOrderId: currentOrderItem?.id }).then( OrderManageAPI[type === 1 ? 'mallOrderSend' : 'uavPoSend']({
({ code }) => { ...value,
uavOrderId: type === 1 ? currentOrderItem?.id : currentOrderItem.uavOrderId,
id: currentOrderItem?.uavOrderExpressDTO.id,
takeRegion: value?.takeRegion?.join('/'),
}).then(({ code }) => {
if (code === '200') { if (code === '200') {
message.success('发货成功'); message.success('发货成功');
form.resetFields(); form.resetFields();
onOk(); onOk();
} }
}, });
);
}); });
}; };
const handleCancel = () => { const handleCancel = () => {
...@@ -53,7 +55,6 @@ const ShipmentsOrder: FC<ModalProps & selfProps> = ({ onOk, onCancel, open, curr ...@@ -53,7 +55,6 @@ const ShipmentsOrder: FC<ModalProps & selfProps> = ({ onOk, onCancel, open, curr
}; };
useEffect(() => { useEffect(() => {
if (open) { if (open) {
getLocation();
getExpressList(); getExpressList();
} }
}, [open]); }, [open]);
...@@ -63,7 +64,7 @@ const ShipmentsOrder: FC<ModalProps & selfProps> = ({ onOk, onCancel, open, curr ...@@ -63,7 +64,7 @@ const ShipmentsOrder: FC<ModalProps & selfProps> = ({ onOk, onCancel, open, curr
form.setFieldsValue({ form.setFieldsValue({
takeName: currentOrderItem.uavOrderExpressDTO.takeName, takeName: currentOrderItem.uavOrderExpressDTO.takeName,
takePhone: currentOrderItem.uavOrderExpressDTO.takePhone, takePhone: currentOrderItem.uavOrderExpressDTO.takePhone,
takeRegion: currentOrderItem.uavOrderExpressDTO.takeRegion, takeRegion: currentOrderItem.uavOrderExpressDTO.takeRegion.split('/'),
takeAddress: currentOrderItem.uavOrderExpressDTO.takeAddress, takeAddress: currentOrderItem.uavOrderExpressDTO.takeAddress,
}); });
} }
...@@ -142,7 +143,7 @@ const ShipmentsOrder: FC<ModalProps & selfProps> = ({ onOk, onCancel, open, curr ...@@ -142,7 +143,7 @@ const ShipmentsOrder: FC<ModalProps & selfProps> = ({ onOk, onCancel, open, curr
]} ]}
> >
<Cascader <Cascader
options={location} options={regionData}
placeholder='请选择收货地址' placeholder='请选择收货地址'
allowClear allowClear
fieldNames={{ fieldNames={{
......
...@@ -10,4 +10,29 @@ ...@@ -10,4 +10,29 @@
margin-top: 10px; margin-top: 10px;
} }
} }
.mall-sku-item{
display: flex;
align-items: center;
margin-bottom: 10px;
.sku-img{
width: 48px;
height: 48px;
}
.sku-info{
margin-left: 10px;
line-height: 16px;
text-align: left;
.info-name{
color:#1677ff
}
.info-spec{
margin-top: 10px;
span:not(:last-child){
&:after{
content: ';';
}
}
}
}
}
} }
.order-table-item {
.item-td {
position: absolute;
top: 0;
left: 0;
height: 40px;
width: 100%;
background: rgba(22, 119, 255, 0.1);
line-height: 40px;
}
.item-tr {
min-height: 50px;
width: 100%;
margin-top: 50px;
}
}
import './index.scss';
const TableItem: React.FC<{
td?: React.ReactNode;
tr?: React.ReactNode;
// eslint-disable-next-line react/prop-types
}> = ({ td, tr }) => {
return (
<div className='order-table-item'>
<div className='item-td'>{td}</div>
<div className='item-tr'>{tr}</div>
</div>
);
};
export default TableItem;
...@@ -4,6 +4,7 @@ import { CommonAPI } from '~/api'; ...@@ -4,6 +4,7 @@ import { CommonAPI } from '~/api';
import './index.scss'; import './index.scss';
import Viewer from '~/components/viewer'; import Viewer from '~/components/viewer';
import saveAs from 'file-saver'; import saveAs from 'file-saver';
import { fileTypeList } from '~/utils/dictionary';
interface PropsType { interface PropsType {
listType?: 'text' | 'picture' | 'picture-card'; // 上传列表的内建样式 listType?: 'text' | 'picture' | 'picture-card'; // 上传列表的内建样式
...@@ -58,9 +59,7 @@ export const Uploader: React.FC<PropsType> = (props) => { ...@@ -58,9 +59,7 @@ export const Uploader: React.FC<PropsType> = (props) => {
const isType = fileType?.includes(res.type); const isType = fileType?.includes(res.type);
const isSize = res.size / 1024 / 1024 < (fileSize || 2); const isSize = res.size / 1024 / 1024 < (fileSize || 2);
if (!isType) { if (!isType) {
message message.error(`请上传${getFileTypeStr()}格式的文件!`).then();
.error(`请上传${fileType.join('、').replace(/image\/|video\//g, '')}格式的文件!`)
.then();
return isType; return isType;
} }
if (!isSize) { if (!isSize) {
...@@ -125,6 +124,13 @@ export const Uploader: React.FC<PropsType> = (props) => { ...@@ -125,6 +124,13 @@ export const Uploader: React.FC<PropsType> = (props) => {
} }
}, },
}; };
// 获取文件类型提示
const getFileTypeStr = () =>
fileType
.map((v) => fileTypeList.find((i) => i.value === v)?.label)
.filter((v) => !!v)
.join(',');
useEffect(() => { useEffect(() => {
// 如果有默认文件列表 // 如果有默认文件列表
if (defaultFileList?.length) { if (defaultFileList?.length) {
......
...@@ -50,7 +50,9 @@ function LoginView() { ...@@ -50,7 +50,9 @@ function LoginView() {
localStorage.setItem('roleId', res.result.roleInfo.id.toString()); localStorage.setItem('roleId', res.result.roleInfo.id.toString());
authRouterList().then((value: any) => { authRouterList().then((value: any) => {
if (value.length) { if (value.length) {
navigate({ pathname: value[0].children.find((v: any) => !v.meta.hidden)?.path }); navigate({
pathname: value[0].children?.find((v: any) => !v.meta.hidden)?.path || value[0].path,
});
} else { } else {
message.warning('请先配置权限'); message.warning('请先配置权限');
} }
...@@ -95,7 +97,9 @@ function LoginView() { ...@@ -95,7 +97,9 @@ function LoginView() {
localStorage.setItem('roleId', result.roleInfo.id.toString()); localStorage.setItem('roleId', result.roleInfo.id.toString());
authRouterList().then((value: any) => { authRouterList().then((value: any) => {
if (value.length) { if (value.length) {
navigate({ pathname: value[0].children.find((v: any) => !v.meta.hidden)?.path }); navigate({
pathname: value[0].children?.find((v: any) => !v.meta.hidden)?.path || value[0].path,
});
} else { } else {
message.warning('请先配置权限'); message.warning('请先配置权限');
} }
......
@import '@/style/covert.scss';
$design_width:1712;
$design_height:856;
.join-info{
margin-left: 20px;
width: toVw(468,$design_width);
&-card-1{
height: toVh(160,1080);
background: linear-gradient(316deg, #0066F5 0%, #007AFF 100%);
border-radius: 32px;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
.join-count{
font-size: 4.33rem;
font-weight: bold;
color: #FFFFFF;
line-height: 6.08rem;
&:after{
content: '家';
font-size: 3rem;
font-weight: bold;
color: #FFFFFF;
}
}
.join-meta{
font-size: 2rem;
color: #F4F5F7;
line-height: 2.75rem;
}
}
&-card-2,&-card-3{
background: linear-gradient(180deg, rgba(238,239,242,0.9) 0%, #FFFFFF 100%);
box-shadow: 0px 10px 20px 0px rgba(23,29,52,0.2), inset 0px 1px 3px 0px #FFFFFF;
border-radius: 32px;
border-image: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.2)) 2 2;
backdrop-filter: blur(10px);
margin-top: 16px;
.card-header{
&-icon{
background: #0075FC;
}
}
}
&-card-2{
height: toVh(355,1080);
.card-echarts{
width: 100%;
height: toVh(200,1080);
}
}
&-card-3{
height: toVh(346,1080);
.card-header{
.sku-count{
font-size: 2.33rem;
font-weight: bold;
color: #010101;
line-height: 3.33rem;
}
}
.card-progress{
padding: 0 53px 0 39px;
margin-bottom: 19px;
.progress-item{
display: flex;
align-items: center;
&-label{
font-size: 1.2rem;
color: #707070;
font-weight: bold;
}
&-info{
flex: 1;
margin: 0 36px 0 24px;
}
&-value{
font-size: 1.67rem;
font-weight: bold;
color: #000000;
}
}
}
}
}
import './index.scss';
import { useEffect, useState } from 'react';
import * as echarts from 'echarts';
import { Progress } from 'antd';
import { DataDashboardsAPI } from '~/api';
import { InterDataType } from '~/api/interface';
import { userJoinReportDataType } from '~/api/interface/dataDashboardsType';
// 数据看板-加盟返回类型
type joinReportDataType = InterDataType<userJoinReportDataType>;
const JoinInfo = () => {
const [joinReportDataType, setJoinReportDataType] = useState<joinReportDataType>();
// 数据看板-加盟信息
const getUserJoinReportData = () => {
DataDashboardsAPI.getUserJoinReportData().then(({ result }) => {
if (result) {
setJoinReportDataType(result);
}
});
};
// 初始化饼图
const initEchartsPie = () => {
const myChart = echarts.init(document.getElementById('pie'));
myChart.setOption({
tooltip: {
trigger: 'item',
},
series: [
{
type: 'pie',
radius: ['40%', '70%'],
avoidLabelOverlap: false,
itemStyle: {
normal: {
color: function (params: any) {
const colorList = ['#FF4100', '#6600FF', '#006BFF', '#FF9E00', '#64C9C9'];
return colorList[params.dataIndex];
},
},
},
data: [
{ value: 40, name: '品牌商' },
{ value: 38, name: '维修商' },
{ value: 32, name: '培训机构' },
{ value: 30, name: '服务商' },
{ value: 28, name: '租赁商' },
],
},
],
});
window.addEventListener('resize', function () {
myChart.resize();
});
};
useEffect(() => {
initEchartsPie();
getUserJoinReportData();
}, []);
return (
<div className='join-info'>
<div className='join-info-card-1'>
<div className='join-count'>{joinReportDataType?.joinStoreCount}</div>
<div className='join-meta'>入驻商家总数</div>
</div>
<div className='join-info-card-2'>
<div className='card-header'>
<div className='card-header-icon'></div>
<div className='card-header-title'>入驻商家</div>
</div>
<div className='card-echarts' id='pie'></div>
</div>
<div className='join-info-card-3'>
<div className='card-header'>
<div className='card-header-icon'></div>
<div className='card-header-title'>上架商品 (SKU)</div>
<div className='sku-count'>2400</div>
</div>
<div className='card-progress'>
<div className='progress-item'>
<div className='progress-item-label'>售卖商品</div>
<div className='progress-item-info'>
<Progress percent={30} strokeColor='#F4872A' showInfo={false} />
</div>
<div className='progress-item-value'>122</div>
</div>
<div className='progress-item'></div>
<div className='progress-item'></div>
</div>
</div>
</div>
);
};
export default JoinInfo;
@import '@/style/covert.scss';
$design_width:1712;
$design_height:856;
.trade-info{
margin-left: 20px;
width: toVw(740,$design_width);
&-card-1{
height: toVh(160,1080);
background: linear-gradient(180deg, #B14BFF 0%, #7330B1 100%);
border-radius: 32px;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
position: relative;
.total-price{
font-size: 4.33rem;
font-weight: bold;
color: #FFFFFF;
line-height: 6.08rem;
&:before{
content: "¥";
font-size: 3rem;
font-weight: bold;
color: #FFFFFF;
}
&-meta{
font-size: 2rem;
color: #F4F5F7;
line-height: 2.75rem;
}
}
.time{
position: absolute;
right: 2.23rem;
top: 1.67rem;
font-size: 1.33rem;
color: rgba(255,255,255,0.6);
line-height: 1.83rem;
}
}
&-card-2{
height: toVh(716,1080);
background: linear-gradient(180deg, rgba(238,239,242,0.9) 0%, #FFFFFF 100%);
box-shadow: 0px 10px 20px 0px rgba(23,29,52,0.2), inset 0px 1px 3px 0px #FFFFFF;
border-image: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.2)) 2 2;
backdrop-filter: blur(10px);
border-radius: 32px;
margin-top: 16px;
.card-header{
&-icon{
background: #F22D40;
}
}
.card-echarts{
width: 100%;
height: toVh(300,1080);
}
.card-table{
padding: 0 35px;
&-header{
display: flex;
align-items: center;
.header-td{
flex: 1;
font-size: 1.3rem;
font-weight: bold;
color: rgba(0,0,0,0.6);
&:first-child{
margin-left: 29px;
}
&:not(:first-child){
text-align: center;
}
}
}
&-tr{
margin-top: 20px;
min-height: 46px;
background: rgba(#D8D8D8,0.2);
display: flex;
align-items: center;
.td{
flex: 1;
font-size: 1.5rem;
font-weight: bold;
color: #000000;
&:first-child{
margin-left: 29px;
}
&:not(:first-child){
text-align: center;
}
}
}
}
}
}
import './index.scss';
import * as echarts from 'echarts';
import { useEffect } from 'react';
const TradeInfo = () => {
// 初始化柱状图
const initEchartsBar = () => {
const myChart = echarts.init(document.getElementById('histogram'));
myChart.setOption({
legend: {
right: 20,
top: 0,
data: [
{
name: '总订单数',
icon: 'pin',
},
{
name: '总交易额',
icon: 'pin',
},
],
},
xAxis: {
data: ['商城', '租赁', '服务'],
axisLabel: {
color: '#000',
fontSize: 15,
},
},
yAxis: {},
series: [
{
name: '总订单数',
type: 'bar',
data: [50, 20, 36],
barWidth: '13',
itemStyle: {
barBorderRadius: [7, 7, 0, 0],
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: '#0B7CFE' },
{ offset: 1, color: '#FFFFFF' },
]),
},
},
{
name: '总交易额',
type: 'bar',
data: [50, 20, 36],
barWidth: '13',
itemStyle: {
barBorderRadius: [7, 7, 0, 0],
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: '#F22D40' },
{ offset: 1, color: '#FFFFFF' },
]),
},
},
],
});
window.addEventListener('resize', function () {
myChart.resize();
});
};
useEffect(() => {
initEchartsBar();
}, []);
return (
<div className='trade-info'>
<div className='trade-info-card-1'>
<div className='total-price'>12987.00</div>
<div className='total-price-meta'>实时交易总额 (GMV)</div>
<div className='time'>09.05更新</div>
</div>
<div className='trade-info-card-2'>
<div className='card-header'>
<div className='card-header-icon'></div>
<div className='card-header-title'>交易详情</div>
</div>
<div className='card-echarts' id='histogram'></div>
<div className='card-table'>
<div className='card-table-header'>
<div className='header-td'>类型</div>
<div className='header-td'>订单总数(个)</div>
<div className='header-td'>交易总额(元)</div>
</div>
<div className='card-table-tr'>
<div className='td'>商城售卖</div>
<div className='td'>123</div>
<div className='td'>¥187.00</div>
</div>
<div className='card-table-tr'>
<div className='td'>商品租赁</div>
<div className='td'>123</div>
<div className='td'>¥187.00</div>
</div>{' '}
<div className='card-table-tr'>
<div className='td'>服务订单</div>
<div className='td'>123</div>
<div className='td'>¥187.00</div>
</div>
</div>
</div>
</div>
);
};
export default TradeInfo;
@import '@/style/covert.scss';
$design_width:1712;
$design_height:856;
.user-info{
width: toVw(424,$design_width);
&-card-1{
height: toVh(160,1080);
background: linear-gradient(360deg, #2DB058 0%, #29B84F 100%);
border-radius: 32px;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
.user-count-value{
font-size: 4.33rem;
font-weight: bold;
color: #FFFFFF;
line-height: 6.08rem;
&:after{
content: '人';
font-size: 3rem;
font-weight: bold;
color: #FFFFFF;
}
}
.user-count-meta{
font-size: 2rem;
color: #F4F5F7;
line-height: 2.75rem;
}
}
&-card-2,&-card-3{
background: linear-gradient(180deg, rgba(238,239,242,0.9) 0%, #FFFFFF 100%);
box-shadow: 0px 10px 20px 0px rgba(23,29,52,0.2), inset 0px 1px 3px 0px #FFFFFF;
border-radius: 32px;
border-image: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.2)) 2 2;
backdrop-filter: blur(10px);
margin-top: 16px;
}
&-card-2,&-card-3{
.card-header{
&-icon{
background: #51B986;
}
}
}
&-card-2{
height: toVh(355,1080);
.card-info-1,.card-info-2{
display: flex;
align-items: center;
.add, .active,.user-auth,.flyer-auth{
flex: 1;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
.label{
font-size: 1.67rem;
color: #5B5B5B;
margin-top: 13px;
line-height: 2.33rem;
}
.value{
font-size: 2.67rem;
line-height: 3.75rem;
font-weight: bold;
}
}
}
.card-info-1{
.add,.active{
.value{
color: #009531;
}
}
}
.card-info-2{
margin-top: 2.17rem;
.user-auth,.flyer-auth{
.value{
color: #FF4C30;
}
}
}
}
&-card-3{
height: toVh(346,1080);
.card-header{
.publish-count{
font-size: 2.33rem;
font-weight: bold;
color: #000000;
line-height: 3.33rem;
}
}
.card-info{
margin-bottom: 26px;
display: flex;
padding: 0 40px 0 35px;
display: flex;
align-items: center;
justify-content: space-between;
.label{
font-size: 1.67rem;
font-weight:bold;
color: #5B5B5B;
line-height: 2.33rem;
}
.value{
font-size: 1.67rem;
font-weight: bold;
color: #000000;
line-height: 2.33rem;
}
}
}
}
import './index.scss';
import { DataDashboardsAPI } from '~/api';
import { useEffect, useState } from 'react';
import { InterDataType } from '~/api/interface';
import { releaseReportDataType, userReportDataType } from '~/api/interface/dataDashboardsType';
// 数据报表-用户信息返回类型
type userInfoDataType = InterDataType<userReportDataType>;
// 数据报表-信息发布返回类型
type releaseReportData = InterDataType<releaseReportDataType>;
const UserInfo = () => {
const [userReportData, setUserReportData] = useState<userInfoDataType>();
const [releaseReportData, setReleaseReportData] = useState<releaseReportData>();
// 获取用户信息数据
const getUserReportData = () => {
DataDashboardsAPI.getUserReportData().then(({ result }) => {
if (result) {
setUserReportData(result);
}
});
};
// 获取信息发布数据
const getReleaseReportData = () => {
DataDashboardsAPI.getReleaseReportData().then(({ result }) => {
if (result) {
setReleaseReportData(result);
}
});
};
useEffect(() => {
getUserReportData();
getReleaseReportData();
}, []);
return (
<div className='user-info'>
<div className='user-info-card-1'>
<div className='user-count-value'>{userReportData?.userCount}</div>
<div className='user-count-meta'>用户总人数</div>
</div>
<div className='user-info-card-2'>
<div className='card-header'>
<div className='card-header-icon'></div>
<div className='card-header-title'>用户概况</div>
</div>
<div className='card-info-1'>
<div className='add'>
<div className='value'>+{userReportData?.yesterdayAddUserCount}</div>
<div className='label'>昨日新增</div>
</div>
<div className='active'>
<div className='value'>{userReportData?.yesterdayActiveUserCount}</div>
<div className='label'>昨日活跃</div>
</div>
</div>
<div className='card-info-2'>
<div className='user-auth'>
<div className='value'>{userReportData?.dronePilotCount}</div>
<div className='label'>实名认证</div>
</div>
<div className='flyer-auth'>
<div className='value'>{userReportData?.realNameCount}</div>
<div className='label'>飞手认证</div>
</div>
</div>
</div>
<div className='user-info-card-3'>
<div className='card-header'>
<div className='card-header-icon'></div>
<div className='card-header-title'>信息发布</div>
<div className='publish-count'>{releaseReportData?.releaseCount}</div>
</div>
<div className='card-info'>
<div className='label'>帖子发布</div>
<div className='value'>{releaseReportData?.postsReleaseCount}</div>
</div>
<div className='card-info'>
<div className='label'>话题发布</div>
<div className='value'>{releaseReportData?.topicReleaseCount}</div>
</div>
<div className='card-info'>
<div className='label'>订单发布</div>
<div className='value'>{releaseReportData?.orderReleaseCount}</div>
</div>
</div>
</div>
);
};
export default UserInfo;
.data-dashboards{
background-color: #161823;
height: 100vh;
width: 100vw;
box-sizing: border-box;
position: relative;
&-header{
height: calc(70vw/21.75);
text-align: center;
img{
width:70vw;
height: 100%;
vertical-align: top;
}
}
&-operate{
width: 100px;
height: 30px;
background: #1F1F1F;
border-radius: 5px;
border: 1px solid #4E4E4E;
position: absolute;
top: 36px;
left: 25px;
font-size: 12px;
font-weight: bold;
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
&:active{
background-color: rgba(0,0,0,0.5);
}
img{
width: 17px;
height: 10px;
margin-right: 4px;
}
}
&-content{
height: calc(100vh - (70vw/21.75));
padding: 25px;
box-sizing: border-box;
.content-card{
background: #EBEEFC;
border-radius: 40px;
height: 100%;
padding:25px;
box-sizing: border-box;
display: flex;
overflow-y:scroll ;
.card-header{
padding: 20px 40px 26px 17px;
display: flex;
align-items: center;
&-icon{
width: 6px;
height: 28px;
}
&-title{
margin-left: 16px;
font-size: 2.33rem;
font-weight: 600;
color: #000000;
line-height: 3.33rem;
flex: 1;
}
}
}
}
}
import './index.scss';
import dataDashboardsHeaderImg from '~/assets/image/data-dashboards-header.png';
import dataDashboardsLogoImg from '~/assets/image/data-dashboards-logo.png';
import UserInfo from './components/userInfo';
import TradeInfo from './components/tradeInfo';
import JoinInfo from './components/joinInfo';
import { authRouterList } from '~/router';
import { useNavigate } from 'react-router-dom';
const DataDashboards = () => {
const navigate = useNavigate();
// 跳转后台
const toBackEndRoute = () => {
authRouterList().then((value) => {
navigate({
pathname: value[1].children?.find((v: any) => !v.meta.hidden)?.path || value[1].path,
});
});
};
return (
<div className='data-dashboards'>
<div className='data-dashboards-header'>
<img src={dataDashboardsHeaderImg} alt='' />
</div>
<div className='data-dashboards-operate' onClick={toBackEndRoute}>
<img src={dataDashboardsLogoImg} alt='' />
<span>进入后台</span>
</div>
<div className='data-dashboards-content'>
<div className='content-card'>
<UserInfo />
<TradeInfo />
<JoinInfo />
</div>
</div>
</div>
);
};
export default DataDashboards;
...@@ -139,7 +139,7 @@ const BaseInfo = forwardRef<any, selfProps>((_props, ref) => { ...@@ -139,7 +139,7 @@ const BaseInfo = forwardRef<any, selfProps>((_props, ref) => {
labelCol={{ span: 2 }} labelCol={{ span: 2 }}
wrapperCol={{ span: 8 }} wrapperCol={{ span: 8 }}
form={baseInfoForm} form={baseInfoForm}
initialValues={{ labelShow: 0, shelfStatus: 1 }} initialValues={{ labelShow: 0, shelfStatus: 1, priceShow: 1 }}
> >
<Form.Item <Form.Item
label='商品名称' label='商品名称'
...@@ -224,6 +224,12 @@ const BaseInfo = forwardRef<any, selfProps>((_props, ref) => { ...@@ -224,6 +224,12 @@ const BaseInfo = forwardRef<any, selfProps>((_props, ref) => {
<Select.Option value={0}>下架</Select.Option> <Select.Option value={0}>下架</Select.Option>
</Select> </Select>
</Form.Item> </Form.Item>
<Form.Item label='显示价格' name='priceShow'>
<Radio.Group>
<Radio value={1}>显示</Radio>
<Radio value={0}>不显示</Radio>
</Radio.Group>
</Form.Item>
<Form.Item label='显示标签' name='labelShow'> <Form.Item label='显示标签' name='labelShow'>
<Radio.Group onChange={labelRadioChange}> <Radio.Group onChange={labelRadioChange}>
<Radio value={1}>显示</Radio> <Radio value={1}>显示</Radio>
......
...@@ -158,6 +158,7 @@ const GoodsAddOrEditOrDetail = () => { ...@@ -158,6 +158,7 @@ const GoodsAddOrEditOrDetail = () => {
shelfStatus: result.shelfStatus, shelfStatus: result.shelfStatus,
labelShow: result.labelShow, labelShow: result.labelShow,
goodsLabel: result.goodsLabel || undefined, goodsLabel: result.goodsLabel || undefined,
priceShow: result.priceShow,
}); });
baseInfoRef.current.setLabelShow(!!result.labelShow); baseInfoRef.current.setLabelShow(!!result.labelShow);
baseInfoRef.current.mediaData.setMainFileList(mainImgList); baseInfoRef.current.mediaData.setMainFileList(mainImgList);
......
...@@ -360,6 +360,33 @@ const GoodsList = () => { ...@@ -360,6 +360,33 @@ const GoodsList = () => {
.join('/'); .join('/');
}; };
// 刘才力
// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment
// @ts-ignore
const handleLiuCaiLiFn = async () => {
const res = await GoodsAPI.getListPageGoodsInfo({
pageNo: 1,
pageSize: 999,
});
if (res && res.code === '200') {
const list = res.result.list || [];
// const list = DataList; // 导入json 导入json 导入json
// console.log('刘才力 --->', list);
for (const i of list) {
const j = list.indexOf(i);
const { result } = await GoodsAPI.getMallGoodsDetails({ id: i?.id });
await GoodsAPI.addMallGoods({
...result,
tradeName: `${i.tradeName}【复制】${j + 1}`,
shelfStatus: 0,
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
id: undefined,
});
}
}
};
useEffect(() => { useEffect(() => {
getCategoryList(); getCategoryList();
pagination.pageNo = Number(searchParams.get('pageNo') || 1); pagination.pageNo = Number(searchParams.get('pageNo') || 1);
...@@ -390,6 +417,7 @@ const GoodsList = () => { ...@@ -390,6 +417,7 @@ const GoodsList = () => {
<SearchBox <SearchBox
search={searchColumns} search={searchColumns}
child={ child={
<>
<Button <Button
type='primary' type='primary'
icon={<PlusOutlined />} icon={<PlusOutlined />}
...@@ -398,6 +426,7 @@ const GoodsList = () => { ...@@ -398,6 +426,7 @@ const GoodsList = () => {
> >
新增商品 新增商品
</Button> </Button>
</>
} }
searchData={searchSuccess} searchData={searchSuccess}
baseRef={searchRef} baseRef={searchRef}
......
.detail-rich-text{ .detail-rich-text{
image,video{ image,video{
max-width: 100%; //max-width: 100%;
} }
} }
.procurement-order-detail{
.procurement-sku-item{
display: flex;
align-items: center;
margin-bottom: 10px;
.sku-img{
width: 48px;
height: 48px;
}
.sku-info{
margin-left: 10px;
line-height: 16px;
text-align: left;
.info-name{
color:#1677ff
}
.info-spec{
margin-top: 10px;
span:not(:last-child){
&:after{
content: ';';
}
}
}
}
}
.pay-item{
display: flex;
margin-bottom: 10px;
&-label{
}
&-content{
display: flex;
align-items: center;
.ant-image{
margin-right: 10px;
margin-bottom: 10px;
}
}
}
.pay-remark{
display: flex;
.label{
white-space: nowrap;
}
.value{
line-height: 15px;
word-break: break-all;
width: 200px;
}
}
}
import { Form, Input, message, Modal, ModalProps } from 'antd';
import { FC, useEffect } from 'react';
import { useSelector } from 'react-redux';
import { listPurchaseOrderType } from '~/api/interface/orderManageType';
import { InterListType } from '~/api/interface';
import { OrderManageAPI } from '~/api';
// 采购订单列表返回类型
type procurementOrderType = InterListType<listPurchaseOrderType>[0];
interface selfProps {
onOk: () => void;
onCancel: () => void;
currentOrderItem: procurementOrderType | undefined;
}
const RemarkModal: FC<ModalProps & selfProps> = ({ open, onCancel, onOk, currentOrderItem }) => {
const [form] = Form.useForm<{ remark: string }>();
const { userInfo } = useSelector((state: any) => state.UserInfo);
const handleCancel = () => {
onCancel();
};
const handleOk = () => {
form.validateFields().then((value) => {
if (currentOrderItem) {
OrderManageAPI[
userInfo.companyInfoVO.companyType === 0 ? 'setUavPoRemark' : 'setUavPoSellerRemark'
]({
id: currentOrderItem?.id,
content: value.remark,
}).then(() => {
message.success('操作成功');
onOk();
form.resetFields();
});
}
});
};
useEffect(() => {
if (currentOrderItem && open) {
form.setFieldValue(
'remark',
userInfo.companyInfoVO.companyType === 0
? currentOrderItem.userRemark || undefined
: currentOrderItem.sellerRemark || undefined,
);
}
}, [currentOrderItem, open]);
return (
<Modal open={open} onCancel={handleCancel} onOk={handleOk} title='备注'>
<Form form={form}>
<Form.Item name='remark'>
<Input.TextArea placeholder='请输入备注' maxLength={70} showCount />
</Form.Item>
</Form>
</Modal>
);
};
export default RemarkModal;
import { Form, Image, Input, message, Modal, ModalProps, Table } from 'antd';
import { FC, useState } from 'react';
import { Uploader } from '~/components/uploader';
import { UploadOutlined } from '@ant-design/icons';
import { UploadFile } from 'antd/es/upload/interface';
import { OrderManageAPI } from '~/api';
import { listPurchaseOrderType } from '~/api/interface/orderManageType';
import { InterListType } from '~/api/interface';
import { ColumnsType } from 'antd/es/table/InternalTable';
// 采购订单列表返回类型
type procurementOrderType = InterListType<listPurchaseOrderType>[0];
interface selfProps {
onOk: () => void;
onCancel: () => void;
currentOrderItem: procurementOrderType | undefined;
}
const UploadPayment: FC<ModalProps & selfProps> = ({ open, currentOrderItem, onCancel, onOk }) => {
const [form] = Form.useForm<{ payImgList: string; payRemark: string }>();
const [fileList, setFileList] = useState<UploadFile[]>([]);
const tableColumns: ColumnsType<procurementOrderType['payDTOS'][0]> = [
{
title: '序号',
align: 'center',
render: (_text: any, _record, index) => index + 1,
},
{
title: '凭证',
align: 'center',
dataIndex: 'payImgList',
render: (text: string) =>
JSON.parse(text || '[]').map((v: any, index: number) => (
<Image src={v.filePath} width={50} height={50} key={index} />
)),
},
{
title: '状态',
align: 'center',
dataIndex: 'checkStatus',
render: (text: number) => (text === 0 ? '审批中' : text === 1 ? '已通过' : '未通过'),
},
{
title: '备注',
align: 'center',
width: '10%',
ellipsis: true,
dataIndex: 'payRemark',
},
];
// 上传成功
const uploadSuccess = (value: any) => {
setFileList([...value]);
form.setFieldValue('payImgList', JSON.stringify(value.map((v: any) => ({ filePath: v.url }))));
};
const handleOk = () => {
if (currentOrderItem) {
form.validateFields().then((values) => {
OrderManageAPI.uploadPOrder({ ...values, uavOrderId: currentOrderItem.id }).then(
({ code }) => {
if (code === '200') {
message.success('上传凭证成功'), form.resetFields();
setFileList([]);
onOk();
}
},
);
});
}
};
const handleCancel = () => {
form.resetFields();
setFileList([]);
onCancel();
};
return (
<Modal open={open} onOk={handleOk} onCancel={handleCancel} title='上传付款凭证' width={1000}>
<Form form={form} labelCol={{ span: 2 }} wrapperCol={{ span: 15 }}>
<Form.Item
label='凭证'
rules={[{ required: true, message: '请上传付款凭证' }]}
name='payImgList'
>
<Uploader
fileUpload
listType='picture-card'
onChange={uploadSuccess}
fileLength={4}
defaultFileList={fileList}
>
<UploadOutlined />
</Uploader>
</Form.Item>
<Form.Item
label='凭证说明'
name='payRemark'
rules={[{ required: true, message: '请输入凭证说明' }]}
>
<Input.TextArea placeholder='请输入凭证说明' maxLength={70} rows={4} showCount />
</Form.Item>
</Form>
{currentOrderItem?.payDTOS?.length ? (
<Table
bordered
columns={tableColumns}
rowKey='id'
dataSource={currentOrderItem.payDTOS}
pagination={false}
/>
) : (
''
)}
</Modal>
);
};
export default UploadPayment;
.procurement-order-list{
.goods-text {
height: 60px;
width: 100%;
text-align: center;
line-height: 60px;
}
.procurement-sku-item{
display: flex;
align-items: center;
margin-bottom: 10px;
.sku-img{
width: 48px;
height: 48px;
}
.sku-info{
margin-left: 10px;
line-height: 16px;
text-align: left;
.info-name{
color:#1677ff
}
.info-spec{
margin-top: 10px;
span:not(:last-child){
&:after{
content: ';';
}
}
}
}
}
}
...@@ -3,7 +3,7 @@ import { Button, Steps } from 'antd'; ...@@ -3,7 +3,7 @@ import { Button, Steps } from 'antd';
import { mallOrderDetailType } from '~/api/interface/orderManageType'; import { mallOrderDetailType } from '~/api/interface/orderManageType';
import { InterDataType } from '~/api/interface'; import { InterDataType } from '~/api/interface';
import { OrderManageAPI } from '~/api'; import { OrderManageAPI } from '~/api';
import LogisticsStepModal from '../logisticsStepModal'; import LogisticsStepModal from '~/components/order/productOrder/logisticsStepModal';
// 接口返回的类型 // 接口返回的类型
type DataType = InterDataType<mallOrderDetailType>; type DataType = InterDataType<mallOrderDetailType>;
......
...@@ -79,15 +79,6 @@ const DetailInformation: React.FC<PropsType> = (props) => { ...@@ -79,15 +79,6 @@ const DetailInformation: React.FC<PropsType> = (props) => {
<div className='detail-text'> <div className='detail-text'>
<span className='item'>订单编号:{detail?.orderNo}</span> <span className='item'>订单编号:{detail?.orderNo}</span>
<span className='item'>创建时间:{detail?.createTime}</span> <span className='item'>创建时间:{detail?.createTime}</span>
{/*<span className={'item'} style={{ display: 'none' }}>*/}
{/* 合同编号:UAV202334741131*/}
{/*</span>*/}
{/*<span className={'item'}>*/}
{/* 订单租期:*/}
{/* {dayjs(detail?.startDate).format('YYYY-MM-DD')}*/}
{/* {' ~ '}*/}
{/* {dayjs(detail?.endDate).format('YYYY-MM-DD')}*/}
{/*</span>*/}
</div> </div>
<Table <Table
size='small' size='small'
......
.detail-purchaser{
.remark{
display: flex;
.label{
white-space: nowrap;
}
.value{
line-height: 15px;
word-break: break-all;
}
}
.pay-img-wrap{
display: flex;
.detail-image {
display: flex;
justify-content: flex-start;
margin-bottom: 10px;
flex-wrap: wrap;
.image {
width: 68px;
height: 68px;
margin-right: 10px;
margin-bottom: 10px;
}
}
}
}
import React from 'react'; import React from 'react';
import { Button, Image } from 'antd'; import { Button, Image } 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';
import './index.scss';
// 接口返回的类型 // 接口返回的类型
type DataType = InterDataType<mallOrderDetailType>; type DataType = InterDataType<mallOrderDetailType>;
...@@ -11,54 +16,93 @@ type PropsType = { ...@@ -11,54 +16,93 @@ 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>*/} }
};
{/*<div className={'detail-title'}>付款凭证</div>*/} return (
{/*<div className={'detail-text'}>预付款:</div>*/} <div className='detail-purchaser detail-half'>
{/*<div className={'detail-image'}>*/} <div className='detail-title'>买家信息</div>
{/* {[*/} <div className='detail-text'>UID:{detail?.userAccountId}</div>
{/* 'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/infrastructure-05-05.png',*/} <div className='detail-text'>姓名: {detail?.userName || detail?.nickname}</div>
{/* 'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/infrastructure-05-05.png',*/} <div className='detail-text'>手机号:{detail?.phoneNum} </div>
{/* ].map((i, j) => (*/} <div className='detail-text remark'>
{/* <Image key={j} className={'image'} src={i} alt='付款凭证' />*/} <div className='label'>备注:</div>
{/* ))}*/} <div className='value'>{detail?.userRemark}</div>
{/*</div>*/} </div>
{/*<div className={'detail-text'}>尾款:</div>*/} {detail?.contractInfoDTO ? (
{/*<div className={'detail-image'}>*/} <div>
{/* {[*/} <div className='detail-title'>合同信息</div>
{/* 'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/infrastructure-05-05.png',*/} <div className='detail-text'>合同编号: {detail.contractInfoDTO.contractNo}</div>
{/* 'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/infrastructure-05-05.png',*/} <div className='detail-text'>合同标题: {detail.contractInfoDTO.contractTitle}</div>
{/* ].map((i, j) => (*/} <div className='detail-text'>
{/* <Image key={j} className={'image'} src={i} alt='付款凭证' />*/} 合同状态:
{/* ))}*/} <span style={{ color: 'red' }}>
{/*</div>*/} {
{/*<div className={'detail-text'}>全款:</div>*/} contractStatusList.find((v) => v.value === detail.contractInfoDTO?.signStatus)
{/*<div className={'detail-image'}>*/} ?.label
{/* {[*/} }
{/* 'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/infrastructure-05-05.png',*/} </span>
{/* 'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/infrastructure-05-05.png',*/} </div>
{/* ].map((i, j) => (*/} <div className='detail-text'>
{/* <Image key={j} className={'image'} src={i} alt='付款凭证' />*/} 合同操作:
{/* ))}*/} <Button type='link' onClick={contractPreview}>
{/*</div>*/} 查看
</Button>
<Button type='link' onClick={downloadContract}>
下载
</Button>
</div>
</div>
) : (
''
)}
{detail?.payDTOList ? (
<>
<div className='detail-title'>付款凭证</div>
{detail?.payDTOList.map((v, index) => (
<div key={index}>
<div className='pay-img-wrap'>
<div className='detail-text'>
第{index + 1}次上传
<span style={{ color: 'red' }}>
({v.checkStatus === 0 ? '待审批' : v.checkStatus === 1 ? '已通过' : '未通过'})
</span>
</div>
<div className='detail-image'>
{JSON.parse(v.payImgList).map((i: any, j: number) => (
<Image key={j} className='image' src={i.filePath} alt='付款凭证' />
))}
</div>
</div>
<div className='detail-text remark'>
<div className='label'> 第{index + 1}次上传凭证说明:</div>
<div className='value'>{v.payRemark}</div>
</div>
</div>
))}
</>
) : (
''
)}
</div> </div>
); );
}; };
......
...@@ -43,23 +43,5 @@ ...@@ -43,23 +43,5 @@
margin-right: 20px; margin-right: 20px;
} }
} }
.detail-image {
display: flex;
justify-content: flex-start;
margin-left: 56px;
margin-top: -20px;
margin-bottom: 10px;
.image {
width: 68px;
height: 68px;
//margin-right: 10px;
}
.ant-image {
margin-right: 10px;
}
}
} }
} }
import { FC } from 'react';
import { Form, Modal, ModalProps, Radio } from 'antd';
interface selfProps {
onCancel: () => void;
onOk: () => void;
}
const ApprovalOrder: FC<ModalProps & selfProps> = ({ open, onCancel, onOk }) => {
const handleOk = () => {
onOk();
};
const handleCancel = () => {
onCancel();
};
return (
<Modal open={open} title='凭证审批' onOk={handleOk} onCancel={handleCancel}>
<Form labelCol={{ span: 4 }} wrapperCol={{ span: 12 }}>
<Form.Item label='状态'>
<Radio.Group>
<Radio value={1}>通过</Radio>
<Radio value={2}>驳回</Radio>
</Radio.Group>
</Form.Item>
<Form.Item label='凭证'></Form.Item>
</Form>
</Modal>
);
};
export default ApprovalOrder;
...@@ -39,7 +39,7 @@ const RemarkModal: FC<ModalProps & selfProps> = ({ open, onCancel, onOk, mallOrd ...@@ -39,7 +39,7 @@ const RemarkModal: FC<ModalProps & selfProps> = ({ open, onCancel, onOk, mallOrd
return ( return (
<Modal open={open} onOk={handleOk} onCancel={handleCancel} title='备注'> <Modal open={open} onOk={handleOk} onCancel={handleCancel} title='备注'>
<Form labelCol={{ span: 2 }} wrapperCol={{ span: 20 }} form={form}> <Form labelCol={{ span: 2 }} wrapperCol={{ span: 20 }} form={form}>
<Form.Item label='备注' name='content'> <Form.Item name='content'>
<Input.TextArea placeholder='请输入备注' maxLength={70} showCount rows={4} /> <Input.TextArea placeholder='请输入备注' maxLength={70} showCount rows={4} />
</Form.Item> </Form.Item>
</Form> </Form>
......
import { FC } from 'react';
import { Button, Cascader, Col, Form, Input, Modal, ModalProps, Row, Table, Upload } from 'antd';
import './index.scss';
import { ColumnsType } from 'antd/es/table/InternalTable';
import { UploadOutlined } from '@ant-design/icons';
interface selfProps {
onCancel: () => void;
onOk: () => void;
}
const SureOrder: FC<ModalProps & selfProps> = ({ open, onOk, onCancel }) => {
const tableColumns: ColumnsType<any> = [
{
title: '商品',
align: 'center',
},
{
title: '价格',
align: 'center',
},
{
title: '数量',
align: 'center',
},
];
const handleOk = () => {
onOk();
};
const handleCancel = () => {
onCancel();
};
return (
<Modal open={open} title='确认订单' onOk={handleOk} onCancel={handleCancel} width={800}>
<div className='sure-order'>
<div className='address-info'>
<div className='address-info-title'>收货信息:</div>
<div className='address-info-form'>
<Form labelCol={{ span: 5 }} wrapperCol={{ span: 16 }}>
<Form.Item
label='收货人'
name='takeName'
// rules={[{ required: true, validator: validateUserName }]}
>
<Input placeholder='请输入收货人' style={{ width: '300px' }} />
</Form.Item>
<Form.Item
label='联系方式'
name='takePhone'
// rules={[{ required: true, validator: validatePhone }]}
>
<Input placeholder='请输入联系方式' style={{ width: '300px' }} />
</Form.Item>
<Form.Item
label='所属地区'
rules={[{ required: true, message: '请输入所属地区' }]}
name='takeRegion'
>
<Cascader
// options={location}
style={{ width: '300px' }}
fieldNames={{
label: 'name',
value: 'name',
children: 'childInfo',
}}
placeholder='请选择所属地区'
/>
</Form.Item>
<Form.Item
label='详细地址'
name='takeAddress'
rules={[{ required: true, message: '请输入详细地址' }]}
>
<Input.TextArea
maxLength={250}
placeholder='请输入详细地址'
showCount
rows={4}
style={{ width: '300px' }}
/>
</Form.Item>
</Form>
</div>
</div>
<div className='order-info'>
<div className='order-info-title'>订单信息:</div>
<Row>
<Col span={3}></Col>
<Col span={16}>
<div className='order-info-table'>
<Table bordered columns={tableColumns} />
</div>
<div className='order-info-form'>
<Form wrapperCol={{ span: 10 }} labelCol={{ span: 3 }}>
<Form.Item label='订单交期'>
<Input placeholder='请输入订单交期' />
</Form.Item>
<Form.Item label='付款期限'>
<Input placeholder='请输入付款期限' />
</Form.Item>
</Form>
</div>
</Col>
</Row>
</div>
<div className='contract-info'>
<div className='contract-info-title'>合同签署:</div>
<div className='contract-info-form'>
<Form labelCol={{ span: 4 }} wrapperCol={{ span: 16 }}>
<Form.Item label='合同'>
<Upload>
<Button icon={<UploadOutlined />}>上传</Button>
</Upload>
</Form.Item>
</Form>
</div>
</div>
</div>
</Modal>
);
};
export default SureOrder;
import { FC } from 'react';
import { Modal, ModalProps } from 'antd';
interface selfProps {
onCancel: () => void;
onOk: () => void;
}
const TailPaymentOrder: FC<ModalProps & selfProps> = ({ open, onOk, onCancel }) => {
const handleOk = () => {
onOk();
};
const handleCancel = () => {
onCancel();
};
return <Modal open={open} title='确认尾款' onOk={handleOk} onCancel={handleCancel} />;
};
export default TailPaymentOrder;
.order-table-item { .product-order{
.item-td {
position: absolute;
top: 0;
left: 0;
height: 40px;
width: 100%;
background: rgba(22, 119, 255, 0.1);
line-height: 40px;
}
.item-tr {
min-height: 50px;
width: 100%;
margin-top: 50px;
.mall-sku-item{ .mall-sku-item{
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -38,7 +24,6 @@ ...@@ -38,7 +24,6 @@
} }
} }
} }
}
.goods-text { .goods-text {
height: 60px; height: 60px;
width: 100%; width: 100%;
......
...@@ -352,6 +352,7 @@ const RentList = () => { ...@@ -352,6 +352,7 @@ const RentList = () => {
<SearchBox <SearchBox
search={searchColumns} search={searchColumns}
child={ child={
<>
<Button <Button
icon={<PlusOutlined />} icon={<PlusOutlined />}
type='primary' type='primary'
...@@ -360,6 +361,7 @@ const RentList = () => { ...@@ -360,6 +361,7 @@ const RentList = () => {
> >
新增商品 新增商品
</Button> </Button>
</>
} }
searchData={searchSuccess} searchData={searchSuccess}
baseRef={searchRef} baseRef={searchRef}
......
import { useEffect, useState } from 'react';
import { FddInterfaceAPI } from '~/api';
import { decode } from 'js-base64';
const RealNameAuth = () => {
const [authUrl, setAuthUrl] = useState<string>('');
// 获取第三方认证连接
const getCompanyVerifyUrl = () => {
FddInterfaceAPI.getCompanyVerifyUrl({ port: 1 }).then(({ result }) => {
if (result) {
setAuthUrl(decode(result));
}
});
};
useEffect(() => {
getCompanyVerifyUrl();
}, []);
return (
<div className='real-name-auth'>
<iframe src={authUrl} title='实名认证' style={{ width: '100%', height: '1000px' }} />
</div>
);
};
export default RealNameAuth;
...@@ -26,7 +26,9 @@ function PrivateRouter() { ...@@ -26,7 +26,9 @@ function PrivateRouter() {
const routes = [...value, ...whiteRouterList]; const routes = [...value, ...whiteRouterList];
setRouter(routes); setRouter(routes);
if (path === '/') { if (path === '/') {
navigate({ pathname: value[0].children?.find((v: any) => !v.meta.hidden)?.path }); navigate({
pathname: value[0].children?.find((v: any) => !v.meta.hidden)?.path || value[0].path,
});
} }
} else { } else {
message.warning('该账号暂无权限'); message.warning('该账号暂无权限');
......
...@@ -36,11 +36,12 @@ import { ...@@ -36,11 +36,12 @@ import {
VerifiedOutlined, VerifiedOutlined,
AccountBookOutlined, AccountBookOutlined,
EnvironmentOutlined, EnvironmentOutlined,
BarChartOutlined,
} from '@ant-design/icons'; } from '@ant-design/icons';
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
import { AgnosticIndexRouteObject } from '@remix-run/router';
import { Spin } from 'antd'; import { Spin } from 'antd';
// 数据看板
const DataBoardView = React.lazy(() => import('~/pages/dataDashboards'));
// 登录 // 登录
import LoginView from '~/pages/common/login'; import LoginView from '~/pages/common/login';
...@@ -168,6 +169,7 @@ import LimitInfo from '~/pages/systemManage/limitManage/limitInfo'; ...@@ -168,6 +169,7 @@ import LimitInfo from '~/pages/systemManage/limitManage/limitInfo';
import CustomListDetail from '~/pages/customManage/customList/detail'; import CustomListDetail from '~/pages/customManage/customList/detail';
import ServiceCategoryDetail from '~/pages/categoryManage/serviceCategoryList/detail'; import ServiceCategoryDetail from '~/pages/categoryManage/serviceCategoryList/detail';
const AddressManageView = React.lazy(() => import('~/pages/systemManage/addressManage')); const AddressManageView = React.lazy(() => import('~/pages/systemManage/addressManage'));
const RealNameAuthView = React.lazy(() => import('~/pages/systemManage/realNameAuth'));
// const IndustryListView = React.lazy(() => import('~/pages/mallManage/industryManage/industryList')); //行业列表 // const IndustryListView = React.lazy(() => import('~/pages/mallManage/industryManage/industryList')); //行业列表
// const IndustryDetailView = React.lazy( // const IndustryDetailView = React.lazy(
...@@ -184,7 +186,7 @@ const AddressManageView = React.lazy(() => import('~/pages/systemManage/addressM ...@@ -184,7 +186,7 @@ const AddressManageView = React.lazy(() => import('~/pages/systemManage/addressM
// const CouponDetailed = React.lazy(() => import('src/pages/couponManage/couponDetailed')); //优惠券明细 // const CouponDetailed = React.lazy(() => import('src/pages/couponManage/couponDetailed')); //优惠券明细
export interface RouteObjectType { export interface RouteObjectType {
path: AgnosticIndexRouteObject['path']; path: string;
element: any; element: any;
errorElement?: React.ReactNode | null; errorElement?: React.ReactNode | null;
children?: Array<RouteObject & RouteObjectType>; children?: Array<RouteObject & RouteObjectType>;
...@@ -210,6 +212,7 @@ const withLoadingComponent = (comp: JSX.Element) => ( ...@@ -210,6 +212,7 @@ const withLoadingComponent = (comp: JSX.Element) => (
{comp} {comp}
</React.Suspense> </React.Suspense>
); );
// 路由白名单 // 路由白名单
export const whiteRouterList: Array<RouteObject & RouteObjectType> = [ export const whiteRouterList: Array<RouteObject & RouteObjectType> = [
{ {
...@@ -226,6 +229,18 @@ export const whiteRouterList: Array<RouteObject & RouteObjectType> = [ ...@@ -226,6 +229,18 @@ export const whiteRouterList: Array<RouteObject & RouteObjectType> = [
// 路由数组 // 路由数组
export const routerList: Array<RouteObjectType> = [ export const routerList: Array<RouteObjectType> = [
// {
// path: '/dataDashboards',
// element: withLoadingComponent(<DataBoardView />),
// errorElement: <ErrorPage />,
// meta: {
// icon: <BarChartOutlined />,
// title: '数据看板',
// id: 300,
// hidden: true,
// develop: true,
// },
// },
{ {
path: '/customManage', path: '/customManage',
element: <LayoutView />, element: <LayoutView />,
...@@ -1271,7 +1286,7 @@ export const routerList: Array<RouteObjectType> = [ ...@@ -1271,7 +1286,7 @@ export const routerList: Array<RouteObjectType> = [
element: withLoadingComponent(<CompanyDetailView />), element: withLoadingComponent(<CompanyDetailView />),
errorElement: <ErrorPage />, errorElement: <ErrorPage />,
meta: { meta: {
id: 1450, id: 1460,
title: '单位详情', title: '单位详情',
icon: <BankOutlined />, icon: <BankOutlined />,
hidden: true, hidden: true,
...@@ -1288,6 +1303,17 @@ export const routerList: Array<RouteObjectType> = [ ...@@ -1288,6 +1303,17 @@ export const routerList: Array<RouteObjectType> = [
icon: <EnvironmentOutlined />, icon: <EnvironmentOutlined />,
}, },
}, },
{
path: '/systemManage/realNameAuth',
element: withLoadingComponent(<RealNameAuthView />),
errorElement: <ErrorPage />,
meta: {
id: 1450,
title: '实名认证',
icon: <VerifiedOutlined />,
develop: true,
},
},
], ],
}, },
]; ];
@use "sass:math";
@function toVw($px,$designWidth){
@return math.div($px, $designWidth) * 100vw
}
@function toVh($px,$designHeight){
@return math.div($px,$designHeight) * 100vh
}
...@@ -96,3 +96,94 @@ export const withdrawStatusList = [ ...@@ -96,3 +96,94 @@ 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,
},
];
// 文件字典
export const fileTypeList = [
{
label: 'png',
value: 'image/png',
},
{
label: 'jpeg',
value: 'image/jpeg',
},
{
label: 'jpg',
value: 'image/jpg',
},
{
label: 'gif',
value: 'image/gif',
},
{
label: 'mp4',
value: 'video/mp4',
},
{
label: 'avi',
value: 'video/avi',
},
{
label: 'wmv',
value: 'video/wmv',
},
{
label: 'rmvb',
value: 'video/rmvb',
},
{
label: 'doc',
value: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
},
{
label: 'doc',
value: 'application/msword',
},
{
label: 'excel',
value: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
},
{
label: 'excel',
value: 'application/vnd.ms-excel',
},
{
label: 'pdf',
value: 'application/pdf',
},
{
label: 'ppt',
value: 'application/vnd.ms-powerpoint',
},
{
label: 'ppt',
value: 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
},
];
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论