Commit 44e2ec5b authored by GuanHua's avatar GuanHua

Merge branch 'test' into dev

parents 05888a15 69c25960
import BASE_CONFIG from '../base.config.json'
import { MALL_ROUTE_USE_CONFIG } from '../config'
const shopInfo = BASE_CONFIG.web.shopInfo
let webChannelInfo = shopInfo.filter(item => item.environment === 1 && item.type === 3)[0] // 渠道商城
let webChannelPointInfo = shopInfo.filter(item => item.environment === 1 && item.type === 5)[0] // 渠道积分商城
const defaultChannelRoute = '/channelmall' // 默认渠道商城根路径
const defaultIChannelPointRoute = '/pointsMall' // 默认渠道积分商城路径
const rootRoute = MALL_ROUTE_USE_CONFIG ? webChannelInfo.url || defaultChannelRoute : defaultChannelRoute
const pointMallRoute = MALL_ROUTE_USE_CONFIG ? webChannelPointInfo.url || defaultIChannelPointRoute : defaultIChannelPointRoute
const ChannelRoute = { const ChannelRoute = {
path: '/channelmall', path: rootRoute,
component: '@/pages/lxMall/layouts/LXChannelLayout', component: '@/pages/lxMall/layouts/LXChannelLayout',
routes: [ routes: [
{ {
// 店铺(渠道商城) // 店铺(渠道商城)
path: `/channelmall`, path: rootRoute,
name: 'shopHome', name: 'shopHome',
key: 'shopHome', key: 'shopHome',
component: '@/pages/lxMall/channel', component: '@/pages/lxMall/channel',
}, },
{ {
// 商品商城 // 商品商城
path: `/channelmall/commodity`, path: `${rootRoute}/commodity`,
name: 'shopCommodity', name: 'shopCommodity',
key: 'shopCommodity', key: 'shopCommodity',
component: '@/pages/lxMall/commodity', component: '@/pages/lxMall/commodity',
}, },
{ {
// 商品详情 // 商品详情
path: `/channelmall/commodity/detail`, path: `${rootRoute}/commodity/detail`,
name: 'channelCommodityDetail', name: 'channelCommodityDetail',
key: 'channelCommodityDetail', key: 'channelCommodityDetail',
hide: true, hide: true,
...@@ -28,7 +39,7 @@ const ChannelRoute = { ...@@ -28,7 +39,7 @@ const ChannelRoute = {
}, },
{ {
// 商品搜索 // 商品搜索
path: `/channelmall/commodity/search`, path: `${rootRoute}/commodity/search`,
name: 'channelmallCommoditySearch', name: 'channelmallCommoditySearch',
key: 'channelmallCommoditySearch', key: 'channelmallCommoditySearch',
hide: true, hide: true,
...@@ -36,21 +47,21 @@ const ChannelRoute = { ...@@ -36,21 +47,21 @@ const ChannelRoute = {
}, },
{ {
// 积分商城 // 积分商城
path: `/channelmall/pointsMall`, path: `${rootRoute}${pointMallRoute}`,
name: 'shopPointsMall', name: 'shopPointsMall',
key: 'channelmallPointsMall', key: 'channelmallPointsMall',
component: '@/pages/lxMall/pointsMall', component: '@/pages/lxMall/pointsMall',
}, },
{ {
// 资讯 // 资讯
path: `/channelmall/infomation`, path: `${rootRoute}/infomation`,
name: 'shopInfomation', name: 'shopInfomation',
key: 'channelmallInfomation', key: 'channelmallInfomation',
component: '@/pages/lxMall/information', component: '@/pages/lxMall/information',
}, },
{ {
// 资讯详情 // 资讯详情
path: '/channelmall/infomation/detail', path: `${rootRoute}/infomation/detail`,
name: 'infomationDetail', name: 'infomationDetail',
key: 'infomationDetail', key: 'infomationDetail',
hide: true, hide: true,
...@@ -58,7 +69,7 @@ const ChannelRoute = { ...@@ -58,7 +69,7 @@ const ChannelRoute = {
}, },
{ {
// 资讯详情搜索 // 资讯详情搜索
path: '/channelmall/infomation/search', path: `${rootRoute}/infomation/search`,
name: 'infomationSearch', name: 'infomationSearch',
key: 'infomationSearch', key: 'infomationSearch',
hide: true, hide: true,
...@@ -66,14 +77,14 @@ const ChannelRoute = { ...@@ -66,14 +77,14 @@ const ChannelRoute = {
}, },
{ {
// 关于我们 // 关于我们
path: `/channelmall/about`, path: `${rootRoute}/about`,
name: 'shopAbout', name: 'shopAbout',
key: 'channelmallAbout', key: 'channelmallAbout',
component: '@/pages/lxMall/shopAbout', component: '@/pages/lxMall/shopAbout',
}, },
{ {
// 进货单 // 进货单
path: '/channelmall/purchaseOrder', path: `${rootRoute}/purchaseOrder`,
name: 'purchaseOrder', name: 'purchaseOrder',
key: 'purchaseOrder', key: 'purchaseOrder',
hide: true, hide: true,
...@@ -82,7 +93,7 @@ const ChannelRoute = { ...@@ -82,7 +93,7 @@ const ChannelRoute = {
}, },
{ {
// 渠道订单 // 渠道订单
path: `/channelmall/order`, path: `${rootRoute}/order`,
name: 'order', name: 'order',
key: 'order', key: 'order',
hide: true, hide: true,
......
...@@ -3,7 +3,9 @@ import routes from './router' ...@@ -3,7 +3,9 @@ import routes from './router'
import proxy from './proxy' import proxy from './proxy'
import theme from './lingxi.theme.config' import theme from './lingxi.theme.config'
export const MALL_ROUTE_USE_CONFIG = process.env.USE_ROUTE_CONFIG || true // 是否使用pass平台配置的商城子域名
const OPEN_THEME_BUILD = process.env.NODE_ENV === 'production' ? true : false // 是否开启动态主题 const OPEN_THEME_BUILD = process.env.NODE_ENV === 'production' ? true : false // 是否开启动态主题
const config: any = { const config: any = {
// 如需写入环境变量 需在config中先写入 // 如需写入环境变量 需在config中先写入
define: { define: {
...@@ -23,7 +25,7 @@ const config: any = { ...@@ -23,7 +25,7 @@ const config: any = {
}, },
routes, routes,
extraBabelPlugins: [ extraBabelPlugins: [
['import', { ['import', {
libraryName: 'bizcharts', libraryName: 'bizcharts',
camel2DashComponentName: false, camel2DashComponentName: false,
customName: require('path').resolve(__dirname, './utils/customBitchartsName.js') customName: require('path').resolve(__dirname, './utils/customBitchartsName.js')
......
import shopRoute from '../shopRoutes'
import channelRoute from '../channelRoutes'
import ichannelRoute from '../selfchannelRoutes'
import { MALL_ROUTE_USE_CONFIG } from '../config'
import BASE_CONFIG from '../base.config.json'
const shopInfo = BASE_CONFIG.web.shopInfo
// let webMallInfo = shopInfo.filter(item => item.environment === 1 && item.type === 1)[0] // 企业商城
let webPointMallInfo = shopInfo.filter(item => item.environment === 1 && item.type === 2)[0] // 积分商城
const defaultPointMallRoute = '/pointsMall' // 积分商城默认路径
const pointMallRoute = MALL_ROUTE_USE_CONFIG ? webPointMallInfo.url || defaultPointMallRoute : defaultPointMallRoute
const mallRoute = { const mallRoute = {
path: '/', path: '/',
...@@ -69,7 +81,7 @@ const mallRoute = { ...@@ -69,7 +81,7 @@ const mallRoute = {
}, },
{ {
// 积分商城 // 积分商城
path: `/pointsMall`, path: pointMallRoute,
name: 'pointsMall', name: 'pointsMall',
key: 'pointsMall', key: 'pointsMall',
component: '@/pages/lxMall/pointsMall', component: '@/pages/lxMall/pointsMall',
...@@ -107,4 +119,9 @@ const mallRoute = { ...@@ -107,4 +119,9 @@ const mallRoute = {
], ],
} }
export default mallRoute export default [
\ No newline at end of file shopRoute,
channelRoute,
ichannelRoute,
mallRoute
]
import memberCenterRoute from './routes' import memberCenterRoute from './routes'
import mallRoute from './mallRoutes' import mallRoute from './mallRoutes'
import shopRoute from './shopRoutes'
import channelRoute from './channelRoutes'
import ichannelRoute from './selfchannelRoutes'
/** /**
* @description 路由配置页, 更多配置可查看 https://umijs.org/zh-CN/docs/routing#routes * @description 路由配置页, 更多配置可查看 https://umijs.org/zh-CN/docs/routing#routes
...@@ -57,10 +54,7 @@ const router = [ ...@@ -57,10 +54,7 @@ const router = [
component: '@/pages/preview/shopPreview', component: '@/pages/preview/shopPreview',
}, },
memberCenterRoute, memberCenterRoute,
shopRoute, ...mallRoute,
channelRoute,
ichannelRoute,
mallRoute,
{ {
component: '@/pages/404', component: '@/pages/404',
}, },
...@@ -68,9 +62,4 @@ const router = [ ...@@ -68,9 +62,4 @@ const router = [
} }
] ]
export const asyncRouterLists = {
memberCenterRoute,
shopRoute
}
export default router export default router
\ No newline at end of file
import BASE_CONFIG from '../base.config.json'
import { MALL_ROUTE_USE_CONFIG } from '../config'
const shopInfo = BASE_CONFIG.web.shopInfo
let webIChannelInfo = shopInfo.filter(item => item.environment === 1 && item.type === 4)[0] // 渠道自有商城
let webChannelPointInfo = shopInfo.filter(item => item.environment === 1 && item.type === 5)[0] // 渠道积分商城
const defaultIChannelRoute = '/ichannelmall' // 默认渠道商城根路径
const defaultIChannelPointRoute = '/pointsMall' // 默认渠道积分商城路径
const rootRoute = MALL_ROUTE_USE_CONFIG ? webIChannelInfo.url || defaultIChannelRoute : defaultIChannelRoute
const pointMallRoute = MALL_ROUTE_USE_CONFIG ? webChannelPointInfo.url || defaultIChannelPointRoute : defaultIChannelPointRoute
const selfChannelRoute = { const selfChannelRoute = {
path: '/ichannelmall', path: rootRoute,
component: '@/pages/lxMall/layouts/LXIChannelLayout', component: '@/pages/lxMall/layouts/LXIChannelLayout',
routes: [ routes: [
{ {
// 店铺(渠道商城) // 店铺(渠道商城)
path: `/ichannelmall`, path: rootRoute,
name: 'shopHome', name: 'shopHome',
key: 'shopHome', key: 'shopHome',
component: '@/pages/lxMall/channel', component: '@/pages/lxMall/channel',
}, },
{ {
// 商品商城 // 商品商城
path: `/ichannelmall/commodity`, path: `${rootRoute}/commodity`,
name: 'shopCommodity', name: 'shopCommodity',
key: 'shopCommodity', key: 'shopCommodity',
component: '@/pages/lxMall/commodity', component: '@/pages/lxMall/commodity',
}, },
{ {
// 商品详情 // 商品详情
path: `/ichannelmall/commodity/detail`, path: `${rootRoute}/commodity/detail`,
name: 'channelCommodityDetail', name: 'channelCommodityDetail',
key: 'channelCommodityDetail', key: 'channelCommodityDetail',
hide: true, hide: true,
...@@ -28,7 +38,7 @@ const selfChannelRoute = { ...@@ -28,7 +38,7 @@ const selfChannelRoute = {
}, },
{ {
// 商品搜索 // 商品搜索
path: `/ichannelmall/commodity/search`, path: `${rootRoute}/commodity/search`,
name: 'channelmallCommoditySearch', name: 'channelmallCommoditySearch',
key: 'channelmallCommoditySearch', key: 'channelmallCommoditySearch',
hide: true, hide: true,
...@@ -36,21 +46,21 @@ const selfChannelRoute = { ...@@ -36,21 +46,21 @@ const selfChannelRoute = {
}, },
{ {
// 积分商城 // 积分商城
path: `/ichannelmall/pointsMall`, path: `${rootRoute}${pointMallRoute}`,
name: 'shopPointsMall', name: 'shopPointsMall',
key: 'channelmallPointsMall', key: 'channelmallPointsMall',
component: '@/pages/lxMall/pointsMall', component: '@/pages/lxMall/pointsMall',
}, },
{ {
// 资讯 // 资讯
path: `/ichannelmall/infomation`, path: `${rootRoute}/infomation`,
name: 'shopInfomation', name: 'shopInfomation',
key: 'channelmallInfomation', key: 'channelmallInfomation',
component: '@/pages/lxMall/information', component: '@/pages/lxMall/information',
}, },
{ {
// 资讯详情 // 资讯详情
path: '/ichannelmall/infomation/detail', path: `${rootRoute}/infomation/detail`,
name: 'infomationDetail', name: 'infomationDetail',
key: 'infomationDetail', key: 'infomationDetail',
hide: true, hide: true,
...@@ -58,7 +68,7 @@ const selfChannelRoute = { ...@@ -58,7 +68,7 @@ const selfChannelRoute = {
}, },
{ {
// 资讯详情搜索 // 资讯详情搜索
path: '/ichannelmall/infomation/search', path: `${rootRoute}/infomation/search`,
name: 'infomationSearch', name: 'infomationSearch',
key: 'infomationSearch', key: 'infomationSearch',
hide: true, hide: true,
...@@ -66,14 +76,14 @@ const selfChannelRoute = { ...@@ -66,14 +76,14 @@ const selfChannelRoute = {
}, },
{ {
// 关于我们 // 关于我们
path: `/ichannelmall/about`, path: `${rootRoute}/about`,
name: 'shopAbout', name: 'shopAbout',
key: 'channelmallAbout', key: 'channelmallAbout',
component: '@/pages/lxMall/shopAbout', component: '@/pages/lxMall/shopAbout',
}, },
{ {
// 进货单 // 进货单
path: '/ichannelmall/purchaseOrder', path: `${rootRoute}/purchaseOrder`,
name: 'purchaseOrder', name: 'purchaseOrder',
key: 'purchaseOrder', key: 'purchaseOrder',
hide: true, hide: true,
...@@ -82,7 +92,7 @@ const selfChannelRoute = { ...@@ -82,7 +92,7 @@ const selfChannelRoute = {
}, },
{ {
// 渠道订单 // 渠道订单
path: `/ichannelmall/order`, path: `${rootRoute}/order`,
name: 'order', name: 'order',
key: 'order', key: 'order',
hide: true, hide: true,
......
...@@ -18,9 +18,9 @@ ...@@ -18,9 +18,9 @@
"prettier": "prettier --write '**/*.{js,jsx,tsx,ts,less,md,json}'", "prettier": "prettier --write '**/*.{js,jsx,tsx,ts,less,md,json}'",
"test": "umi-test", "test": "umi-test",
"test:coverage": "umi-test --coverage", "test:coverage": "umi-test --coverage",
"start:cross": "cross-env SITE_ID=352 yarn start", "start:cross": "cross-env SITE_ID=352 USE_ROUTE_CONFIG=true yarn start",
"start:url": "cross-env SITE_ID=1 BACK_GATEWAY=http://lingxi-all.wg.shushangyun.com yarn start", "start:url": "cross-env SITE_ID=1 BACK_GATEWAY=http://lingxi-all.wg.shushangyun.com USE_ROUTE_CONFIG=true yarn start",
"start:10": "cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.0.10:8100 yarn start" "start:10": "cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.0.10:8100 USE_ROUTE_CONFIG=true yarn start"
}, },
"lint-staged": { "lint-staged": {
"*.{js,jsx,less,md,json}": [ "*.{js,jsx,less,md,json}": [
......
...@@ -14,6 +14,7 @@ import { getRouters, getAuth, asyncRouter, setAuth, setRouters, removeAuth, remo ...@@ -14,6 +14,7 @@ import { getRouters, getAuth, asyncRouter, setAuth, setRouters, removeAuth, remo
import { PublicApi } from './services/api'; import { PublicApi } from './services/api';
// 全局注册虚拟组件 // 全局注册虚拟组件
import '@/components/NiceForm/public' import '@/components/NiceForm/public'
import { GlobalConfig } from '@/global/config'
setup() setup()
...@@ -49,28 +50,28 @@ const mallLists = [ ...@@ -49,28 +50,28 @@ const mallLists = [
'/shop/infomation/search', '/shop/infomation/search',
'/shop/infomation/detail', '/shop/infomation/detail',
'/shop/about', '/shop/about',
'/channelmall', `${GlobalConfig.channelRootRoute}`,
'/channelmall/commodity', `${GlobalConfig.channelRootRoute}/commodity`,
'/channelmall/commodity/search', `${GlobalConfig.channelRootRoute}/commodity/search`,
'/channelmall/commodity/detail', `${GlobalConfig.channelRootRoute}/commodity/detail`,
'/channelmall/pointsMall', `${GlobalConfig.channelRootRoute}/pointsMall`,
'/channelmall/infomation', `${GlobalConfig.channelRootRoute}/infomation`,
'/channelmall/infomation/detail', `${GlobalConfig.channelRootRoute}/infomation/detail`,
'/channelmall/infomation/search', `${GlobalConfig.channelRootRoute}/infomation/search`,
'/channelmall/about', `${GlobalConfig.channelRootRoute}/about`,
'/channelmall/purchaseOrder', `${GlobalConfig.channelRootRoute}/purchaseOrder`,
'/channelmall/order', `${GlobalConfig.channelRootRoute}/order`,
'/ichannelmall', `${GlobalConfig.ichannelRootRoute}`,
'/ichannelmall/commodity', `${GlobalConfig.ichannelRootRoute}/commodity`,
'/ichannelmall/commodity/search', `${GlobalConfig.ichannelRootRoute}/commodity/search`,
'/ichannelmall/commodity/detail', `${GlobalConfig.ichannelRootRoute}/commodity/detail`,
'/ichannelmall/pointsMall', `${GlobalConfig.ichannelRootRoute}/pointsMall`,
'/ichannelmall/infomation', `${GlobalConfig.ichannelRootRoute}/infomation`,
'/ichannelmall/infomation/detail', `${GlobalConfig.ichannelRootRoute}/infomation/detail`,
'/ichannelmall/infomation/search', `${GlobalConfig.ichannelRootRoute}/infomation/search`,
'/ichannelmall/about', `${GlobalConfig.ichannelRootRoute}/about`,
'/ichannelmall/purchaseOrder', `${GlobalConfig.ichannelRootRoute}/purchaseOrder`,
'/ichannelmall/order', `${GlobalConfig.ichannelRootRoute}/order`,
] ]
// let routeAuthUrls: any[] = [] // let routeAuthUrls: any[] = []
......
...@@ -8,5 +8,18 @@ ...@@ -8,5 +8,18 @@
import SELF_CONFIG from '../../../config/base.config.json' import SELF_CONFIG from '../../../config/base.config.json'
import { RootObject } from './global' import { RootObject } from './global'
const MALL_ROUTE_USE_CONFIG = process.env.USE_ROUTE_CONFIG || true
let webChannelInfo = SELF_CONFIG.web.shopInfo.filter(item => item.environment === 1 && item.type === 3)[0] // 渠道商城
let webIChannelInfo = SELF_CONFIG.web.shopInfo.filter(item => item.environment === 1 && item.type === 4)[0] // 渠道自有商城
const defaultChannelRoute = '/channelmall' // 默认渠道商城根路径
const defaultIChannelRoute = '/ichannelmall' // 默认渠道自有商城根路径
const channelRootRoute = MALL_ROUTE_USE_CONFIG ? webChannelInfo.url || defaultChannelRoute : defaultChannelRoute
const ichannelRootRoute = MALL_ROUTE_USE_CONFIG ? webIChannelInfo.url || defaultIChannelRoute : defaultIChannelRoute
SELF_CONFIG.channelRootRoute = channelRootRoute // 渠道商城路由根路径
SELF_CONFIG.ichannelRootRoute = ichannelRootRoute // 渠道自有商城路由根路径
export const GlobalConfig: RootObject = SELF_CONFIG export const GlobalConfig: RootObject = SELF_CONFIG
import React from 'react'
import { Table } from 'antd'
interface outerLogPropsType {
dataSource: []
}
const outerLog: React.FC<outerLogPropsType> = (props) => {
const { dataSource } = props
const columns = [
{
title: '序号',
dataIndex: 'step',
ellipsis: true,
},
{
title: '操作角色',
dataIndex: 'roleName',
ellipsis: true,
},
{
title: '状态',
dataIndex: 'status',
ellipsis: true,
},
{
title: '操作',
dataIndex: 'operate',
ellipsis: true,
},
{
title: '操作时间',
dataIndex: 'operateTime',
ellipsis: true,
},
{
title: '审核意见',
dataIndex: 'opinion',
ellipsis: true,
},
]
return (
<div>
<Table
className="common_tb"
dataSource={dataSource}
rowClassName={(_, index) => (index === 0 || (index % 2) === 0) && "tb_bg"}
columns={columns}
/>
</div>
)
}
export default outerLog
...@@ -3,11 +3,11 @@ import { Table } from 'antd' ...@@ -3,11 +3,11 @@ import { Table } from 'antd'
import styles from '../../../../common/styles.less' import styles from '../../../../common/styles.less'
interface innerLogPropsType { interface TaskLogPropsType {
dataSource: [] dataSource: []
} }
const innerLog: React.FC<innerLogPropsType> = (props) => { const TaskLog: React.FC<TaskLogPropsType> = (props) => {
const { dataSource } = props const { dataSource } = props
const columns = [ const columns = [
...@@ -66,4 +66,4 @@ const innerLog: React.FC<innerLogPropsType> = (props) => { ...@@ -66,4 +66,4 @@ const innerLog: React.FC<innerLogPropsType> = (props) => {
) )
} }
export default innerLog export default TaskLog
...@@ -9,8 +9,7 @@ import ExchangeGoods from './components/exchangeGoods' ...@@ -9,8 +9,7 @@ import ExchangeGoods from './components/exchangeGoods'
import ProofFile from './components/proofFile' import ProofFile from './components/proofFile'
import ReplaceAddress from './components/replaceAddress' import ReplaceAddress from './components/replaceAddress'
import ReturnAddress from './components/returnAddress' import ReturnAddress from './components/returnAddress'
import OuterLog from './components/outerLog' import TaskLog from './components/taskLog'
import InnerLog from './components/innerLog'
import styles from './detail.less' import styles from './detail.less'
interface OrderDetailProps { interface OrderDetailProps {
...@@ -25,7 +24,7 @@ const OrderDetail: React.FC<OrderDetailProps> = (props) => { ...@@ -25,7 +24,7 @@ const OrderDetail: React.FC<OrderDetailProps> = (props) => {
const [form] = Form.useForm() const [form] = Form.useForm()
const [type, setType] = useState<'add' | 'edit' | 'detail'>() const [type, setType] = useState<'add' | 'edit' | 'detail'>()
const [btnLoading, setBtnLoading] = useState<boolean>(false) const [btnLoading, setBtnLoading] = useState<boolean>(false)
const [tabActiveKey, setTabActiveKey] = useState<string>('outerLog') const [tabActiveKey, setTabActiveKey] = useState<string>('basicInfo')
const [replaceApplyInfo, setReplaceApplyInfo] = useState<any>({}) const [replaceApplyInfo, setReplaceApplyInfo] = useState<any>({})
useEffect(() => { useEffect(() => {
...@@ -106,11 +105,8 @@ const OrderDetail: React.FC<OrderDetailProps> = (props) => { ...@@ -106,11 +105,8 @@ const OrderDetail: React.FC<OrderDetailProps> = (props) => {
<TabPane tab="换货收货地址" key="replaceAddress"> <TabPane tab="换货收货地址" key="replaceAddress">
<ReplaceAddress /> <ReplaceAddress />
</TabPane> </TabPane>
<TabPane tab="外部单据流转记录" key="outerLog"> <TabPane tab="流转记录" key="taskLog">
<OuterLog dataSource={[]} /> <TaskLog dataSource={[]} />
</TabPane>
<TabPane tab="内部单据流转记录" key="innerLog">
<InnerLog dataSource={[]} />
</TabPane> </TabPane>
</Tabs> </Tabs>
</Form> </Form>
......
...@@ -189,6 +189,16 @@ ...@@ -189,6 +189,16 @@
font-weight: 400; font-weight: 400;
} }
} }
.inquiry_price {
color: #FFF;
background-color: var(--mall_main_color);
font-size: 14px;
height: 18px;
line-height: 14px;
padding: 2px 8px;
display: inline-block;
}
} }
} }
\ No newline at end of file
...@@ -29,7 +29,7 @@ const CommodityList: React.FC<CommodityListPropsType> = (props) => { ...@@ -29,7 +29,7 @@ const CommodityList: React.FC<CommodityListPropsType> = (props) => {
// 价格需要询价 // 价格需要询价
case 2: case 2:
return ( return (
<div className={styles.goods_price}> <div className={styles.inquiry_price}>
<label>在线询价</label> <label>在线询价</label>
</div> </div>
) )
...@@ -107,7 +107,19 @@ const CommodityList: React.FC<CommodityListPropsType> = (props) => { ...@@ -107,7 +107,19 @@ const CommodityList: React.FC<CommodityListPropsType> = (props) => {
<div className={styles.info_box}> <div className={styles.info_box}>
<div className={styles.info_box_content}> <div className={styles.info_box_content}>
<div className={styles.name}>{item.name}</div> <div className={styles.name}>{item.name}</div>
<div className={styles.price}><span></span>{priceFormat(item.min)}</div> <div className={styles.price}>
{
item.priceType === 1 ? (
<>
<span></span>{priceFormat(item.min)}
</>
) : (
<div className={styles.inquiry_price}>
<label>在线询价</label>
</div>
)
}
</div>
<div className={styles.count}>已售: {numFormat(item.sold) || 0} {item.unitName}</div> <div className={styles.count}>已售: {numFormat(item.sold) || 0} {item.unitName}</div>
</div> </div>
<ul className={styles.tags_list}> <ul className={styles.tags_list}>
......
import React from 'react' import React, { useEffect, useState, useRef } from 'react'
import { LeftOutlined, RightOutlined } from '@ant-design/icons' import { LeftOutlined, RightOutlined } from '@ant-design/icons'
import cx from 'classnames' import cx from 'classnames'
import { Link } from 'umi'
import { Carousel } from 'antd'
import { arrayGroupsByCount } from '@/utils'
import { PublicApi } from '@/services/api'
import moment from 'moment'
import styles from '../../index.less' import styles from '../../index.less'
const buy_dynamic_list = [
{
title: '黑色头层牛皮自然摔纹',
state: 0,
content: '2000平方英尺',
date: '09/09 09:00'
},
{
title: '黑色头层牛皮自然摔纹',
state: 0,
content: '2000平方英尺',
date: '09/09 09:00'
},
{
title: '黑色头层牛皮自然摔纹',
state: 0,
content: '2000平方英尺',
date: '09/09 09:00'
},
{
title: '黑色头层牛皮自然摔纹',
state: 1,
content: '2000平方英尺',
date: '09/09 09:00'
},
{
title: '黑色头层牛皮自然摔纹',
state: 1,
content: '2000平方英尺',
date: '09/09 09:00'
},
{
title: '黑色头层牛皮自然摔纹',
state: 1,
content: '2000平方英尺',
date: '09/09 09:00'
},
]
interface ShoppingNewsPropsType { const ShoppingNews: React.FC = () => {
const [list, setList] = useState<any>([])
const actionRef = useRef<any>()
} useEffect(() => {
fetchData()
const ShoppingNews: React.FC<ShoppingNewsPropsType> = (props) => { }, [])
const buy_dynamic_list = [ const fetchData = () => {
{ PublicApi.getOrderRequisitionFormShoppingNews().then(res => {
title: '黑色头层牛皮自然摔纹', if (res.code === 1000) {
state: 0, setList(arrayGroupsByCount(res.data, 6))
content: '2000平方英尺', }
date: '09/09 09:00' })
}, }
{
title: '黑色头层牛皮自然摔纹',
state: 0,
content: '2000平方英尺',
date: '09/09 09:00'
},
{
title: '黑色头层牛皮自然摔纹',
state: 0,
content: '2000平方英尺',
date: '09/09 09:00'
},
{
title: '黑色头层牛皮自然摔纹',
state: 1,
content: '2000平方英尺',
date: '09/09 09:00'
},
{
title: '黑色头层牛皮自然摔纹',
state: 1,
content: '2000平方英尺',
date: '09/09 09:00'
},
{
title: '黑色头层牛皮自然摔纹',
state: 1,
content: '2000平方英尺',
date: '09/09 09:00'
},
]
return ( return (
<div className={styles.popular_buy_dynamic}> <div className={styles.popular_buy_dynamic}>
...@@ -55,26 +69,34 @@ const ShoppingNews: React.FC<ShoppingNewsPropsType> = (props) => { ...@@ -55,26 +69,34 @@ const ShoppingNews: React.FC<ShoppingNewsPropsType> = (props) => {
<label className={styles.blue}>求购动态</label> <label className={styles.blue}>求购动态</label>
<span>买家求购,卖家快速报价</span> <span>买家求购,卖家快速报价</span>
<div className={styles.find_more_title_page}> <div className={styles.find_more_title_page}>
<div className={cx(styles.page_item, styles.prev)}><LeftOutlined /></div> <div className={cx(styles.page_item, styles.prev)} onClick={() => actionRef.current.prev()}><LeftOutlined /></div>
<div className={cx(styles.page_item, styles.next)}><RightOutlined /></div> <div className={cx(styles.page_item, styles.next)} onClick={() => actionRef.current.next()}><RightOutlined /></div>
</div> </div>
</div> </div>
<div className={styles.popular_buy_dynamic_list}> <Carousel ref={actionRef} autoplaySpeed={5000} autoplay dots={false}>
{ {
buy_dynamic_list.map((item, index) => ( list && list.map((item, index) => (
<div className={styles.popular_buy_dynamic_list_item} key={`popular_buy_dynamic_list_item_${index}`}> <div key={`popular_buy_dynamic_list_${index}`} >
<div className={styles.popular_buy_dynamic_list_item_header}> <div className={styles.popular_buy_dynamic_list}>
<span>{item.title}</span> {
<div className={cx(styles.status_tag, item.state === 1 ? styles.success : '')}>{item.state === 1 ? '已完成' : '比价中'}</div> item.map((item, index) => (
</div> <div className={styles.popular_buy_dynamic_list_item} key={`popular_buy_dynamic_list_item_${index}`}>
<div className={styles.popular_buy_dynamic_list_item_content}> <div className={styles.popular_buy_dynamic_list_item_header}>
<span className={styles.content_text}>{item.content}</span> <Link to={`/memberCenter/tranactionAbility/enquirySubmit/viewEnquiryDetail?id=${item.id}`}>{item.details}</Link>
<span className={styles.content_time}>{item.date}</span> <div className={cx(styles.status_tag, item.state === 1 ? styles.success : '')}>{item.state === 1 ? '已完成' : '比价中'}</div>
</div>
<div className={styles.popular_buy_dynamic_list_item_content}>
<span className={styles.content_text}>{item.count || 0}条回应</span>
<span className={styles.content_time}>{moment(item.deliveryTime).format("MM/DD HH:mm")}</span>
</div>
</div>
))
}
</div> </div>
</div> </div>
)) ))
} }
</div> </Carousel>
</div> </div>
) )
} }
......
...@@ -16,9 +16,6 @@ ...@@ -16,9 +16,6 @@
.find_more_main { .find_more_main {
display: flex; display: flex;
} }
} }
} }
...@@ -128,6 +125,7 @@ ...@@ -128,6 +125,7 @@
.popular_buy_dynamic { .popular_buy_dynamic {
flex: 1; flex: 1;
width: 0;
margin: 0 20px; margin: 0 20px;
background: #ffffff; background: #ffffff;
...@@ -143,7 +141,7 @@ ...@@ -143,7 +141,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
&>span { &>a {
flex: 1; flex: 1;
display: block; display: block;
color: #303133; color: #303133;
......
import React, { useContext, useRef } from 'react' import React, { useContext, useRef } from 'react'
import { Modal, Button } from 'antd' import { Modal, Button, message } from 'antd'
import { createFormActions, ISchema } from '@formily/antd' import { createFormActions, ISchema } from '@formily/antd'
import ModalForm from '@/components/ModalForm' import ModalForm from '@/components/ModalForm'
import { history } from 'umi' import { history } from 'umi'
...@@ -120,6 +120,10 @@ const CreateOrderElectronModal:React.FC<OrderElectronModalProps> = (props) => { ...@@ -120,6 +120,10 @@ const CreateOrderElectronModal:React.FC<OrderElectronModalProps> = (props) => {
const { run: submitRun, loading: submitLoading } = useHttpRequest(PublicApi.postOrderSubmittedReviewOrder) const { run: submitRun, loading: submitLoading } = useHttpRequest(PublicApi.postOrderSubmittedReviewOrder)
const createElectron = async () => { const createElectron = async () => {
const contractTemplateId = schemaActions.getFieldValue('contractTemplateId') const contractTemplateId = schemaActions.getFieldValue('contractTemplateId')
if (!contractTemplateId) {
message.error('请先选择电子合同模板')
return ;
}
const orderNo = data.orderNo const orderNo = data.orderNo
const signMemberId = data.createMemberId const signMemberId = data.createMemberId
......
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