Commit 80614671 authored by GuanHua's avatar GuanHua

fix:积分商城列表库存显示字段

parent 235e566d
.card_wrap {
position: relative;
.card_title {
font-size: 16px;
font-weight: bold;
margin-bottom: 16px;
padding-top: 16px;
line-height: 16px;
}
.steps_wrap {
position: relative;
padding-top: 16px;
:global {
.ant-steps-item-content {
text-align: left;
width: auto;
}
.ant-steps-item-tail {
margin: 0 !important;
&::after {
width: 100%;
margin-left: 6px;
}
}
.ant-steps-item-icon {
margin-left: 0 !important;
}
}
}
:global {
.ant-card-body {
padding-top: 8px;
}
.ant-tabs-top>.ant-tabs-nav::before,
.ant-tabs-top>div>.ant-tabs-nav::before {
border-bottom: none;
}
}
}
\ No newline at end of file
import React from 'react'
import { Card, Steps, Tabs } from 'antd'
import styles from '../index.less'
interface taskItemType {
step: number,
taskName: string,
roleName: string,
isExecute: number
}
interface OrderProcessPropsType {
outerTaskList?: taskItemType[],
innerTaskList?: taskItemType[],
showTabs?: boolean
}
const { Step } = Steps
const { TabPane } = Tabs
const OrderProcess: React.FC<OrderProcessPropsType> = (props) => {
const { outerTaskList, innerTaskList, showTabs = false } = props
return (
<Card className={styles.card_wrap}>
{
showTabs ? (
<Tabs defaultActiveKey="1" >
<TabPane tab="外部流转" key="1">
<Steps className={styles.steps_wrap} progressDot current={outerTaskList.length - 1} size="small">
{
outerTaskList && outerTaskList.map(item => (
<Step title={item.taskName} description={item.roleName} />
))
}
</Steps>
</TabPane>
<TabPane tab="内部流转" key="2">
<Steps className={styles.steps_wrap} progressDot current={outerTaskList.length - 1} size="small">
{
innerTaskList && outerTaskList.map(item => (
<Step title={item.taskName} description={item.roleName} />
))
}
</Steps>
</TabPane>
</Tabs>
) : (
<>
<div className={styles.card_title}>外部流转</div>
<Steps className={styles.steps_wrap} progressDot current={outerTaskList.length - 1} size="small">
{
outerTaskList && outerTaskList.map(item => (
<Step title={item.taskName} description={item.roleName} />
))
}
</Steps>
</>
)
}
</Card>
)
}
export default OrderProcess
...@@ -2,6 +2,7 @@ import React, { useState, useEffect } from 'react' ...@@ -2,6 +2,7 @@ import React, { useState, useEffect } from 'react'
import { Spin } from 'antd' import { Spin } from 'antd'
import OrderDetailHeader from '../../components/OrderDetailHeader' import OrderDetailHeader from '../../components/OrderDetailHeader'
import OrderDetailWrapper from '../../components/OrderDetailWrapper' import OrderDetailWrapper from '../../components/OrderDetailWrapper'
import OrderProcess from './components/orderProcess'
interface OrderPreviewPropsType { } interface OrderPreviewPropsType { }
...@@ -29,11 +30,129 @@ const OrderPreview: React.FC<OrderPreviewPropsType> = (props) => { ...@@ -29,11 +30,129 @@ const OrderPreview: React.FC<OrderPreviewPropsType> = (props) => {
{ label: '内部状态', name: 'createTime', span: 8, render: text => '已确认售后完成' }, { label: '内部状态', name: 'createTime', span: 8, render: text => '已确认售后完成' },
] ]
const outerTaskList = [
{
step: 1,
taskName: '提交换货申请单',
roleName: '采购商',
isExecute: 1
},
{
step: 2,
taskName: '确认换货申请单',
roleName: '供应商',
isExecute: 1
},
{
step: 3,
taskName: '退货发货',
roleName: '采购商',
isExecute: 1
},
{
step: 4,
taskName: '退货收货',
roleName: '供应商',
isExecute: 1
},
{
step: 5,
taskName: '确认退货回单',
roleName: '采购商',
isExecute: 1
},
{
step: 6,
taskName: '换货发货',
roleName: '供应商',
isExecute: 1
},
{
step: 7,
taskName: '换货收货',
roleName: '采购商',
isExecute: 1
},
{
step: 8,
taskName: '确认换货回单',
roleName: '供应商',
isExecute: 1
},
{
step: 9,
taskName: '确认售后完成',
roleName: '采购商',
isExecute: 1
},
]
const innerTaskList = [
{
step: 1,
taskName: '提交换货申请单',
roleName: '采购商',
isExecute: 1
},
{
step: 2,
taskName: '确认换货申请单',
roleName: '供应商',
isExecute: 1
},
{
step: 3,
taskName: '退货发货',
roleName: '采购商',
isExecute: 1
},
{
step: 4,
taskName: '退货收货',
roleName: '供应商',
isExecute: 1
},
{
step: 5,
taskName: '确认退货回单',
roleName: '采购商',
isExecute: 1
},
{
step: 6,
taskName: '换货发货',
roleName: '供应商',
isExecute: 1
},
{
step: 7,
taskName: '换货收货',
roleName: '采购商',
isExecute: 1
},
{
step: 8,
taskName: '确认换货回单',
roleName: '供应商',
isExecute: 1
},
{
step: 9,
taskName: '确认售后完成',
roleName: '采购商',
isExecute: 1
},
]
return ( return (
<Spin spinning={loading}> <Spin spinning={loading}>
<OrderDetailHeader headerTitle={headerTiTle} detailList={detailList} detailData={formData} /> <OrderDetailHeader headerTitle={headerTiTle} detailList={detailList} detailData={formData} />
<OrderDetailWrapper> <OrderDetailWrapper>
111 <OrderProcess
outerTaskList={outerTaskList}
innerTaskList={innerTaskList}
showTabs={false}
/>
</OrderDetailWrapper> </OrderDetailWrapper>
</Spin> </Spin>
) )
......
...@@ -45,7 +45,7 @@ const CommodityList: React.FC<CommodityListPropsType> = (props) => { ...@@ -45,7 +45,7 @@ const CommodityList: React.FC<CommodityListPropsType> = (props) => {
{item.min === item.max ? `${numFormat(item.min)}` : `${numFormat(item.min)}~${numFormat(item.max)}`}积分 {item.min === item.max ? `${numFormat(item.min)}` : `${numFormat(item.min)}~${numFormat(item.max)}`}积分
</div> </div>
<div className={styles.goods_name}>{item.name}</div> <div className={styles.goods_name}>{item.name}</div>
<div className={styles.count}>库存:{item.sold || 0}</div> <div className={styles.count}>库存:{item.stockCount || 0}</div>
</div> </div>
</a> </a>
</div> </div>
......
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