Commit 813a0f37 authored by XieZhiXiong's avatar XieZhiXiong
parents e2a14177 f09355eb
import React, { useCallback, useEffect, useState } from 'react';
import { Form, Button, Table, Input, Image, Drawer } from 'antd';
import { Form, Button, Table, Input, Image, Drawer, Typography } from 'antd';
import { ColumnType } from 'antd/lib/table/interface';
import Card from '@/pages/transaction/components/card';
import { isEmpty } from '@/components/NiceForm/components/AntUpload/shared';
......@@ -7,6 +7,7 @@ import EyePreview from '@/components/EyePreview';
import { ENTERPRISE_CENTER_URL } from '@/constants';
import { PublicApi } from '@/services/api';
import { StandardTable } from 'god';
import moment from 'moment';
interface ProductQuoteLayoutProps {
/** 回显 */
......@@ -14,6 +15,9 @@ interface ProductQuoteLayoutProps {
}
const ProductQuoteLayout: React.FC<ProductQuoteLayoutProps> = (props: any) => {
const format = (text, fmt?: string) => {
return <>{moment(text).format(fmt || "YYYY-MM-DD HH:mm:ss")}</>
}
const { setProductQuote } = props;
const [dataSource, setDataSource] = useState<any[]>([]);
const [commoditySkuId, setCommoditySkuId] = useState();
......@@ -113,8 +117,9 @@ const ProductQuoteLayout: React.FC<ProductQuoteLayoutProps> = (props: any) => {
const hitoryColumns: ColumnType<any>[] = [
{
title: '商品ID',
key: 'productId',
dataIndex: 'productId'
key: 'commodityId',
dataIndex: 'commodityId',
render: (commodityId, data) => <Typography.Link target="_blank" href={`${ENTERPRISE_CENTER_URL}/shop/${data.memberId}_${data.memberRoleId}/inquiry/detail/${data.commodityId}`}>{commodityId}</Typography.Link>
},
{
title: '商品名称',
......@@ -159,7 +164,8 @@ const ProductQuoteLayout: React.FC<ProductQuoteLayoutProps> = (props: any) => {
{
title: '报价时间',
key: 'createTime',
dataIndex: 'createTime'
dataIndex: 'createTime',
render: (text: any, record: any) => format(text)
},
{
title: '报价单',
......
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