Commit fe4a565c authored by 前端-钟卫鹏's avatar 前端-钟卫鹏
parents 484f889d 19509777
......@@ -55,7 +55,7 @@
"god": "0.2.4",
"immutability-helper": "^3.1.1",
"lingxi-design": "^1.0.8",
"lingxi-design-ui": "^1.1.15",
"lingxi-design-ui": "^1.1.16",
"lingxi-editor-core": "^1.0.6",
"lingxi-web": "^1.0.6",
"lint-staged": "^10.0.7",
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-08-20 16:15:59
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-08-21 17:07:35
* @LastEditTime: 2020-12-21 13:57:12
* @Description: 简单封装了分页事件的 Table
*/
import React from 'react';
......@@ -54,7 +54,6 @@ export default class NormalTable extends React.PureComponent<StandardTableProps>
showSizeChanger: true,
showQuickJumper: true,
onChange: this.handlePaginationChange,
onShowSizeChange: this.handlePaginationChange,
size: 'small',
showTotal: () => `共 ${pagination.total || 0} 条`,
...pagination,
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-04 15:09:09
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-17 15:25:03
* @LastEditTime: 2020-12-21 11:44:17
* @Description: 维修商品抽屉组件
*/
import React, { useState, useEffect } from 'react';
......@@ -22,7 +22,7 @@ import { PublicApi } from '@/services/api';
const formActions = createFormActions();
const PAGE_SIZE = 5;
const PAGE_SIZE = 10;
interface GoodsDrawerProps {
// 选中值(子表格的值)
......@@ -525,7 +525,7 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
const first = data.length ? data[0] : null;
if (!first) {
return;
return [];
}
const filtered = data.filter(item => item.processEnum === first.processEnum);
if (filtered.length !== data.length) {
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 17:36:45
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-09 16:38:48
* @LastEditTime: 2020-12-21 11:13:21
* @Description: 查看退货数量与退款金额 抽屉
*/
import React from 'react';
......@@ -164,6 +164,7 @@ const ReturnInfoDrawer: React.FC<ReturnInfoDrawerProps> = ({
</Button>
</div>
}
destroyOnClose
>
<NiceForm
initialValues={orderInfo}
......
......@@ -226,7 +226,7 @@ export const addBillSchema: ISchema = {
'x-rules': [
{
required: true,
message: '请选择维修商品',
message: '请选择退货商品',
},
],
items: {
......@@ -286,11 +286,23 @@ export const addBillSchema: ISchema = {
type: 'string',
title: '退货数量',
'x-component': 'Text',
'x-rules': [
{
required: true,
message: '请输入退货数量',
},
],
},
refundAmount: {
type: 'string',
title: '退款金额',
'x-component': 'Text',
'x-rules': [
{
required: true,
message: '请输入退款金额',
},
],
},
// 其他数据,不用于展示,只用于收集值
extraData: {
......
......@@ -120,6 +120,21 @@ const PayPage: React.FC<PayPagePropsType> = (props) => {
window.location.href = '/'
}
const renderError = () => {
return (
<div>
<CommonHeader
logoUrl={(layoutType === LAYOUT_TYPE.channel || layoutType === LAYOUT_TYPE.ichannel) ? shopInfo?.logo : mallInfo.logoUrl}
title="支付错误"
/>
<div className={styles.errmsg}>
<p>{errMsg}</p>
<Button type="primary" className={styles.backbtn} onClick={() => backHome()}>返回首页</Button>
</div>
</div>
)
}
return payInfo ? !payState ? (
<div className={styles.pay}>
<CommonHeader
......@@ -132,19 +147,7 @@ const PayPage: React.FC<PayPagePropsType> = (props) => {
}
</div>
</div>
) : loading ? null : (
<div>
<CommonHeader
logoUrl={(layoutType === LAYOUT_TYPE.channel || layoutType === LAYOUT_TYPE.ichannel) ? shopInfo?.logo : mallInfo.logoUrl}
title="支付错误"
/>
<div className={styles.errmsg}>
<p>{errMsg}</p>
<Button type="primary" className={styles.backbtn} onClick={() => backHome()}>返回首页</Button>
</div>
</div>
): null
) : loading ? null : renderError(): renderError()
}
export default PayPage
......@@ -79,13 +79,13 @@ const EquityInfo: React.FC<EquityInfoProps> = ({
const [receivedPage, setReceivedPage] = useState(1);
const [receivedSize, setReceivedSize] = useState(PAGE_SIZE);
const [receivedTotal, setReceivedTotal] = useState(0);
const [receivedList, setReceivedList] = useState([]);
const [receivedList, setReceivedList] = useState<ReceivedData[]>([]);
const [receivedListLoading, setReceivedListLoading] = useState(false);
const [usagePage, setUsagePage] = useState(1);
const [usageSize, setUsageSize] = useState(PAGE_SIZE);
const [usageTotal, setUsageTotal] = useState(0);
const [usageList, setUsageList] = useState([]);
const [usageList, setUsageList] = useState<UsageData[]>([]);
const [usageListLoading, setUsageListLoading] = useState(false);
const receivedColumns: EditableColumns[] = [
......@@ -151,15 +151,13 @@ const EquityInfo: React.FC<EquityInfoProps> = ({
},
];
const getReceivedList = () => {
const getReceivedList = (params?) => {
if (fetchReceivedList) {
if (receivedListLoading) {
return;
}
setReceivedListLoading(true);
fetchReceivedList({
current: receivedPage,
pageSize: receivedSize,
...params,
}).then(res => {
const { data = [], totalCount = 0 } = (res || {});
setReceivedList(data);
......@@ -170,15 +168,13 @@ const EquityInfo: React.FC<EquityInfoProps> = ({
}
};
const getUsageList = () => {
const getUsageList = (params?) => {
if (fetchUsageList) {
if (usageListLoading) {
return;
}
setUsageListLoading(true);
fetchUsageList({
current: usagePage,
pageSize: usageSize,
...params,
}).then(res => {
const { data = [], totalCount = 0 } = (res || {});
setUsageList(data);
......@@ -211,13 +207,19 @@ const EquityInfo: React.FC<EquityInfoProps> = ({
const handleReceivedPaginationChange = (page: number, size: number) => {
setReceivedPage(page);
setReceivedSize(size);
getReceivedList();
getReceivedList({
current: page,
pageSize: size,
});
};
const handleUsagePaginationChange = (page: number, size: number) => {
setUsagePage(page);
setUsageSize(size);
getReceivedList();
getUsageList({
current: page,
pageSize: size,
});
};
return (
......
......@@ -497,8 +497,6 @@ export const useBusinessEffects = (context, actions) => {
if (fieldState.name === 'invoicesTypeId') {
const invoicesTypeIdState = getFieldState('invoicesTypeId');
console.log('invoicesTypeIdState2', invoicesTypeIdState)
if (invoicesTypeIdState.value) {
const current = invoicesTypeIdState.originAsyncData.find(item => item.id === invoicesTypeIdState.value);
......
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