Commit 4d2194b2 authored by GuanHua's avatar GuanHua
parents c25115a7 1e72ee31
......@@ -358,12 +358,3 @@ a {
}
}
}
.mega-layout-container-content {
overflow: hidden;
}
.ant-form-item-label > label {
font-size: 12px !important;
color: #909399 !important;
}
......@@ -217,3 +217,16 @@
}
}
.ant-descriptions-item-label {
color: #909399 !important;
}
.mega-layout-container-content {
overflow: hidden;
}
.ant-form-item-label > label {
font-size: 12px !important;
color: #909399 !important;
}
\ No newline at end of file
......@@ -2,12 +2,13 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 15:18:15
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-25 10:32:49
* @LastEditTime: 2021-01-22 18:01:26
* @Description: 换货发货统计、换货发货明细
*/
import React, { useState } from 'react';
import { Tabs, Button, Row, Col, Descriptions, Badge, Radio, Modal } from 'antd';
import { ExclamationCircleOutlined } from '@ant-design/icons';
import { Link } from 'umi';
import { SummaryData, Detailed } from './interface';
import MellowCard from '@/components/MellowCard';
import { EditableColumns } from '@/components/PolymericTable/interface';
......@@ -54,7 +55,7 @@ interface ExchangeDeliverInfoProps {
*/
onConfirmExchangeDeliver?: (id: number) => Promise<any>;
/**
/**
* 确认退货收货
*/
onConfirmExchangeReceive?: (id: number) => Promise<any>;
......@@ -63,6 +64,11 @@ interface ExchangeDeliverInfoProps {
* 换货申请单内部状态
*/
innerStatus: number;
/**
* 订单记录地址
*/
target: string;
};
const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
......@@ -73,6 +79,7 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
onConfirmExchangeDeliver,
onConfirmExchangeReceive,
innerStatus,
target,
}) => {
const [currentBatch, setCurrentBatch] = useState(1);
......@@ -82,7 +89,7 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
dataIndex: 'orderNo',
render: (text, record) => (
<EyePreview
url={``}
url={`${target}/orderDetail?orderNo=${text}`}
>
{text}
</EyePreview>
......@@ -146,7 +153,7 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
dataIndex: 'orderNo',
render: (text, record) => (
<EyePreview
url={``}
url={`${target}/orderDetail?orderNo=${text}`}
>
{text}
</EyePreview>
......@@ -278,12 +285,34 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
<Col span={16}>
<Descriptions>
<Descriptions.Item label="换货发货单号">
<a>{item.deliveryNo}</a>
{!isPurchaser ? (
<Link
to={`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${item.deliveryNoId}`}
>
{item.deliveryNo}
</Link>
) : (
item.deliveryNo
)}
</Descriptions.Item>
<Descriptions.Item label="物流单号">
<a>{item.logisticsOrderNo}</a>
<Link
to={`/memberCenter/logisticsAbility/logisticsSubmit/orderSubmitSearchList/detail?id=${item.logisticsId}`}
>
{item.logisticsOrderNo}
</Link>
</Descriptions.Item>
<Descriptions.Item label="换货入库单号">
{isPurchaser ? (
<Link
to={`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${item.storageId}`}
>
{item.storageNo}
</Link>
) : (
item.storageNo
)}
</Descriptions.Item>
<Descriptions.Item label="换货入库单号">{item.storageNo}</Descriptions.Item>
<Descriptions.Item label="发货时间">{item.deliveryTime}</Descriptions.Item>
<Descriptions.Item label="物流公司">
{item.logisticsName}
......
......@@ -94,6 +94,14 @@ export interface Detailed {
*/
innerStatusName: string
/**
* 物流单Id
*/
logisticsId: number
/**
* 换货入库单号Id
*/
storageId: number
/**
* 发货明细 ,DeliveryGoodsDetailVO
*/
detailList: {
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 15:18:15
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-01-21 14:38:39
* @LastEditTime: 2021-01-22 15:36:57
* @Description: 换货收货统计、换货发货明细
*/
import React, { useState } from 'react';
......@@ -67,6 +67,11 @@ interface ExchangeReceivedInfoProps {
* 换货申请单内部状态
*/
innerStatus: number;
/**
* 订单记录地址
*/
target: string;
};
const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
......@@ -77,6 +82,7 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
onConfirmReturnDeliver,
onConfirmReturnReceive,
innerStatus,
target,
}) => {
const [currentBatch, setCurrentBatch] = useState(1);
......@@ -86,7 +92,7 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
dataIndex: 'orderNo',
render: (text, record) => (
<EyePreview
url={``}
url={`${target}/orderDetail?orderNo=${text}`}
>
{text}
</EyePreview>
......@@ -150,7 +156,7 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
dataIndex: 'orderNo',
render: (text, record) => (
<EyePreview
url={``}
url={`${target}/orderDetail?orderNo=${text}`}
>
{text}
</EyePreview>
......@@ -289,9 +295,9 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
<Col span={16}>
<Descriptions>
<Descriptions.Item label="退货发货单号">
{!isPurchaser ? (
{isPurchaser ? (
<Link
to={`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${item.deliveryId}`}
to={`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${item.deliveryNoId}`}
>
{item.deliveryNo}
</Link>
......@@ -307,7 +313,7 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
</Link>
</Descriptions.Item>
<Descriptions.Item label="退货入库单号">
{isPurchaser ? (
{!isPurchaser ? (
<Link
to={`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${item.storageId}`}
>
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-09-29 15:04:46
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-24 10:55:51
* @LastEditTime: 2021-01-22 11:45:59
* @Description: 外部流转记录
*/
import React from 'react';
......@@ -77,7 +77,7 @@ const OuterCirculationRecord: React.FC<OuterCirculationRecordProps> = ({
title="外部流转记录"
>
<PolymericTable
rowKey="operateTime"
rowKey="step"
dataSource={dataSource}
columns={columns}
loading={false}
......
import React, { useState, useEffect } from 'react';
import { Button, Space, message, Spin } from 'antd';
import styled from 'styled-components';
import { createFormActions } from '@formily/antd';
import { PublicApi } from '@/services/api';
import NiceForm from '@/components/NiceForm';
......@@ -7,6 +8,12 @@ import { uploadVoucherModalSchema } from './schema';
const uploadVoucherFormActions = createFormActions();
const Wrap = styled(props => <div {...props} />)`
.ant-form-item {
margin-bottom: 2;
}
`
interface BankAccount {
name: string,
bankAccount: string,
......@@ -109,20 +116,22 @@ const UploadVoucher: React.FC<UploadVoucherProps> = ({
return (
<Spin spinning={loading}>
<NiceForm
previewPlaceholder=""
value={bankAccount}
effects={($, { setFieldState }) => {
}}
expressionScope={{
beforeUpload: beforeUploadVoucher,
}}
actions={uploadVoucherFormActions}
schema={uploadVoucherModalSchema}
onSubmit={handleUploadVoucherSubmit}
colon
/>
<Wrap>
<NiceForm
previewPlaceholder=""
value={bankAccount}
effects={($, { setFieldState }) => {
}}
expressionScope={{
beforeUpload: beforeUploadVoucher,
}}
actions={uploadVoucherFormActions}
schema={uploadVoucherModalSchema}
onSubmit={handleUploadVoucherSubmit}
colon
/>
</Wrap>
<div style={{ marginTop: 20, textAlign: 'center' }}>
<Space>
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-01-06 11:36:34
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-01-07 13:57:30
* @LastEditTime: 2021-01-22 14:36:52
* @Description:
*/
import { ISchema } from '@formily/antd';
......@@ -23,7 +23,7 @@ export const uploadVoucherModalSchema: ISchema = {
properties: {
name: {
type: 'string',
title: '账户名称',
title: '还款账户名称',
'x-component': 'Text',
},
bankAccount: {
......
......@@ -290,7 +290,7 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
<Descriptions.Item label="退货发货单号">
{isPurchaser ? (
<Link
to={`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${item.deliveryId}`}
to={`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${item.deliveryNoId}`}
>
{item.deliveryNo}
</Link>
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 18:02:18
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-01-18 17:50:38
* @LastEditTime: 2021-01-22 14:40:40
* @Description: 退款明细
*/
import React, { useState } from 'react';
......@@ -44,7 +44,7 @@ interface ReturnDetailInfoProps {
/**
* 退款事件
*/
onRefund?: (id: number) => Promise<any>;
onRefund?: (value: { [key: string]: any }) => Promise<any>;
/**
* 确认事件
*/
......@@ -220,8 +220,10 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
title: '提示',
icon: <ExclamationCircleOutlined />,
content: `是否确认退款?`,
okText: '确认',
cancelText: '取消',
onOk() {
return onRefund(id);
return onRefund({ id });
},
});
}
......
/*
* @Author: XieZhiXiong
* @Date: 2020-12-18 17:44:26
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-01-22 11:32:06
* @Description:
*/
import React from 'react';
import { SchemaForm, SchemaField, FormPath } from '@formily/antd';
import styled from 'styled-components';
import { toArr } from '@formily/shared';
import { ArrayList } from '@formily/react-shared-components';
import Stamp from '../../../Stamp';
const SteamerWrap = styled(props => <div {...props} />)`
.ant-form-item {
margin-bottom: 0;
}
.mega-layout-container-content {
&.grid {
grid-row-gap: 0 !important;
}
}
`
const ArrayCustom = props => {
const { value, schema, className, editable, path, mutators } = props;
const {
......@@ -17,30 +36,32 @@ const ArrayCustom = props => {
} = schema.getExtendsComponentProps() || {};
return (
<ArrayList
value={value}
minItems={schema.minItems}
maxItems={schema.maxItems}
editable={editable}
components={{}}
renders={{
renderAddition,
renderRemove,
renderMoveDown,
renderMoveUp,
renderEmpty // 允许开发者覆盖默认
}}
>
{toArr(value).map((item, index) => {
return (
<div {...componentProps} key={index}>
<Stamp imprinted>
<SchemaField path={FormPath.parse(path).concat(index)} />
</Stamp>
</div>
)
})}
</ArrayList>
<SteamerWrap>
<ArrayList
value={value}
minItems={schema.minItems}
maxItems={schema.maxItems}
editable={editable}
components={{}}
renders={{
renderAddition,
renderRemove,
renderMoveDown,
renderMoveUp,
renderEmpty // 允许开发者覆盖默认
}}
>
{toArr(value).map((item, index) => {
return (
<div {...componentProps} key={index}>
<Stamp imprinted>
<SchemaField path={FormPath.parse(path).concat(index)} />
</Stamp>
</div>
)
})}
</ArrayList>
</SteamerWrap>
)
}
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 17:36:45
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-01-06 14:30:16
* @LastEditTime: 2021-01-22 11:07:42
* @Description: 查看退货数量与退款金额 抽屉
*/
import React from 'react';
......@@ -187,6 +187,7 @@ const ReturnInfoDrawer: React.FC<ReturnInfoDrawerProps> = ({
onSubmit={handleSubmit}
actions={schemaAction}
schema={schema}
colon
/>
</Drawer>
);
......
.stamp {
padding: 25px 20px;
margin: 10px;
background: #FFFFFF;
padding: 16px 20px;
margin: 16px 10px;
background: #FAFBFC;
box-shadow: 0px 4px 6px 0px rgba(23, 43, 77, 0.08), 0px 0px 1px 0px rgba(23, 43, 77, 0.12);
border-radius: 4px;
border-left: 2px solid #606266;
......
......@@ -330,6 +330,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
step: item.step,
title: item.taskName,
description: item.roleName,
status: item.isExecute ? 'finish' : 'wait',
})) :
[]
}
......@@ -365,6 +366,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
onConfirmReturnBack={handleConfirmReturnBack}
isPurchaser={true}
innerStatus={detailInfo?.innerStatus}
target={target}
/>
</Suspense>
</Col>
......@@ -384,6 +386,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
onConfirmExchangeReceive={handleConfirmExchangeReceive}
isPurchaser={true}
innerStatus={detailInfo?.innerStatus}
target={target}
/>
</Suspense>
</Col>
......
......@@ -418,6 +418,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
detailed={detailInfo && detailInfo.returnDeliveryGoodsList ? detailInfo.returnDeliveryGoodsList : []}
onConfirmReturnReceive={handleReceivedConfirmReturnReceive}
innerStatus={detailInfo?.innerStatus}
target={target}
/>
</Suspense>
</Col>
......@@ -437,6 +438,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
onConfirmExchangeDeliver={handleConfirmExchangeDeliver}
onConfirmExchangeBack={handleConfirmExchangeBack}
innerStatus={detailInfo?.innerStatus}
target={target}
/>
</Suspense>
</Col>
......
......@@ -139,7 +139,7 @@ const FlowRecords: React.FC<FlowRecordsProps> = ({ outerHistory = [], innerHisto
{outerHistory ? (
<Tabs.TabPane tab="外部流转记录" key="1">
<PolymericTable
rowKey="operateTime"
rowKey="step"
dataSource={outerHistory}
columns={outerColumns}
loading={false}
......@@ -149,7 +149,7 @@ const FlowRecords: React.FC<FlowRecordsProps> = ({ outerHistory = [], innerHisto
) : null}
<Tabs.TabPane tab="内部流转记录" key="2">
<PolymericTable
rowKey="operateTime"
rowKey="step"
dataSource={innerHistory}
columns={innerColumns}
loading={false}
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-06 16:30:44
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-09 15:32:03
* @LastEditTime: 2021-01-22 17:50:10
* @Description: 待新增退货发货单
*/
import React, { useState, useRef } from 'react';
......@@ -75,7 +75,7 @@ const ReturnPrConfirmResult: React.FC = () => {
},
{
title: '已退款',
dataIndex: 'returnAmount',
dataIndex: 'refunded',
align: 'center',
},
{
......
......@@ -2,11 +2,12 @@
* @Author: XieZhiXiong
* @Date: 2021-01-13 13:46:08
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-01-13 13:46:22
* @LastEditTime: 2021-01-22 15:24:39
* @Description: 上传凭证弹窗
*/
import React, { useState, useEffect } from 'react';
import { Modal, message } from 'antd';
import styled from 'styled-components';
import { createFormActions } from '@formily/antd';
import NiceForm from '@/components/NiceForm';
import { PublicApi } from '@/services/api';
......@@ -15,6 +16,12 @@ import styles from './index.less';
const uploadVoucherFormActions = createFormActions();
const Wrap = styled(props => <div {...props} />)`
.ant-form-item {
margin-bottom: 2px;
}
`
interface UploadVoucherModalProps {
/**
* 是否可见
......@@ -124,19 +131,22 @@ const UploadVoucherModal: React.FC<UploadVoucherModalProps> = (props: UploadVouc
onCancel={onCancel}
destroyOnClose
>
<NiceForm
previewPlaceholder=""
initialValues={bankAccount}
effects={($, { setFieldState }) => {
}}
expressionScope={{
beforeUpload: beforeUploadVoucher,
}}
actions={uploadVoucherFormActions}
schema={uploadVoucherModalSchema}
onSubmit={handleUploadVoucherSubmit}
/>
<Wrap>
<NiceForm
previewPlaceholder=""
value={bankAccount}
effects={($, { setFieldState }) => {
}}
expressionScope={{
beforeUpload: beforeUploadVoucher,
}}
actions={uploadVoucherFormActions}
schema={uploadVoucherModalSchema}
onSubmit={handleUploadVoucherSubmit}
colon
/>
</Wrap>
</Modal>
);
};
......
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