Commit 3dd83028 authored by 王苓芝's avatar 王苓芝

Merge branch 'afterSale' into 'master'

After sale

See merge request !9
parents 9b7e504d 1f95e398
...@@ -16,6 +16,7 @@ const Appeal = () => { ...@@ -16,6 +16,7 @@ const Appeal = () => {
const [selectedRow, getRow] = useState({}); const [selectedRow, getRow] = useState({});
const [imgData, getImgData] = useState([]); const [imgData, getImgData] = useState([]);
const [imgTitle, changeImgTitle] = useState(''); const [imgTitle, changeImgTitle] = useState('');
const table = useRef(); const table = useRef();
const openDetail = async row => { const openDetail = async row => {
const detailData = await getDetail({ appealNo: row.appealNo }); const detailData = await getDetail({ appealNo: row.appealNo });
...@@ -33,7 +34,8 @@ const Appeal = () => { ...@@ -33,7 +34,8 @@ const Appeal = () => {
table.current.reload(); table.current.reload();
} }
}; };
const openImgModal = imgList => { const openImgModal = imgStr => {
const imgList = imgStr ? imgStr.split(',') : [];
if (!imgList.length) { if (!imgList.length) {
notification.error({ notification.error({
message: '啊哦~没有数据!', message: '啊哦~没有数据!',
...@@ -73,7 +75,7 @@ const Appeal = () => { ...@@ -73,7 +75,7 @@ const Appeal = () => {
}} }}
columns={columns(res)} columns={columns(res)}
request={params => query({ ...params })} request={params => query({ ...params })}
rowKey={r => r.orderNo} rowKey={r => r.appealNo}
expandIconColumnIndex={10} expandIconColumnIndex={10}
actionRef={table} actionRef={table}
bordered bordered
......
...@@ -94,10 +94,10 @@ export function columns(res) { ...@@ -94,10 +94,10 @@ export function columns(res) {
dataIndex: 'proofs', dataIndex: 'proofs',
key: 'proofs', key: 'proofs',
hideInSearch: true, hideInSearch: true,
render: proofs => { render: (_, row) => (
const list = proofs && proofs !== '-' ? proofs.split(',') : []; // const list = proofs && proofs !== '-' ? proofs.split(',') : [];
return <a onClick={() => openImgModal(list)}>查看凭证</a>; <a onClick={() => openImgModal(row.proofs)}>查看凭证</a>
}, ),
}, },
{ {
title: '申诉单创建时间', title: '申诉单创建时间',
...@@ -126,10 +126,10 @@ export function columns(res) { ...@@ -126,10 +126,10 @@ export function columns(res) {
dataIndex: 'supplement', dataIndex: 'supplement',
key: 'supplement', key: 'supplement',
hideInSearch: true, hideInSearch: true,
render: supplement => { render: (_, row) => (
const list = supplement && supplement !== '-' ? supplement.split(',') : []; // const list = supplement && supplement !== '-' ? supplement.split(',') : [];
return <a onClick={() => openImgModal(list)}>查看补充资料</a>; <a onClick={() => openImgModal(row.supplement)}>查看补充资料</a>
}, ),
}, },
{ {
title: '协商结果', title: '协商结果',
......
...@@ -194,8 +194,8 @@ const TableList = props => { ...@@ -194,8 +194,8 @@ const TableList = props => {
}, },
{ {
title: '订单开始时间', title: '订单开始时间',
dataIndex: 'beginTime', dataIndex: 'startTime',
key: 'beginTime', key: 'startTime',
valueType: 'date', valueType: 'date',
hideInTable: true, hideInTable: true,
}, },
...@@ -263,7 +263,6 @@ const TableList = props => { ...@@ -263,7 +263,6 @@ const TableList = props => {
const transformedParam = { const transformedParam = {
...params, ...params,
logisticsStatus: props.type || 1, logisticsStatus: props.type || 1,
startTime: params.beginTime,
pageNo: params.current, pageNo: params.current,
pageSize: params.pageSize || 20, pageSize: params.pageSize || 20,
}; };
...@@ -299,7 +298,7 @@ const TableList = props => { ...@@ -299,7 +298,7 @@ const TableList = props => {
onClick={() => { onClick={() => {
if (ref.current) { if (ref.current) {
const obj = { ...ref.current.getFieldsValue(), logisticsStatus: props.type || 1 }; const obj = { ...ref.current.getFieldsValue(), logisticsStatus: props.type || 1 };
obj.beginTime = obj.beginTime && moment(obj.beginTime).format('YYYY-MM-DD'); obj.startTime = obj.startTime && moment(obj.startTime).format('YYYY-MM-DD');
obj.endTime = obj.endTime && moment(obj.endTime).format('YYYY-MM-DD'); obj.endTime = obj.endTime && moment(obj.endTime).format('YYYY-MM-DD');
downOrder(obj); downOrder(obj);
} }
......
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