Commit 2c8bdd37 authored by Bill's avatar Bill

修改结算和首页bug

parent f2dc8560
...@@ -58,16 +58,16 @@ export const columns: ColumnsType<any> = [ ...@@ -58,16 +58,16 @@ export const columns: ColumnsType<any> = [
dataIndex: 'action', dataIndex: 'action',
render: (text, record: any) => { render: (text, record: any) => {
return ( return (
<DrawerProcessDetail <DrawerProcessDetail
type="view" type="view"
id={record.productId} id={record.productId}
brand={record.brand} brand={record.brand}
category={record.category} category={record.category}
name={record.productName} name={record.productName}
productProps={record.property.specs} productProps={record.property.specs}
files={record.property.annex} files={record.property.annex}
unitName={record.unit} unitName={record.unit}
quantity={record.processNum} quantity={record.processNum}
processUnitPrice={record.processPrice} processUnitPrice={record.processPrice}
> >
<a>查看加工明细</a> <a>查看加工明细</a>
...@@ -146,7 +146,10 @@ export const outerWorkflowRecordsColumn: ColumnsType<any> = [ ...@@ -146,7 +146,10 @@ export const outerWorkflowRecordsColumn: ColumnsType<any> = [
}, },
{ {
title: '操作时间', title: '操作时间',
dataIndex: 'operateTime' dataIndex: 'operateTime',
render: (text, record) => {
return moment(text).format('YYYY-MM-DD HH:mm:ss')
}
}, },
{ {
title: '审核意见', title: '审核意见',
...@@ -225,7 +228,7 @@ export const receiveColumns = (type: "order" | 'product'): ColumnsType<any> => { ...@@ -225,7 +228,7 @@ export const receiveColumns = (type: "order" | 'product'): ColumnsType<any> => {
]; ];
if(type === 'order') { if(type === 'order') {
return temp return temp
} }
return temp.slice(1) return temp.slice(1)
} }
...@@ -262,4 +265,4 @@ export const pnoReceiveDeliverDetailDOListColumns = [ ...@@ -262,4 +265,4 @@ export const pnoReceiveDeliverDetailDOListColumns = [
title: '发货数量', title: '发货数量',
dataIndex: 'deliverNum' dataIndex: 'deliverNum'
} }
] ]
\ No newline at end of file
...@@ -45,7 +45,7 @@ const Detail: React.FC<{}> = () => { ...@@ -45,7 +45,7 @@ const Detail: React.FC<{}> = () => {
const [info, setInfo] = useState<any>({}) const [info, setInfo] = useState<any>({})
const { id } = usePageStatus(); const { id } = usePageStatus();
const [loading, setLoading] = useState<boolean>(false); const [loading, setLoading] = useState<boolean>(false);
useEffect(() => { useEffect(() => {
if(id) { if(id) {
setLoading(true) setLoading(true)
...@@ -66,29 +66,28 @@ const Detail: React.FC<{}> = () => { ...@@ -66,29 +66,28 @@ const Detail: React.FC<{}> = () => {
<PageHeaderWrapper <PageHeaderWrapper
title={ title={
<> <>
<PageHeader <PageHeader
style={{ padding: '0' }} style={{ padding: '0' }}
onBack={() => history.goBack()} onBack={() => history.goBack()}
title={ title={
<AvatarWrap <AvatarWrap
info={{ info={{
name: "通知单号:" name: "通知单号:"
}} }}
extra={( extra={(
<span style={{ fontSize: 12, fontWeight: 'normal' }}>{info?.noticeNo}</span> <span style={{ fontSize: 18, fontWeight: 600 }}>{info?.noticeNo}</span>
)} )}
/> />
} }
> >
<Row> <Row>
<Col span={22}> <Col span={22}>
<Descriptions <Descriptions
column={3} column={3}
style={{padding: '0 32px', fontWeight: 400}} style={{padding: '0 32px', fontWeight: 400}}
colon={false} colon={false}
> >
<Descriptions.Item label="通知单摘要:">{info?.summary}</Descriptions.Item> <Descriptions.Item span={3} label="通知单摘要:" style={{overflow: 'hidden'}}>{info?.summary}</Descriptions.Item>
<Descriptions.Item label="加工企业:">{info?.processName}</Descriptions.Item> <Descriptions.Item label="加工企业:">{info?.processName}</Descriptions.Item>
<Descriptions.Item label="单据时间:">{info && info.createTime && moment(info.createTime).format('YYYY-MM-DD') || null }</Descriptions.Item> <Descriptions.Item label="单据时间:">{info && info.createTime && moment(info.createTime).format('YYYY-MM-DD') || null }</Descriptions.Item>
<Descriptions.Item label="通知单来源:">{info?.source == '1' ? '订单加工': '商品加工'}</Descriptions.Item> <Descriptions.Item label="通知单来源:">{info?.source == '1' ? '订单加工': '商品加工'}</Descriptions.Item>
...@@ -96,13 +95,17 @@ const Detail: React.FC<{}> = () => { ...@@ -96,13 +95,17 @@ const Detail: React.FC<{}> = () => {
<StatusTag type={STATUS[info.outerStatus] || ''} title={info.outerStatusName} /> <StatusTag type={STATUS[info.outerStatus] || ''} title={info.outerStatusName} />
</Descriptions.Item> </Descriptions.Item>
<Descriptions.Item label="内部状态:"> <Descriptions.Item label="内部状态:">
<Badge <Badge
color={COLOR[info.innerStatus] || 'success'} color={COLOR[info.innerStatus] || 'success'}
text={info.innerStatusName}></Badge> text={info.innerStatusName}></Badge>
</Descriptions.Item> </Descriptions.Item>
</Descriptions> </Descriptions>
</Col> </Col>
{
info?.cause
? <div style={{marginLeft: '32px'}}>不通过原因: <StatusTag type={"danger"} title={info.cause} /></div>
: null
}
</Row> </Row>
</PageHeader> </PageHeader>
</> </>
...@@ -115,31 +118,31 @@ const Detail: React.FC<{}> = () => { ...@@ -115,31 +118,31 @@ const Detail: React.FC<{}> = () => {
<div style={{marginTop: '20px'}}> <div style={{marginTop: '20px'}}>
<Card> <Card>
<h1 style={{fontSize: '14px', marginBottom: '16px'}}>通知单明细</h1> <h1 style={{fontSize: '14px', marginBottom: '16px'}}>通知单明细</h1>
<Table dataSource={info?.details} columns={info.source === 2 ? orderDetailColumn : columns}/> <Table dataSource={info?.details} columns={info.source === 2 ? orderDetailColumn : columns} rowKey={"id"}/>
</Card> </Card>
</div> </div>
<div style={{marginTop: '20px'}}> <div style={{marginTop: '20px'}}>
<ReceiptDeliveryDetailsCard> <ReceiptDeliveryDetailsCard>
<StatisticsTab tab="收发货统计" columns={receiveColumns(info.source === 2 ? 'product' : 'order')} dataSource={info.details}></StatisticsTab> <StatisticsTab tab="收发货统计" columns={receiveColumns(info.source === 2 ? 'product' : 'order')} dataSource={info.details}></StatisticsTab>
{ {
info.pnoReceiveDeliverDetailDOList && info.pnoReceiveDeliverDetailDOList &&
info.pnoReceiveDeliverDetailDOList.length > 0 info.pnoReceiveDeliverDetailDOList.length > 0
? <DetailTab ? <DetailTab
tab="收发货明细" tab="收发货明细"
columns={pnoReceiveDeliverDetailDOListColumns} columns={pnoReceiveDeliverDetailDOListColumns}
dataSource={info.pnoReceiveDeliverDetailDOList} dataSource={info.pnoReceiveDeliverDetailDOList}
// handleConfirm={handleConfirm} // handleConfirm={handleConfirm}
/> />
: null : null
} }
</ReceiptDeliveryDetailsCard> </ReceiptDeliveryDetailsCard>
</div> </div>
<div style={{marginTop: '20px'}}> <div style={{marginTop: '20px'}}>
<DeliveryInfomation <DeliveryInfomation
deliveryDate={info.deliveryDate} deliveryDate={info.deliveryDate}
deliveryType={info.deliveryType} deliveryType={info.deliveryType}
receiveAddress={info.receiveAddress} receiveAddress={info.receiveAddress}
receiveUserName={info.receiveUserName} receiveUserName={info.receiveUserName}
receiveUserTel={info.receiveUserTel} receiveUserTel={info.receiveUserTel}
...@@ -147,7 +150,7 @@ const Detail: React.FC<{}> = () => { ...@@ -147,7 +150,7 @@ const Detail: React.FC<{}> = () => {
deliveryUserName={info.deliveryUserName} deliveryUserName={info.deliveryUserName}
deliveryUserTel={info.deliveryUserTel} deliveryUserTel={info.deliveryUserTel}
/> />
</div> </div>
<div style={{marginTop: '20px'}}> <div style={{marginTop: '20px'}}>
<Row justify="space-between"> <Row justify="space-between">
...@@ -163,21 +166,21 @@ const Detail: React.FC<{}> = () => { ...@@ -163,21 +166,21 @@ const Detail: React.FC<{}> = () => {
<Card bodyStyle={{padding: '10px 24px 24px 24px'}}> <Card bodyStyle={{padding: '10px 24px 24px 24px'}}>
<Tabs> <Tabs>
<TabPane tab="外部流转记录" key="1"> <TabPane tab="外部流转记录" key="1">
<Table <Table
rowKey={"id"} rowKey={"id"}
columns={outerWorkflowRecordsColumn} columns={outerWorkflowRecordsColumn}
dataSource={info.outerWorkflowRecordsList} dataSource={info.outerWorkflowRecordsList}
/> />
</TabPane> </TabPane>
<TabPane tab="内部流转记录" key="2"> <TabPane tab="内部流转记录" key="2">
<Table <Table
rowKey={"id"} rowKey={"id"}
columns={innerWorkFlowRecordColumn} columns={innerWorkFlowRecordColumn}
dataSource={info.innerWorkflowRecordsList} dataSource={info.innerWorkflowRecordsList}
/> />
</TabPane> </TabPane>
</Tabs> </Tabs>
</Card> </Card>
</div> </div>
{/* <ProcessDetail /> */} {/* <ProcessDetail /> */}
</PageHeaderWrapper> </PageHeaderWrapper>
...@@ -185,4 +188,4 @@ const Detail: React.FC<{}> = () => { ...@@ -185,4 +188,4 @@ const Detail: React.FC<{}> = () => {
) )
} }
export default Detail export default Detail
\ No newline at end of file
...@@ -27,8 +27,8 @@ export const SUPPLIER_OUTER_STATUS_COLOR = [ ...@@ -27,8 +27,8 @@ export const SUPPLIER_OUTER_STATUS_COLOR = [
] ]
const columns: ColumnsType<any> = [ const columns: ColumnsType<any> = [
{ {
title: '通知单号', title: '通知单号',
dataIndex: 'noticeNo', dataIndex: 'noticeNo',
render: (text, record) => { render: (text, record) => {
const url = '/productionNoticeManage/productionNotice/detail'; const url = '/productionNoticeManage/productionNotice/detail';
...@@ -40,15 +40,15 @@ const columns: ColumnsType<any> = [ ...@@ -40,15 +40,15 @@ const columns: ColumnsType<any> = [
{ title: '通知单摘要', dataIndex: 'summary' }, { title: '通知单摘要', dataIndex: 'summary' },
{ title: '供应会员', dataIndex: 'supplierName' }, { title: '供应会员', dataIndex: 'supplierName' },
{ title: '加工企业名称', dataIndex: 'processName'}, { title: '加工企业名称', dataIndex: 'processName'},
{ {
title: '单据时间', title: '单据时间',
dataIndex: 'createTime', dataIndex: 'createTime',
render: (text, record) => { render: (text, record) => {
return moment(text).format('YYYY-MM-DD HH:mm:ss') return moment(text).format('YYYY-MM-DD HH:mm:ss')
} }
}, },
{ {
title: '外部状态', title: '外部状态',
dataIndex: 'outerStatusName', dataIndex: 'outerStatusName',
render: (text, record) => { render: (text, record) => {
return <StatusTag type={SUPPLIER_OUTER_STATUS_COLOR[record.outerStatus]} title={text}></StatusTag> return <StatusTag type={SUPPLIER_OUTER_STATUS_COLOR[record.outerStatus]} title={text}></StatusTag>
...@@ -62,7 +62,7 @@ const Query: React.FC<IProps> = () => { ...@@ -62,7 +62,7 @@ const Query: React.FC<IProps> = () => {
/** /**
* 查询 * 查询
* @params values 表单字段 * @params values 表单字段
*/ */
const handleSearch = useCallback((values: any) => { const handleSearch = useCallback((values: any) => {
const {docTime, ...rest} = values; const {docTime, ...rest} = values;
...@@ -72,15 +72,21 @@ const Query: React.FC<IProps> = () => { ...@@ -72,15 +72,21 @@ const Query: React.FC<IProps> = () => {
startTime: st, startTime: st,
endTtime: et endTtime: et
} }
ref.current.reload(searchData) ref.current.reload(searchData)
}, []) }, [])
// 初始化高级筛选选项 // 初始化高级筛选选项
const fetchSelectOptions = async () => { const fetchSelectOptions = useCallback(async () => {
return {}; const { data, code } = await PublicApi.getEnhanceSupplierAllOuterAndInner()
}; if(code === 1000) {
return {
outerStatus: data.outerList.map((item: any) => ({label: item.message, value: item.code})),
}
}
return {}
}, []);
const fetchData = useCallback(async (params: any) => { const fetchData = useCallback(async (params: any) => {
const service = PublicApi.getEnhancePlatformAllList; const service = PublicApi.getEnhancePlatformAllList;
...@@ -121,4 +127,4 @@ const Query: React.FC<IProps> = () => { ...@@ -121,4 +127,4 @@ const Query: React.FC<IProps> = () => {
) )
} }
export default Query export default Query
\ No newline at end of file
...@@ -238,11 +238,12 @@ const MemberSettleAdd: React.FC = () => { ...@@ -238,11 +238,12 @@ const MemberSettleAdd: React.FC = () => {
return ( return (
<PageHeaderWrapper <PageHeaderWrapper
extra={[ onBack={() => window.history.back()}
<Button loading={submitLoading} key="1" type="primary" onClick={handleClick} > extra={[
保存 <Button loading={submitLoading} key="1" type="primary" onClick={handleClick} >
</Button>, 保存
]} </Button>,
]}
> >
<Card> <Card>
<NiceForm <NiceForm
......
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