Commit e035996a authored by XieZhiXiong's avatar XieZhiXiong

fix: 修改售后相关bug

parent abaf37d3
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2020-11-04 15:09:09 * @Date: 2020-11-04 15:09:09
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-21 11:44:17 * @LastEditTime: 2020-12-24 10:32:10
* @Description: 维修商品抽屉组件 * @Description: 维修商品抽屉组件
*/ */
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
...@@ -247,6 +247,11 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> { ...@@ -247,6 +247,11 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
}); });
}); });
if (!payload.length) {
this.setState({ loading: false });
return;
}
processEnumRes = await PublicApi.postOrderGetProcessEnum({ processEnumRes = await PublicApi.postOrderGetProcessEnum({
list: payload, list: payload,
}, { }, {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2020-11-03 18:30:47 * @Date: 2020-11-03 18:30:47
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-11 10:29:51 * @LastEditTime: 2020-12-24 10:36:02
* @Description: 联动逻辑相关 * @Description: 联动逻辑相关
*/ */
import { Modal } from 'antd'; import { Modal } from 'antd';
...@@ -74,4 +74,12 @@ export const useBusinessEffects = (context, actions) => { ...@@ -74,4 +74,12 @@ export const useBusinessEffects = (context, actions) => {
} }
); );
}); });
// 供应会员联动 单据明细
onFieldInputChange$('supplierMember').subscribe(fieldState => {
const replaceGoodsListValue = getFieldValue('replaceGoodsList');
if (replaceGoodsListValue && replaceGoodsListValue.length) {
setFieldValue('replaceGoodsList', []);
}
});
} }
\ No newline at end of file
...@@ -137,8 +137,9 @@ const ExchangeForm: React.FC<BillsFormProps> = ({ ...@@ -137,8 +137,9 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
}, },
{ {
title: '采购金额', title: '采购金额',
dataIndex: 'price', dataIndex: 'amount',
align: 'center', align: 'center',
render: (_, record) => (record.purchaseCount * record.price).toFixed(2),
}, },
{ {
title: '已换货数量', title: '已换货数量',
...@@ -493,7 +494,7 @@ const ExchangeForm: React.FC<BillsFormProps> = ({ ...@@ -493,7 +494,7 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
> >
<Card> <Card>
<NiceForm <NiceForm
initialValues={{ value={{
...detailInfo, ...detailInfo,
replaceGoodsList: replaceGoodsList.data, replaceGoodsList: replaceGoodsList.data,
}} }}
......
...@@ -51,4 +51,12 @@ export const useBusinessEffects = (context, actions) => { ...@@ -51,4 +51,12 @@ export const useBusinessEffects = (context, actions) => {
} }
); );
}); });
// 供应会员联动 单据明细
onFieldInputChange$('supplierMember').subscribe(fieldState => {
const replaceGoodsListValue = getFieldValue('repairGoodsList');
if (replaceGoodsListValue && replaceGoodsListValue.length) {
setFieldValue('repairGoodsList', []);
}
});
} }
\ No newline at end of file
...@@ -339,7 +339,7 @@ const RepairForm: React.FC<BillsFormProps> = ({ ...@@ -339,7 +339,7 @@ const RepairForm: React.FC<BillsFormProps> = ({
> >
<Card> <Card>
<NiceForm <NiceForm
initialValues={{ value={{
...detailInfo, ...detailInfo,
repairGoodsList: repairGoodsList.data, repairGoodsList: repairGoodsList.data,
}} }}
......
...@@ -48,4 +48,12 @@ export const useBusinessEffects = (context, actions) => { ...@@ -48,4 +48,12 @@ export const useBusinessEffects = (context, actions) => {
break break
}; };
}); });
// 供应会员联动 单据明细
onFieldInputChange$('supplierMember').subscribe(fieldState => {
const replaceGoodsListValue = getFieldValue('returnGoodsList');
if (replaceGoodsListValue && replaceGoodsListValue.length) {
setFieldValue('returnGoodsList', []);
}
});
} }
\ No newline at end of file
...@@ -557,7 +557,7 @@ const ReturnForm: React.FC<BillsFormProps> = ({ ...@@ -557,7 +557,7 @@ const ReturnForm: React.FC<BillsFormProps> = ({
> >
<Card> <Card>
<NiceForm <NiceForm
initialValues={{ value={{
...detailInfo, ...detailInfo,
returnGoodsList: returnGoodsList.data, returnGoodsList: returnGoodsList.data,
}} }}
......
...@@ -110,7 +110,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({ ...@@ -110,7 +110,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
}); });
PublicApi.postAsReturnGoodsSetNeedReturnGoods({ PublicApi.postAsReturnGoodsSetNeedReturnGoods({
returnId: +id, returnId: +id,
returnGoodsId: record.orderRecordId, returnGoodsId: record.returnGoodsId,
isNeed: record.isNeedReturn === 1 ? 0 : 1, isNeed: record.isNeedReturn === 1 ? 0 : 1,
}).then(res => { }).then(res => {
if (res.code === 1000) { if (res.code === 1000) {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2020-11-05 14:25:41 * @Date: 2020-11-05 14:25:41
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-08 17:32:59 * @LastEditTime: 2020-12-24 10:04:24
* @Description: 退货申请单查询 * @Description: 退货申请单查询
*/ */
import React, { useState, useRef } from 'react'; import React, { useState, useRef } from 'react';
...@@ -99,7 +99,7 @@ const ReturnPrReturn: React.FC = () => { ...@@ -99,7 +99,7 @@ const ReturnPrReturn: React.FC = () => {
type="link" type="link"
onClick={() => history.push(`/memberCenter/afterService/returnManage/returnPrReturn/verify?id=${record.returnId}`)} onClick={() => history.push(`/memberCenter/afterService/returnManage/returnPrReturn/verify?id=${record.returnId}`)}
> >
提交审核 退款
</Button> </Button>
</> </>
), ),
......
...@@ -186,7 +186,7 @@ const BillsForm: React.FC<BillsFormProps> = ({ ...@@ -186,7 +186,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
); );
setBillInfo({ setBillInfo({
transactionTime: transactionTime ? moment(transactionTime).format('YYYY-MM-DD HH:mm:ss') : moment().format('YYYY-MM-DD HH:mm:ss'), transactionTime: transactionTime ? moment(transactionTime).format('YYYY-MM-DD HH:mm:ss') : '',
orderNo: orderNo:
relevanceInvoicesId ? relevanceInvoicesId ?
[ [
...@@ -1656,7 +1656,7 @@ const BillsForm: React.FC<BillsFormProps> = ({ ...@@ -1656,7 +1656,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
> >
<Card> <Card>
<NiceForm <NiceForm
initialValues={billInfo} value={billInfo}
expressionScope={{ expressionScope={{
TableAddButton, TableAddButton,
renderListTableRemove, renderListTableRemove,
......
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