Commit 6f40bdc7 authored by Bill's avatar Bill

Merge branch 'dev' of 10.0.0.22:lingxi/lingxi-business-paltform into dev

parents 0a770e4e 1585f1ea
......@@ -11,6 +11,7 @@ const config: any = {
"process.env.BACK_GATEWAY": process.env.BACK_GATEWAY
},
// layout: {},
esbuild: {},
antd: {},
locale: {
antd: true,
......
......@@ -184,15 +184,7 @@ const CommodityRoute = {
icon: 'smile',
hideInMenu: true,
component: './repositories/adjustRepository',
},
{
path: '/memberCenter/commodityAbility/repositories/viewRepository',
name: 'viewRepository',
key: 'viewRepository',
icon: 'smile',
hideInMenu: true,
component: './repositories/viewRepository',
},
}
]
}
......
......@@ -3,11 +3,12 @@
* @Date: 2020-08-19 15:33:27
* @LastEditors: XieZhiXiong
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-09-29 10:42:23
* @LastEditTime: 2020-09-29 20:46:13
*/
const payandSettleRoute = {
path:'/memberCenter/payandSettle',
name:'payandSettle',
key: 'payandSettle',
icon:'smile',
routes:[
{
......@@ -25,31 +26,48 @@ const payandSettleRoute = {
},
// 授信申请
{
path:'/memberCenter/payandSettle/creditApplication',
name:'creditApplication',
path: '/memberCenter/payandSettle/creditApplication',
name: 'creditApplication',
routes: [
// 授信额度管理
{
path: '/memberCenter/payandSettle/creditApplication/quotaMenage',
name: 'quotaMenage',
component: '@/pages/payandSettle/creditApplication/quotaMenage/index',
},
// 授信额度管理详情
{
path: '/memberCenter/payandSettle/creditApplication/quotaMenage/detail',
name: 'quotaMenageDetail',
component: '@/pages/payandSettle/creditApplication/quotaMenage/detail/index',
hideInMenu: true,
},
// 授信申请单查询
{
path: '/memberCenter/payandSettle/creditApplication/quotaFormQuery',
name: 'quotaFormQuery',
component: '@/pages/payandSettle/creditApplication/quotaFormQuery/index',
},
// 授信申请单详情
{
path: '/memberCenter/payandSettle/creditApplication/quotaFormQuery/detail',
name: 'quotaFormQueryDetail',
component: '@/pages/payandSettle/creditApplication/quotaFormQuery/detail',
hideInMenu: true,
},
// 待提交授信申请单
{
path: '/memberCenter/payandSettle/creditApplication/quotaPrSubmit',
name: 'quotaPrSubmit',
component: '@/pages/payandSettle/creditApplication/quotaPrSubmit/index',
},
// 待提交授信申请单详情
{
path: '/memberCenter/payandSettle/creditApplication/quotaPrSubmit/detail',
name: 'quotaPrSubmitDetail',
component: '@/pages/payandSettle/creditApplication/quotaPrSubmit/detail',
hideInMenu: true,
},
],
},
// 资金账户
......
......@@ -304,6 +304,12 @@ const TranactionRoute = {
path: '/memberCenter/tranactionAbility/goodsOffer/pendingSubmit',
name: 'pendingSubmit',
component: '@/pages/transaction/goodsOffer/pendingSubmit'
},
{
path: '/memberCenter/tranactionAbility/goodsOffer/components/details',
name: 'details',
hideInMenu: true,
component: '@/pages/transaction/goodsOffer/components/details'
}
]
},
......
......@@ -36,6 +36,7 @@
"@formily/antd": "^1.3.3",
"@formily/antd-components": "^1.3.3",
"@umijs/hooks": "^1.9.3",
"@umijs/plugin-esbuild": "^1.0.1",
"@umijs/preset-react": "1.x",
"@umijs/test": "^3.2.0",
"antd-img-crop": "^3.12.0",
......
......@@ -105,9 +105,11 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
const animationFrameId = requestAnimationFrame(() => {
setSelectedKeys(keys);
});
console.log(currentRouter, "currentRouter")
return () =>
window.cancelAnimationFrame &&
window.cancelAnimationFrame(animationFrameId);
}, [location.pathname]);
useEffect(() => {
......@@ -122,9 +124,10 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
setOpenKeys([])
}
}, [currentRouter, location.pathname, collapsed])
return (
<ProLayout
title={``}
pageTitleRender={() => currentRouter ? currentRouter.name : window.location.href}
style={{ minHeight: '100vh' }}
logo={logo}
formatMessage={formatMessage}
......
......@@ -8,6 +8,7 @@ import OuterSider from './OuterSide'
import { GlobalConfig } from '@/global/config'
import styles from '../styles/MenuSlider.less'
import { getRouters } from '@/utils/auth';
import { isDev } from '@/constants';
const { Sider } = Layout
const { SubMenu } = Menu;
......@@ -35,7 +36,7 @@ const MenuSlider: React.FC<MenuSliderProps> = (props) => {
if (!!menuArray && menuArray.length > 0) {
return menuArray.map((item: any) => {
// 不存在路由表内或者 需要隐藏
if (item.hideInMenu || !getRouters().includes(item.path)) {
if (item.hideInMenu || (!getRouters().includes(item.path) && !isDev)) {
return null
}
......
/*
* @Author: LeeJiancong
* @Date: 2020-07-13 14:08:50
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-09-29 19:26:53
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-09-29 20:36:12
*/
export default {
......@@ -126,6 +126,7 @@ export default {
'menu.tranactionAbility.goodsOffer.enquiryOrder': '询价单查询',
'menu.tranactionAbility.goodsOffer.addEnquiryOrder': '待新增询价单',
'menu.tranactionAbility.goodsOffer.add': '新建询价单',
'menu.tranactionAbility.goodsOffer.details': '新建询价单',
'menu.tranactionAbility.goodsOffer.pendingReviewOne': '待审核询价单(一级)',
'menu.tranactionAbility.goodsOffer.pendingReviewTwo': '待审核询价单(二级)',
'menu.tranactionAbility.goodsOffer.pendingSubmit': '待提交询价单',
......@@ -252,6 +253,8 @@ export default {
'menu.payandSettle.creditApplication.quotaMenageDetail': '授信额度管理',
'menu.payandSettle.creditApplication.quotaFormQuery': '授信申请单查询',
'menu.payandSettle.creditApplication.quotaFormQueryDetail': '授信申请单详情',
'menu.payandSettle.creditApplication.quotaPrSubmit': '待提交授信申请单',
'menu.payandSettle.creditApplication.quotaPrSubmitDetail': '待提交授信申请单详情',
'menu.payandSettle.capitalAccounts': '资金账户',
'menu.payandSettle.capitalAccounts.accountLists': '账户管理',
'menu.payandSettle.capitalAccounts.accountDetail': '账户详情',
......
......@@ -81,7 +81,7 @@ export const editModalSchema: ISchema = {
},
],
},
enclosure: {
attachment: {
type: 'string',
title: '申请附件',
'x-component': 'Upload',
......@@ -89,7 +89,7 @@ export const editModalSchema: ISchema = {
action: '/api/file/file/upload/prefix',
data: {
fileType: UPLOAD_TYPE,
prefix: '/creditApplication/',
prefix: '/creditApplication/applicationAttachment/',
},
beforeUpload: '{{beforeUpload}}',
accept: '.png, .jpg, .jpeg',
......
......@@ -108,7 +108,7 @@ const QuotaFormQueryDetail: React.FC = () => {
</Suspense>
<Suspense fallback={null}>
<QuotaApplicationInfo editable={true} />
<QuotaApplicationInfo />
</Suspense>
<Suspense fallback={null}>
......
import React from 'react';
import React, { useState } from 'react';
import {
Tabs,
Descriptions,
......@@ -8,11 +8,14 @@ import {
import MellowCard from '@/components/MellowCard';
import StatusTag from '@/components/StatusTag';
import TradeWrap from '../TradeWrap';
import CheckVoucherModal from '../CheckVoucherModal';
import styles from './index.less';
const { TabPane } = Tabs;
const BillInfo: React.FC = () => {
const [voucherVisible, setVoucherVisible] = useState(false);
return (
<MellowCard
style={{
......@@ -49,7 +52,7 @@ const BillInfo: React.FC = () => {
<Descriptions.Item label="交易流水号">
<Row justify="space-between">
<Col span={12}>
<a>20200820000010</a>
<a onClick={() => setVoucherVisible(true)}>20200820000010</a>
</Col>
<Col
span={10}
......@@ -85,6 +88,31 @@ const BillInfo: React.FC = () => {
</TabPane>
</Tabs>
</div>
<CheckVoucherModal
visible={voucherVisible}
fileList={[
{
uid: '1',
name: 'xxx.png',
status: 'done',
url: 'http://www.baidu.com/xxx.png',
},
{
uid: '2',
name: 'yyy.png',
status: 'done',
url: 'http://www.baidu.com/yyy.png',
},
{
uid: '3',
name: 'zzz.png',
status: 'done',
url: 'http://www.baidu.com/zzz.png',
},
]}
onCancel={() => setVoucherVisible(false)}
/>
</MellowCard>
);
};
......
import React from 'react';
import { Modal, Upload } from 'antd';
import styles from './index.less';
interface CheckVoucherModalProps {
visible: boolean;
fileList: {
uid: string,
name: string,
status: string,
url: string,
}[],
onCancel: () => void;
};
const CheckVoucherModal: React.FC<CheckVoucherModalProps> = ({
visible,
fileList = [],
onCancel,
}) => {
const handleCancel = () => {
if (onCancel) {
onCancel();
}
};
return (
<Modal
title="查看凭证"
width={576}
visible={visible}
onCancel={handleCancel}
footer={null}
bodyStyle={{
padding: '16px 24px 24px',
}}
destroyOnClose
>
<Upload
defaultFileList={fileList}
disabled
/>
</Modal>
);
};
export default CheckVoucherModal;
\ No newline at end of file
import { ISchema } from '@formily/antd';
import { UPLOAD_TYPE } from '@/constants';
export const repaymentModalSchema: ISchema = {
type: 'object',
properties: {
MEGA_LAYOUT: {
type: 'object',
'x-component': 'mega-layout',
'x-component-props': {
labelAlign: 'top',
full: true,
},
properties: {
amount: {
type: 'string',
title: '还款金额',
'x-component-props': {
placeholder: '',
addonBefore: '¥',
},
'x-rules': [
{
required: true,
message: '请填写还款金额',
},
],
},
amountSlide: {
type: 'number',
title: '',
'x-component': 'range',
'x-component-props': {
min: 0,
max: 20000,
marks: [0, 5000, 10000, 15000, 20000],
},
},
payType: {
type: 'number',
enum: [
{
label: '线上支付方式',
value: 1,
},
{
label: '线下支付方式',
value: 2,
},
],
default: 1,
title: '选择支付方式',
'x-component-props': {
placeholder: '请选择',
},
'x-rules': [
{
required: true,
message: '请选择支付方式',
},
],
},
payChannels: {
type: 'string',
title: '选择支付渠道',
enum: [
{
label: '微信',
value: 1,
},
{
label: '支付宝',
value: 2,
},
{
label: '银联',
value: 3,
},
],
default: 1,
'x-component-props': {
placeholder: '请选择',
},
'x-rules': [
{
required: true,
message: '请选择支付渠道',
},
],
},
},
},
},
};
export const uploadVoucherModalSchema: ISchema = {
type: 'object',
properties: {
MEGA_LAYOUT: {
type: 'object',
'x-component': 'mega-layout',
'x-component-props': {
labelCol: 6,
wrapperCol: 18,
labelAlign: 'left',
full: true,
},
properties: {
accountName: {
type: 'string',
title: '还款账户名称',
default: '温州市隆昌皮具有限公司',
'x-component': 'Text',
'x-component-props': {
},
},
bankAccount: {
type: 'string',
title: '银行账号',
default: '6214 7812 3456 7891 1234',
'x-component': 'Text',
'x-component-props': {
},
},
bod: {
type: 'string',
title: '开户行',
default: '中国建设银行广州市分行营业部',
'x-component': 'Text',
'x-component-props': {
},
},
voucher: {
type: 'string',
title: '上传支付凭证',
'x-component': 'Upload',
'x-component-props': {
action: '/api/file/file/upload/prefix',
data: {
fileType: UPLOAD_TYPE,
prefix: '/creditApplication/paymentVoucher/',
},
beforeUpload: '{{beforeUpload}}',
accept: '.png, .jpg, .jpeg',
},
'x-mega-props': {
labelAlign: 'top',
full: true,
},
'x-rules': [
{
required: true,
message: '请上传支付凭证',
},
],
description: '单个凭证文件大小不能超过 200K',
},
},
},
},
};
\ No newline at end of file
import React from 'react';
import React, { useState } from 'react';
import {
Row,
Col,
......@@ -7,9 +7,23 @@ import {
} from 'antd';
import StatusTag from '@/components/StatusTag';
import TradeWrap from '../TradeWrap';
import CheckVoucherModal from '../CheckVoucherModal';
import styles from './index.less';
const TradeRecord: React.FC = () => {
interface TradeRecordProps {
};
const TradeRecord: React.FC<TradeRecordProps> = ({
}) => {
const [voucherVisible, setVoucherVisible] = useState(false);
const handleCheckInfo = record => {
// setData
setVoucherVisible(true);
};
return (
<div className={styles.record}>
<div className={styles.list}>
......@@ -19,7 +33,7 @@ const TradeRecord: React.FC = () => {
<Descriptions.Item label="交易流水号">
<Row justify="space-between">
<Col span={12}>
<a>20200820000010</a>
<a onClick={() => handleCheckInfo({})}>20200820000010</a>
</Col>
<Col
span={10}
......@@ -55,7 +69,7 @@ const TradeRecord: React.FC = () => {
<Descriptions.Item label="交易流水号">
<Row justify="space-between">
<Col span={12}>
<a>20200820000010</a>
<a onClick={() => handleCheckInfo}>20200820000010</a>
</Col>
<Col
span={10}
......@@ -92,6 +106,31 @@ const TradeRecord: React.FC = () => {
<div className={styles.pagination}>
<Pagination size="small" total={50} />
</div>
<CheckVoucherModal
visible={voucherVisible}
fileList={[
{
uid: '1',
name: 'xxx.png',
status: 'done',
url: 'http://www.baidu.com/xxx.png',
},
{
uid: '2',
name: 'yyy.png',
status: 'done',
url: 'http://www.baidu.com/yyy.png',
},
{
uid: '3',
name: 'zzz.png',
status: 'done',
url: 'http://www.baidu.com/zzz.png',
},
]}
onCancel={() => setVoucherVisible(false)}
/>
</div>
);
};
......
import React, { Suspense } from 'react';
import {
PageHeader,
Descriptions,
Card,
Spin,
Button,
Badge,
message,
} from 'antd';
import { FormOutlined } from '@ant-design/icons';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { history } from 'umi';
import AvatarWrap from '@/components/AvatarWrap';
import StatusTag from '@/components/StatusTag';
const OuterCirculation = React.lazy(() => import('../components/OuterCirculation'));
const QuotaApplicationInfo = React.lazy(() => import('../components/QuotaApplicationInfo'));
const HitoryList = React.lazy(() => import('../components/HistoryList'));
const OuterCirculationRecord = React.lazy(() => import('../components/OuterCirculationRecord'));
const QuotaPrSubmitDetail: React.FC = () => {
const steps = [
{
title: '提交授信申请单',
description: '采购商',
},
{
title: '确认授信申请单',
description: '供应商',
},
{
title: '完成',
description: '',
},
];
const outerRecord = [
{
id: 1,
order: 1,
role: '采购商',
status: 2,
action: '提交授信申请单',
createTime: '2020-05-12 08:08',
opinion: '同意',
},
{
id: 2,
order: 2,
role: '采购商',
status: 2,
action: '提交授信申请单',
createTime: '2020-05-12 08:08',
opinion: '同意',
},
];
return (
<PageHeaderWrapper
title={
<>
<PageHeader
style={{ padding: '0' }}
onBack={() => history.goBack()}
title={
<AvatarWrap
info={{
aloneTxt: '单',
name: '申请单号:DPTY12',
}}
extra="青铜会员"
/>
}
extra={(
<>
</>
)}
>
<Descriptions
size="small"
column={3}
style={{
padding: '0 32px',
}}
>
<Descriptions.Item label="会员归属">广州白马皮具交易中心</Descriptions.Item>
<Descriptions.Item label="会员类型">企业会员</Descriptions.Item>
<Descriptions.Item label="会员角色名称">采购商</Descriptions.Item>
<Descriptions.Item label="会员状态">
<StatusTag type="success" title="正常" />
</Descriptions.Item>
<Descriptions.Item label="外部状态">
<StatusTag type="success" title="接受申请" />
</Descriptions.Item>
<Descriptions.Item label="内部状态">
<Badge color="#41CC9E" text="正常" />
</Descriptions.Item>
</Descriptions>
</PageHeader>
</>
}
>
<Suspense fallback={null}>
<OuterCirculation steps={steps} />
</Suspense>
<Suspense fallback={null}>
<QuotaApplicationInfo editable={true} />
</Suspense>
<Suspense fallback={null}>
<HitoryList />
</Suspense>
<Suspense fallback={null}>
<OuterCirculationRecord dataSource={outerRecord} />
</Suspense>
</PageHeaderWrapper>
);
};
export default QuotaPrSubmitDetail;
\ No newline at end of file
import React, { useState, useRef } from 'react';
import { Card, Badge, Progress, Button } from 'antd';
import {
ClockCircleOutlined,
} from '@ant-design/icons';
import { StandardTable } from 'god';
import { ColumnType } from 'antd/lib/table/interface';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { createFormActions } from '@formily/antd';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import EyePreview from '@/components/EyePreview';
import NiceForm from '@/components/NiceForm';
import StatusTag from '@/components/StatusTag';
import { listSearchSchema } from './schema';
import styles from './index.less';
const formActions = createFormActions();
const mock = [
{
id: 1,
orderNo: 'SPTY9',
applicationTime: '2020-05-12 08:08',
memberName: '广州白马皮具交易有限公司',
memberType: '企业会员',
memberRole: '采购商',
memberLevel: '青铜会员',
before : '48,000',
after: '50,000.00',
outerStatus: 1,
innerStatus: 1,
},
{
id: 2,
orderNo: 'SPTY9',
applicationTime: '2020-05-12 08:08',
memberName: '广州白马皮具交易有限公司',
memberType: '企业会员',
memberRole: '采购商',
memberLevel: '青铜会员',
before : '48,000',
after: '50,000.00',
outerStatus: 1,
innerStatus: 1,
},
];
const QuotaPrSubmit: React.FC = () => {
const ref = useRef<any>({});
const defaultColumns: ColumnType<any>[] = [
{
title: '申请单号/时间',
dataIndex: 'orderNo',
align: 'center',
render: (text, record) => (
<>
<EyePreview
url={`/memberCenter/payandSettle/creditApplication/quotaPrSubmit/detail`}
>
{text}
</EyePreview>
<div>
<ClockCircleOutlined /> {record.applicationTime}
</div>
</>
),
},
{
title: '会员归属',
dataIndex: 'memberName',
align: 'center',
},
{
title: '会员类型',
dataIndex: 'memberType',
align: 'center',
},
{
title: '会员角色',
dataIndex: 'memberRole',
align: 'center',
render: (text, record) => <>{text}</>,
},
{
title: '所属会员等级',
dataIndex: 'memberLevel',
align: 'center',
render: (text, record) => <>{text}</>,
},
{
title: '调整前额度(元)',
dataIndex: 'before',
align: 'center',
},
{
title: '申请调整后额度(元)',
dataIndex: 'after',
align: 'center',
},
{
title: '外部状态',
dataIndex: 'outerStatus',
align: 'center',
filters: [],
onFilter: (value, record) => record.outerStatus === value,
render: (text, record) => (
<StatusTag type="warnning" title="不接受申请" />
),
},
{
title: '内部状态',
dataIndex: 'innerStatus',
align: 'center',
filters: [],
onFilter: (value, record) => record.innerStatus === value,
render: (text, record) => <Badge color="#41CC9E" text="正常" />,
},
{
title: '操作',
dataIndex: 'option',
align: 'center',
render: (text, record) => (
<>
<Button
type="link"
>
提交
</Button>
<Button
type="link"
danger
>
删除
</Button>
<Button
type="link"
danger
>
修改
</Button>
</>
),
},
];
const [columns, setColumns] = useState<any[]>(defaultColumns);
const fetchListData = (params: any) => {
return Promise.resolve({
total: 2,
data: mock,
});
};
// 初始化高级筛选选项
const fetchSelectOptions = async () => {
return {};
};
return (
<PageHeaderWrapper>
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
}}
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchListData(params)}
controlRender={
<NiceForm
actions={formActions}
onSubmit={values => ref.current.reload(values)}
effects={($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'name',
FORM_FILTER_PATH,
);
useAsyncInitSelect(
['innerStatus', 'outerStatus'],
fetchSelectOptions,
);
}}
schema={listSearchSchema}
/>
}
/>
</Card>
</PageHeaderWrapper>
);
};
export default QuotaPrSubmit;
\ No newline at end of file
/*
* @Author: XieZhiXiong
* @Date: 2020-09-29 10:03:06
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-09-29 10:03:43
* @Description:
*/
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { UPLOAD_TYPE } from '@/constants';
export const listSearchSchema: ISchema = {
type: 'object',
properties: {
megaLayout: {
type: 'object',
'x-component': 'mega-layout',
properties: {
name: {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '搜索',
align: 'flex-left',
tip: '输入 申请单号、会员归属 进行搜索',
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'mega-layout',
'x-component-props': {
grid: true,
full: true,
autoRow: true,
columns: 6,
},
properties: {
'[startDate, endDate]': {
type: 'string',
default: '',
'x-component': 'dateSelect',
'x-component-props': {
placeholder: '单据时间(全部)',
allowClear: true,
},
},
outterStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '外部状态(全部)',
allowClear: true,
},
},
innerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '内部状态(全部)',
allowClear: true,
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
span: 1,
},
'x-component-props': {
children: '查询',
},
},
},
},
},
},
},
};
\ No newline at end of file
import React, { useState, useRef, ReactNode } from 'react'
import { history } from 'umi'
import { Card, Space, Radio, Row, Col, Descriptions, Table, Tag } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import {
EyeOutlined,
} from '@ant-design/icons'
import {
Chart,
Interval,
Tooltip,
Axis,
Coordinate,
Interaction,
Legend,
} from 'bizcharts'
import { ColumnType } from 'antd/lib/table/interface'
import ReutrnEle from '@/components/ReturnEle'
import styles from './index.less'
const ViewRepository: React.FC<{}> = () => {
const [memberType, setMemberType] = useState(1)
const dataRecord = [
{
key: '1',
inRepository: '牛皮仓-渠道商城-所有渠道',
outRepository: '牛皮仓-直销商城-会员渠道',
productName: '进口头层牛皮荔枝纹/天青色/XXXLL',
inAmount: 10232,
outAmount: 981232,
unit: '吨',
time: '1250-51-02 45:23:99',
},
{
key: '2',
inRepository: '牛皮仓-渠道商城-所有渠道',
outRepository: '牛皮仓-直销商城-会员渠道',
productName: '进口头层牛皮荔枝纹/天青色/XXXLL',
inAmount: 10232,
outAmount: 981232,
unit: '吨',
time: '1250-51-02 45:23:99',
}
];
const columnsRecord: ColumnType<any>[] = [
{
title: 'ID',
dataIndex: 'key',
key: 'key',
},
{
title: '调出/调入仓位',
dataIndex: 'inRepository',
key: 'inRepository',
render: (text: any, record: any) => <>
<p><Tag color="gold">调出仓位 </Tag>{record.outRepository}</p>
<p><Tag color="blue">调入仓位 </Tag>{record.inRepository}</p>
</>
},
{
title: '调出商品',
dataIndex: 'productName',
key: 'productName',
},
{
title: '单位',
key: 'unit',
dataIndex: 'unit',
},
{
title: '调出库存',
key: 'outAmount',
dataIndex: 'outAmount',
render: (text: any, record: any) => <>
<p>调出库存:{record.outAmount}</p>
<p>调出前库存:{record.outAmount}</p>
</>
},
{
title: '调入库存',
key: 'inAmount',
dataIndex: 'inAmount',
render: (text: any, record: any) => <>
<p>调入库存:{record.inAmount}</p>
<p>调入后库存:{record.inAmount}</p>
</>
},
{
title: '调拨时间',
key: 'time',
dataIndex: 'time',
},
];
const dataMember = [
{
key: '1',
name: '渠道名称',
type: '渠道企业会员',
role: '渠道采购商',
class: '青铜会员',
},
{
key: '2',
name: '渠道名称',
type: '渠道企业会员',
role: '渠道采购商',
class: '铁皮会员',
},
]
const columnsMember: ColumnType<any>[] = [
{
title: 'ID',
dataIndex: 'key',
align: 'center',
key: 'key',
},
{
title: '会员名称',
dataIndex: 'name',
align: 'center',
key: 'name',
render: (text:any, record:any) => <span className="commonPickColor">{text}&nbsp;<EyeOutlined /></span>
},
{
title: '会员类型',
dataIndex: 'type',
align: 'center',
key: 'type',
},
{
title: '会员角色',
dataIndex: 'role',
align: 'center',
key: 'role',
},
{
title: '会员等级',
dataIndex: 'class',
align: 'center',
key: 'class',
},
]
const content = <>
<Descriptions colon={true} column={2}>
<Descriptions.Item label="当前库存"><span className={styles.amount}>12000</span></Descriptions.Item>
<Descriptions.Item label="已用库存"><span className={styles.amount}>8000</span></Descriptions.Item>
</Descriptions>
<br />
<br />
<Descriptions colon={true} column={1}>
<Descriptions.Item label="商品名称">进口头层黄牛皮荔枝纹/红色/XL</Descriptions.Item>
<Descriptions.Item label="库存扣减方式">按仓位随机扣减(默认)</Descriptions.Item>
</Descriptions>
</>
const dataChart = [
{ item: '当前库存', count: 12000, percent: 0.6 },
{ item: '已用库存', count: 8000, percent: 0.4 },
]
const colsChart = {
percent: {
formatter: (val:any) => {
val = val * 20000;
return val;
},
},
}
return (
<PageHeaderWrapper
title="进口头层黄牛皮荔枝纹/红色/XL"
onBack={() => history.goBack()}
backIcon={<ReutrnEle logoSrc='https://avatars1.githubusercontent.com/u/8186664?s=460&v=4' />}
>
<Space direction="vertical" style={{width:'100%'}}>
<Row gutter={[26,0]}>
<Col span={12}>
<Card headStyle={{borderBottom:'none'}} title="当前仓位库存(尺)" style={{height:'320px'}}>
<Row>
<Col span={12}>
<Chart height={180} data={dataChart} scale={colsChart} autoFit>
<Coordinate type="theta" radius={0.75} />
<Tooltip showTitle={false} />
<Legend visible={false} />
<Axis visible={false} />
<Interval
position="percent"
adjust="stack"
color={['item',['#669ede', '#f4f5f7']]}
style={{
lineWidth: 1,
stroke: '#fff',
}}
label={['count', {
content: (data: any) => {
return `${data.item}: ${data.percent * 100}%`;
},
}]}
/>
<Interaction type='element-single-selected' />
</Chart>
</Col>
<Col span={12}>{content}</Col>
</Row>
</Card>
</Col>
<Col span={12}>
<Card headStyle={{borderBottom:'none'}} title={<>当前仓位库存(尺)<Tag color="red">广州成品仓</Tag></>} style={{height:'320px'}}>
<Row>
<Col span={12}>
<Chart height={180} data={dataChart} scale={colsChart} autoFit>
<Coordinate type="theta" radius={0.75} />
<Tooltip showTitle={false} />
<Legend visible={false} />
<Axis visible={false} />
<Interval
position="percent"
adjust="stack"
color={['item',['#41cc9e', '#f4f5f7']]}
style={{
lineWidth: 1,
stroke: '#fff',
}}
label={['count', {
content: (data: any) => {
return `${data.item}: ${data.percent * 100}%`;
},
}]}
/>
<Interaction type='element-single-selected' />
</Chart>
</Col>
<Col span={12}>{content}</Col>
</Row>
</Card>
</Col>
</Row>
</Space>
<Space direction="vertical" style={{width:'100%'}}>
<Card headStyle={{borderBottom:'none'}} title="适用商城">
<Descriptions colon={false} column={4}>
<Descriptions.Item label="LOGO">XXXXX商城</Descriptions.Item>
<Descriptions.Item label="LOGO">XXXXX商城</Descriptions.Item>
<Descriptions.Item label="LOGO">XXXXX商城</Descriptions.Item>
<Descriptions.Item label="LOGO">XXXXX商城</Descriptions.Item>
<Descriptions.Item label="LOGO">XXXXX商城</Descriptions.Item>
<Descriptions.Item label="LOGO">XXXXX商城</Descriptions.Item>
<Descriptions.Item label="LOGO">XXXXX商城</Descriptions.Item>
</Descriptions>
</Card>
</Space>
<Space direction="vertical" style={{width:'100%'}}>
<Card headStyle={{borderBottom:'none'}} title="适用会员">
<Row>
<Col span={3}>
<p>适用会员:</p>
</Col>
<Col span={21}>
<p>{memberType ? <Radio checked>指定会员</Radio> : <Radio checked>所有会员共享(默认)</Radio>}</p>
</Col>
</Row>
{memberType ? <Table dataSource={dataMember} columns={columnsMember} /> : ''}
</Card>
</Space>
<Space direction="vertical" style={{width:'100%'}}>
<Card headStyle={{borderBottom:'none'}} title="仓位库存调拨记录">
<Table columns={columnsRecord} dataSource={dataRecord} />
</Card>
</Space>
</PageHeaderWrapper>
)
}
export default ViewRepository
......@@ -75,8 +75,8 @@ const AddContract: React.FC<{}> = (props) => {
name: res.name,
version: res.version,
description: res.description,
fileExampleUrl: fileExampleUrl.contractName,
fileExampleName: fileExampleUrl.contractUrl,
fileExampleUrl: fileExampleUrl.contractUrl,
fileExampleName: fileExampleUrl.contractName,
fileUrl,
fileName: uploadFile.name
}
......
......@@ -713,7 +713,6 @@ const detailInfo: React.FC<{}> = () => {
},
)}
</div>
</div>
</Col>
......
import React from 'react';
import React, { useState, useRef } from 'react';
import { history } from 'umi';
import { Button, Card, Tabs } from 'antd';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
......@@ -8,9 +8,19 @@ import EnquiryGoods from './components/enquiryGoods'; // 询价商品
import TradingConditions from './components/tradingConditions'; // 交易条件
import Attached from './components/attached'; // 附件
import FlowRecord from './components/flowRecord'; // 流转记录
import { PublicApi } from '@/services/api'
const { TabPane } = Tabs;
const AddQuotes: React.FC<{}> = () => {
const ref = useRef<any>({})
const [memberList, setmemberList] = useState([]);
/************* 页面的一些操作start *************/
const onSumbit = async (params: any) => {
}
const getMemberList = (list: any) => {
setmemberList(list);
}
/************* 页面的一些操作end *************/
return (
<PageHeaderWrapper
onBack={() => history.goBack()}
......@@ -23,13 +33,17 @@ const AddQuotes: React.FC<{}> = () => {
<Card>
<Tabs type="card">
<TabPane tab="基本信息" key="1">
<BasicInfo />
<BasicInfo
getMemberList={getMemberList}
/>
</TabPane>
<TabPane tab="询价商品" key="2">
<EnquiryGoods />
<EnquiryGoods
memberList={memberList}
/>
</TabPane>
<TabPane tab="交易条件" key="3">
<TradingConditions />
<TradingConditions/>
</TabPane>
<TabPane tab="附件" key="4">
<Attached />
......
import React from 'react';
import React, { useState, useEffect } from 'react';
import { Form, Input, Button } from 'antd';
import styles from './index.less';
import { LinkOutlined } from '@ant-design/icons';
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
import { ISchema } from '@formily/antd';
import ModalTable from '@/components/ModalTable'
import { PublicApi } from '@/services/api'
const layout: any = {
colon: false,
......@@ -10,33 +14,152 @@ const layout: any = {
labelAlign: "left"
};
const { Search } = Input;
const BasicInfo: React.FC<{}> = (porps) => {
interface queryProps {
getMemberList?: Function
}
const BasicInfo: React.FC<queryProps> = (props) => {
const [basicform] = Form.useForm();
const { getMemberList } = props;
// 会员添加弹窗控制
const [visibleChannelMember, setVisibleChannelMember] = useState(false);
const [memberList, setmemberList] = useState([]);
const [memberRowSelection, memberRowCtl] = useRowSelectionTable({ customKey: 'memberId', type: 'radio' });
const handleOkAddMember = () => {
setVisibleChannelMember(false)
setmemberList(memberRowCtl.selectRow);
getMemberList(memberRowCtl.selectRow); // 回传给父级
}
const handleCancelAddMember = () => {
setVisibleChannelMember(false)
}
const columnsSetMember: any[] = [
{
title: 'ID',
dataIndex: 'memberId',
key: 'memberId',
},
{
title: '会员名称',
dataIndex: 'name',
key: 'name',
},
{
title: '会员类型',
dataIndex: 'memberTypeName',
key: 'memberTypeName',
},
{
title: '会员角色',
dataIndex: 'roleName',
key: 'roleName',
},
{
title: '会员等级',
dataIndex: 'levelTag',
key: 'levelTag',
}
]
const formSearch: ISchema = {
type: 'object',
properties: {
name: {
type: 'string',
"x-component": 'Search',
"x-component-props": {
placeholder: '请输入会员名称'
}
}
}
}
// 模拟数据
const data = [{
memberId: 6,
name: '测试会员数据',
roleId: 5,
roleName: '可可西',
memberTypeName: '超级会员',
level: 1,
levelTag: '倔强铂金'
},{
memberId: 7,
name: '测试会员数据',
roleId: 5,
roleName: '可可西',
memberTypeName: '超级会员',
level: 1,
levelTag: '倔强铂金'
}]
const fetchMemberList = async (params) => {
// const res = await PublicApi.getMemberManageLowerMerchantProviderPage(params)
// return res.data
return new Promise((resolve, reject) => {
const queryResult = data.find(v => v.memberId === params.keywords);
setTimeout(() => {
resolve({
code: 200,
message: '',
data: queryResult ? [queryResult] : data,
});
}, 1000);
});
}
// 选择会员弹框结束
useEffect(() => {
if(memberList.length > 0) {
basicform.setFieldsValue({'memberName': memberList[0].name ? memberList[0].name : undefined})
}
},[memberList])
/************* 页面的一些操作start *************/
/************* 页面的一些操作end *************/
return (
<Form
{...layout}
className={styles.revise_style}
>
<Form.Item label='询价单摘要'>
<Input />
</Form.Item>
<Form.Item label='被询价会员'>
<Search readOnly enterButton={<><LinkOutlined /> 选择</>} />
<Button type='link'>查看会员详情</Button>
</Form.Item>
<Form.Item label='询价单号'>
<span>SPTY12</span>
</Form.Item>
<Form.Item label='单据时间'>
<span>2020-08-20 12:56:25</span>
</Form.Item>
<Form.Item label='外部状态'>
<span>待提交</span>
</Form.Item>
<Form.Item label='内部状态'>
<span>待提交审核</span>
</Form.Item>
</Form>
<>
<Form
{...layout}
form={basicform}
className={styles.revise_style}
>
<Form.Item label='询价单摘要' name='details' rules={[{ required: true, message: '请输入询价单摘要' }]}>
<Input />
</Form.Item>
<Form.Item label='被询价会员' name='memberName' rules={[{ required: true, message: '请选择被询价会员' }]}>
<Search value={memberList.length > 0 ? memberList[0].name : undefined} readOnly enterButton={<><LinkOutlined /> 选择</>} onSearch={()=>setVisibleChannelMember(true)} />
<Button type='link'>查看会员详情</Button>
</Form.Item>
<Form.Item label='询价单号' name='orderNumber'>
<span>-</span>
</Form.Item>
<Form.Item label='单据时间' name='time'>
<span>-</span>
</Form.Item>
<Form.Item label='外部状态' name='external'>
<span>-</span>
</Form.Item>
<Form.Item label='内部状态' name='internal'>
<span>-</span>
</Form.Item>
</Form>
{/* 选择会员弹框 */}
<ModalTable
modalTitle='选择会员'
confirm={handleOkAddMember}
cancel={handleCancelAddMember}
visible={visibleChannelMember}
resetModal={{destroyOnClose: true, forceRender: true}}
columns={columnsSetMember}
rowSelection={memberRowSelection}
fetchTableData={params => fetchMemberList(params)}
formilyProps={
{
ctx: { schema: formSearch }
}
}
tableProps={{
rowKey: 'memberId',
}}
/>
</>
)
}
......
import React, { useState } from 'react';
import styles from './index.less';
import { Button } from 'antd';
import { StandardTable } from 'god';
import { Button, message, Input,Table } from 'antd';
import { ColumnType } from 'antd/lib/table/interface';
import { PlusOutlined } from '@ant-design/icons';
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
import { ISchema, createAsyncFormActions } from '@formily/antd';
import ModalTable, { ModalTableProps } from '@/components/ModalTable';
import { PublicApi } from '@/services/api';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import SearchSelect from '@/components/NiceForm/components/SearchSelect'
import Search from '@/components/NiceForm/components/Search'
import Submit from '@/components/NiceForm/components/Submit'
const EnquiryGoods:React.FC<{}> = () => {
const columns:ColumnType<any>[] = [{
interface queryProps extends ModalTableProps {
memberList?: any
}
const EnquiryGoods: React.FC<queryProps> = (props) => {
const { memberList, ...restProps } = props
const productFormActions = createAsyncFormActions()
const columns: ColumnType<any>[] = [{
title: '序号',
dataIndex: 'productId',
},{
}, {
title: '商品名称',
dataIndex: 'productName',
},{
}, {
title: '品类',
dataIndex: 'inquiryListNo',
},{
}, {
title: '品牌',
dataIndex: 'brand',
},{
}, {
title: '单位',
dataIndex: 'nuit',
},{
}, {
title: '采购数量',
dataIndex: 'purchaseQuantity',
},{
render:(text:any, recode: any) => <Input />
}, {
title: '操作',
dataIndex: 'operation',
}]
return(
// 会员添加弹窗控制
const [visibleChannelMember, setVisibleChannelMember] = useState(false);
const [goodsList, setgoodsList] = useState([]);
const [memberRowSelection, memberRowCtl] = useRowSelectionTable({ customKey: 'commodityId' });
const handleOkAddMember = () => {
setVisibleChannelMember(false);
const arr : any[] = []
memberRowCtl.selectRow.forEach((v, i) => {
arr.push({
productId: v.commodityId,
productName: v.name,
inquiryListNo: v.customerCategoryName,
brand: v.brandName,
nuit: v.unitName
})
setgoodsList(arr)
})
}
const handleCancelAddMember = () => {
setVisibleChannelMember(false)
}
const columnsSetMember: any[] = [
{
title: 'ID',
dataIndex: 'commodityId',
key: 'commodityId',
},
{
title: '商品名称',
dataIndex: 'name',
key: 'name',
},
{
title: '品类',
dataIndex: 'customerCategoryName',
key: 'customerCategoryName',
},
{
title: '品牌',
dataIndex: 'brandName',
key: 'brandName',
}
]
const formSearch: ISchema = {
type: 'object',
properties: {
name: {
type: 'string',
'x-component': 'ModalSearch',
'x-component-props': {
placeholder: '商品名称',
align: 'flex-left',
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
rowStyle: {
flexWrap: 'nowrap',
style: {
marginRight: 0
}
},
colStyle: {
marginTop: 20,
},
},
properties: {
customerCategoryName: {
type: 'string',
"x-component-props": {
placeholder: '请输入品类',
}
},
brandName: {
type: 'string',
"x-component-props": {
placeholder: '请输入品牌',
}
},
submit: {
"x-component": 'Submit',
"x-mega-props": {
span: 1
},
"x-component-props": {
children: '查询'
}
}
}
}
}
}
// 模拟数据
const data = [{
commodityId: 1,
name: '进口头层黄牛皮荔枝纹/红色/XXL',
customerCategoryName: '牛皮',
brandName: 'PELLE',
unitName: '个',
},{
commodityId: 2,
name: '进口头层黄牛皮荔枝纹/红色/XXL',
customerCategoryName: '牛皮',
brandName: 'PELLE',
unitName: '个',
},{
commodityId: 3,
name: '进口头层黄牛皮荔枝纹/红色/XXL',
customerCategoryName: '牛皮',
brandName: 'PELLE',
unitName: '个',
},{
commodityId: 4,
name: '进口头层黄牛皮荔枝纹/红色/XXL',
customerCategoryName: '牛皮',
brandName: 'PELLE',
unitName: '个',
},{
commodityId: 5,
name: '进口头层黄牛皮荔枝纹/红色/XXL',
customerCategoryName: '牛皮',
brandName: 'PELLE',
unitName: '个',
},{
commodityId: 6,
name: '进口头层黄牛皮荔枝纹/红色/XXL',
customerCategoryName: '牛皮',
brandName: 'PELLE',
unitName: '个',
},{
commodityId: 7,
name: '进口头层黄牛皮荔枝纹/红色/XXL',
customerCategoryName: '牛皮',
brandName: 'PELLE',
unitName: '个',
},{
commodityId: 8,
name: '进口头层黄牛皮荔枝纹/红色/XXL',
customerCategoryName: '牛皮',
brandName: 'PELLE',
unitName: '个',
},{
commodityId: 9,
name: '进口头层黄牛皮荔枝纹/红色/XXL',
customerCategoryName: '牛皮',
brandName: 'PELLE',
unitName: '个',
},{
commodityId: 10,
name: '进口头层黄牛皮荔枝纹/红色/XXL',
customerCategoryName: '牛皮',
brandName: 'PELLE',
unitName: '个',
},{
commodityId: 11,
name: '进口头层黄牛皮荔枝纹/红色/XXL',
customerCategoryName: '牛皮',
brandName: 'PELLE',
unitName: '个',
},{
commodityId: 12,
name: '进口头层黄牛皮荔枝纹/红色/XXL',
customerCategoryName: '牛皮',
brandName: 'PELLE',
unitName: '个',
},{
commodityId: 13,
name: '进口头层黄牛皮荔枝纹/红色/XXL',
customerCategoryName: '牛皮',
brandName: 'PELLE',
unitName: '个',
},{
commodityId: 14,
name: '进口头层黄牛皮荔枝纹/红色/XXL',
customerCategoryName: '牛皮',
brandName: 'PELLE',
unitName: '个',
},{
commodityId: 15,
name: '进口头层黄牛皮荔枝纹/红色/XXL',
customerCategoryName: '牛皮',
brandName: 'PELLE',
unitName: '个',
}]
const fetchGoodsList = async (params) => {
// const res = await PublicApi.getMemberManageLowerProviderPage(params)
// return res.data
return new Promise((resolve, reject) => {
console.log(data, params)
setTimeout(() => {
resolve({
code: 200,
message: '',
data: data,
});
}, 1000);
});
}
// 选择会员弹框结束
/************* 页面的一些操作start *************/
// 添加商品
const addGoods = () => {
if(memberList.length > 0 && memberList[0].memberId) {
setVisibleChannelMember(true);
} else {
message.error('请选择被询价会员')
}
}
/************* 页面的一些操作end *************/
return (
<div className={styles.revise_style}>
<Button block type='dashed'><PlusOutlined />添加商品</Button>
<StandardTable
<Button block type='dashed' onClick={addGoods}><PlusOutlined />添加商品</Button>
<Table style={{marginTop: '16px'}} columns={columns} dataSource={goodsList} pagination={false} />
{/* 选择商品弹框 */}
<ModalTable
modalTitle='选择商品'
confirm={handleOkAddMember}
cancel={handleCancelAddMember}
visible={visibleChannelMember}
resetModal={{destroyOnClose: true, forceRender: true}}
columns={columnsSetMember}
rowSelection={memberRowSelection}
fetchTableData={params => fetchGoodsList(params)}
formilyProps={
{
ctx: {
schema: formSearch,
actions: productFormActions,
components: { ModalSearch: Search, SearchSelect, Submit },
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'name',
FORM_FILTER_PATH,
);
}
}
}
}
tableProps={{
rowKey: 'id',
pagination: false
rowKey: 'commodityId'
}}
columns={columns}
{...restProps}
/>
</div>
)
......
import React, { ReactNode, useRef, useState, useEffect } from 'react';
import React, { useRef, useState } from 'react';
import { history } from 'umi';
import {
Button,
Card,
Space,
Row,
Col,
Dropdown,
Menu,
Popconfirm
} from 'antd';
import { Button, Card, Space, Row, Col, Dropdown, Menu, Popconfirm } from 'antd';
import { PlusOutlined,DownOutlined,DeleteOutlined } from '@ant-design/icons';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import {
PlusOutlined, DownOutlined, DeleteOutlined
} from '@ant-design/icons';
import { StandardTable } from 'god';
import { ColumnType } from 'antd/lib/table/interface';
import {
IFormFilter,
IButtonFilter,
} from 'god/dist/src/standard-table/TableController';
import {filterInteriorStateList,filterExternalStateList} from './../../common/statusList';
import {interiorState,interiorStateTwo,
enquirySearchInteriorState,enquirySearchexternalState} from '../../common/tableStatusList';
import EyePreview from '@/components/EyePreview';
import StatusSwitch from '@/components/StatusSwitch';
import { interiorState } from '../../common/tableStatusList'
import statuStyle from '../../common/colorTag'
import moment from 'moment';
import { timeRange } from '@/utils/index';
import { ColumnType } from 'antd/lib/table/interface';
import NiceForm from '@/components/NiceForm';
import { timeRange } from '@/utils/index'
import moment from 'moment'
import { createFormActions, FormEffectHooks } from '@formily/antd';
import { PageStatus } from '@/hooks/usePageStatus'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { commonEnquieryOfferSchema } from '../schema';
import { PublicApi } from '@/services/api';
import { PageStatus } from '@/hooks/usePageStatus';
import { values, action } from 'mobx';
import { PublicApi } from '@/services/api';
const formActions = createFormActions();
const fetchData = async (params: any) => {
const res = await PublicApi.getOrderStayProductQuotationList(params);
return res.data
}
const AddEnquiryOrder: React.FC<{}> = () => {
const ref = useRef<any>({})
const [more, setmore] = useState(false)
const ref = useRef<any>({});
const [selectRow, setSelectRow] = useState([])
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<number>>([])
const format = (text) => {
return <>{moment(text).format("YYYY-MM-DD HH:mm:ss")}</>
}
const columns: ColumnType<any>[] = [
{
title: '询价单号',
key: 'inquiryListNo',
dataIndex: 'inquiryListNo',
width: '9%',
render: (text: any,records: any) => <EyePreview type="button">{text}</EyePreview>
},
{
title: '询价单摘要',
key: 'details',
dataIndex: 'details',
width: '12%',
},
{
title: '被询价会员',
key: 'memberName',
dataIndex: 'memberName',
width: '12%',
},
{
title: '交付日期',
key: 'deliveryTime',
dataIndex: 'deliveryTime',
width: '11%',
},
{
title: '报价截止时间',
key: 'quotationAsTime',
dataIndex: 'quotationAsTime',
width: '12%',
render: (text: any) => format(text)
},
{
title: '询价时间',
key: 'voucherTime',
dataIndex: 'voucherTime',
width: '12%',
render: (text: any) => format(text)
},
{
title: '外部状态',
key: 'externalState',
dataIndex: 'externalState',
width: '10%',
render: (text: any, reconds) => {
let component: ReactNode = null
if (text == 3) {
component = <><span style={statuStyle.warn}>审核不通过</span></>
} else if (text == 1) {
component = <><span style={statuStyle.default}>待提交</span></>
}
return component
}
filters: filterExternalStateList,
filterMultiple: false,
onFilter: (value, record) => record.externalState === value,
render: (text: any, reconds) =>
enquirySearchexternalState(text)
},
{
title: '内部状态',
key: 'interiorState',
dataIndex: 'interiorState',
width: '10%',
render: (text: any) => interiorState(text)
filters: filterInteriorStateList,
filterMultiple: false,
onFilter: (value, record) => record.interiorState === value,
render:(text:any) =>
enquirySearchInteriorState(text)
},
{
title: '操作',
key: 'options',
dataIndex: 'options',
width: '12%',
render: (_: any, record: any) => {
return (
<>
{
(record.interiorState !== 3 &&
<Button type="link" onClick={() => toEdit(record.id)}>编辑</Button>
)
}
{
(record.interiorState === 1) &&
<>
<Popconfirm title="确定要删除吗?" okText="是" cancelText="否" onConfirm={() => handleDelete([record.id])}>
<Button type='link'>
删除
</Button>
</Popconfirm>
{/* <Popconfirm title="确定要提交吗?" okText="是" cancelText="否" onConfirm={() => handleSubmit(record.id)}>
<Button type='link'>提交</Button>
</Popconfirm> */}
</>
}
</>
)
}
},
]
useEffect(() => {
}, [])
const toEdit = (id: number | string) => {
history.push(`/memberCenter/tranactionAbility/enquiryOffer/addEnquiry?id=${id}`)
}
/**
* @description: 删除
* @param {type}
* @return {type}
*/
const handleDelete = (arr: number[] | string[]) => {
PublicApi.postOrderQuotationDelete({ ids: arr }).then(res => {
ref.current.reload()
})
}
//批量提交
const handleSubmitAll = (ids: number[]) => {
PublicApi.postOrderQuotationSubmitAuditAll({ ids: ids }).then(res => {
ref.current.reload()
})
}
//提交审核
const handleSubmit = (id) => {
PublicApi.postOrderQuotationSubmitAudit({ id: id }).then(res => {
ref.current.reload()
})
}
const handleSumbit = (values: any) => {
if (values.voucherTime) {
values.startDocumentsTime = timeRange(values.voucherTime).st
values.endDocumentsTime = timeRange(values.voucherTime).et
}
delete values.voucherTime
ref.current.reload(values)
}
const menu = (
<Menu onClick={() => handleDelete(selectedRowKeys)}>
<Menu.Item key='1' icon={<DeleteOutlined />}>
批量删除
</Menu.Item>
</Menu>
)
const handleBatchDel = (e: any) => {
const format = (text) => {
return <>{moment(text).format("YYYY-MM-DD HH:mm:ss")}</>
}
/**多选 */
const rowSelection = {
selectedRowKeys: selectedRowKeys,
onChange: (selectedRowKeys: any, selectedRows: any) => {
......@@ -200,11 +95,20 @@ const AddEnquiryOrder: React.FC<{}> = () => {
console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows)
},
}
/**批量删除 */
const menu = (
<Menu>
<Menu.Item key='1' icon={<DeleteOutlined/>}>
批量删除
</Menu.Item>
</Menu>
)
/**批量审核通过按钮 */
const controllerBtns = <Row>
<Col span={24}>
<Space direction="horizontal" size={16}>
<Button type="primary" onClick={() => history.push('/memberCenter/tranactionAbility/goodsOffer/addEnquiryOrder/add')} icon={<PlusOutlined />}>新建</Button>
<Button onClick={() => handleSubmitAll(selectedRowKeys)}>批量提交审核</Button>
<Button type="primary" icon={<PlusOutlined />} onClick={() => history.push(`/memberCenter/tranactionAbility/goodsOffer/addEnquiryOrder/add`)}>新建</Button>
<Button>批量提交审核</Button>
<Dropdown.Button
overlay={menu}
trigger={['click']}
......@@ -216,6 +120,12 @@ const AddEnquiryOrder: React.FC<{}> = () => {
</Col>
</Row>
/************* 页面的一些操作start *************/
const fetchData = async (params: any) => {
const res = await PublicApi.getOrderInquiryList(params);
return res.data
}
/************* 页面的一些操作end *************/
return (
<PageHeaderWrapper>
<Card>
......@@ -223,12 +133,11 @@ const AddEnquiryOrder: React.FC<{}> = () => {
currentRef={ref}
columns={columns}
tableProps={{ rowKew: 'id' }}
fetchTableData={(params: any) => fetchData(params)}
rowSelection={rowSelection}
fetchTableData={(params: any) => fetchData(params)}
controlRender={
<NiceForm
actions={formActions}
onSubmit={values => handleSumbit(values)}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, 'quotationNo', FORM_FILTER_PATH)
}}
......@@ -239,7 +148,9 @@ const AddEnquiryOrder: React.FC<{}> = () => {
>
</NiceForm>
}
/>
>
</StandardTable>
</Card>
</PageHeaderWrapper>
)
......
This diff is collapsed.
@import "../../../member/components/index.less";
.item_wrap {
margin-bottom: 24px;
background-color: #FFF;
border-radius: 8px;
&:last-child {
margin-bottom: 0px;
}
.mainCol_title {
font-size: 16px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #303133;
padding: 0px 0 20px;
}
:global {
.ant-tabs-nav {
&::before {
border-bottom-color: #FFF;
}
}
}
}
\ No newline at end of file
......@@ -56,14 +56,15 @@ export const orderCombination = {
}
export const orderTypeLabel = ['',
'现货采购',
'现货采购',
'询价采购',
'需求采购',
'现货采购',
'集采',
'积分兑换',
'渠道直采',
'渠道直采',
'渠道现货',
'渠道现货',
'渠道积分兑换'
]
// 支付方式
......
......@@ -13,7 +13,7 @@ export interface OrderMergeInfoProps { }
const payInfo = [
{ title: '交付日期', name: 'deliveryTime', render: (text) => formatTimeString(text) },
{
title: '交付地址', name: 'deliveryAddresId', render: (_, record) =>
title: '交付地址', name: 'deliveryAddressInfo', render: (_, record) =>
<div>
<Row>
<Col>{record.receiverName}</Col>
......@@ -60,25 +60,26 @@ const RenderCard = ({ infoList, dataSource }) => infoList.map(v => dataSource[v.
const OrderMergeInfo: React.FC<OrderMergeInfoProps> = (props) => {
const orderDetailCtx = useContext(OrderDetailContext)
const address = useMemo(async () => {
const { data } = await PublicApi.getLogisticsSelectListReceiverAddress()
return data
}, [])
// const address = useMemo(async () => {
// const { data } = await PublicApi.getLogisticsSelectListReceiverAddress()
// return data
// }, [])
const { data, ctl } = orderDetailCtx
useEffect(() => {
if (data.deliveryAddresId && !data.receiverName) {
asyncSetAddress()
}
}, [data, address])
// useEffect(() => {
// if (data.deliveryAddresId && !data.receiverName) {
// asyncSetAddress()
// }
// }, [data, address])
const asyncSetAddress = async () => {
const res = await address
ctl.setData({
...data,
...(res.find(v => v.id === data.deliveryAddresId) || {})
})
}
// const asyncSetAddress = async () => {
// const res = await address
// debugger
// ctl.setData({
// ...data,
// ...(res.find(v => v.id === data.deliveryAddresId) || {})
// })
// }
return (
<Row style={{ marginTop: 24 }} gutter={24}>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment