Commit 6c5035f9 authored by 前端-黄佳鑫's avatar 前端-黄佳鑫
parents b4a9d1a7 57ab3da6
export const NOT_CHANGE_VALUE = 'hello, world' export const NOT_CHANGE_VALUE = 'hello, world'
// socket的链接地址, 默认会使用后端接口网关地址 // socket的链接地址, 默认会使用后端接口网关地址
export const SOCKET_URL = process.env.SOCKET_URL || process.env.BACK_GATEWAY || "ws://10.0.0.25:9400" export const SOCKET_URL = process.env.SOCKET_URL || process.env.BACK_GATEWAY.replace('http', 'ws') || "ws://10.0.0.25:9400"
export const MALL_TYPE = { export const MALL_TYPE = {
1: '企业商城', 1: '企业商城',
......
...@@ -24,7 +24,7 @@ const UserHeader: React.FC<UserHeaderProps> = (props) => { ...@@ -24,7 +24,7 @@ const UserHeader: React.FC<UserHeaderProps> = (props) => {
const getRouteName = () => { const getRouteName = () => {
switch (pathname) { switch (pathname) {
case '/user/login': case '/user/login':
setTitle("欢登录") setTitle("欢登录")
break break
case '/user/register': case '/user/register':
setTitle("欢迎注册") setTitle("欢迎注册")
......
...@@ -58,6 +58,8 @@ const SelectProduct:React.FC<IProps> = (props) => { ...@@ -58,6 +58,8 @@ const SelectProduct:React.FC<IProps> = (props) => {
title: '商品名称', title: '商品名称',
dataIndex: 'name', dataIndex: 'name',
key: 'name', key: 'name',
width: 300,
ellipsis: true,
}, },
{ {
title: '品类', title: '品类',
......
...@@ -37,6 +37,7 @@ const LogisticsForm: React.FC<Iprops> = (props) => { ...@@ -37,6 +37,7 @@ const LogisticsForm: React.FC<Iprops> = (props) => {
const [carriageType, setCarriageType] = useState<number>() const [carriageType, setCarriageType] = useState<number>()
const flagRef = useRef<boolean>(false) const flagRef = useRef<boolean>(false)
const [banCarriageType, setBanCarriageType] = useState(false) const [banCarriageType, setBanCarriageType] = useState(false)
const [template, setTemplate] = useState(false) // 是否必填运费模板
const { productInfoByEdit, selectCategoryId, productPriceType } = ProductStore const { productInfoByEdit, selectCategoryId, productPriceType } = ProductStore
...@@ -102,6 +103,19 @@ const LogisticsForm: React.FC<Iprops> = (props) => { ...@@ -102,6 +103,19 @@ const LogisticsForm: React.FC<Iprops> = (props) => {
logisticsForm.setFieldsValue({weight: null}) logisticsForm.setFieldsValue({weight: null})
} }
const changeCarriageType = (e) => {
setCarriageType(e.target.value)
if(e.target.value === 2) {
setTemplate(true)
setIsTemplate(true)
logisticsForm.setFieldsValue({useTemplate: true})
} else {
setTemplate(false)
setIsTemplate(false)
logisticsForm.setFieldsValue({useTemplate: false})
}
}
return (<> return (<>
<Form <Form
{...layout} {...layout}
...@@ -140,7 +154,7 @@ const LogisticsForm: React.FC<Iprops> = (props) => { ...@@ -140,7 +154,7 @@ const LogisticsForm: React.FC<Iprops> = (props) => {
}, },
]} ]}
> >
<Radio.Group onChange={(e)=>setCarriageType(e.target.value)} disabled={banCarriageType}> <Radio.Group onChange={changeCarriageType} disabled={banCarriageType}>
<Radio value={1}>卖家承担运费(默认)</Radio> <Radio value={1}>卖家承担运费(默认)</Radio>
<Radio value={2}>买家承担运费</Radio> <Radio value={2}>买家承担运费</Radio>
</Radio.Group> </Radio.Group>
...@@ -170,17 +184,23 @@ const LogisticsForm: React.FC<Iprops> = (props) => { ...@@ -170,17 +184,23 @@ const LogisticsForm: React.FC<Iprops> = (props) => {
} }
{ {
carriageType === 2 && <Form.Item carriageType === 2 && <Form.Item
name="useTemplate" name="useTemplate"
valuePropName="checked" valuePropName="checked"
label=" " label=" "
> >
<Checkbox onChange={onChangeTemplate}>使用运费模板(只有买家承担运费才能选择)</Checkbox> <Checkbox disabled={template} onChange={onChangeTemplate}>使用运费模板(只有买家承担运费才能选择)</Checkbox>
</Form.Item> </Form.Item>
} }
{ {
isTemplate && <Form.Item isTemplate && <Form.Item
name="templateId" name="templateId"
label="运费模板" label="运费模板"
rules={[
{
required: template,
message: '请正确输入重量',
}
]}
> >
<Select <Select
placeholder="请选择运费模板" placeholder="请选择运费模板"
......
...@@ -330,11 +330,11 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => { ...@@ -330,11 +330,11 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
if(updateFlag.current){ // 初次渲染tab 再次进入tab采用缓存数据 if(updateFlag.current){ // 初次渲染tab 再次进入tab采用缓存数据
_tempObj['单价'] = productInfoByEdit.unitPriceAndPicList[i]?.unitPrice || {} _tempObj['单价'] = productInfoByEdit.unitPriceAndPicList[i]?.unitPrice || {}
}else{ }else{
_tempObj['单价'] = _tableDataSource[i] && tableDataSource[i]['单价'] || {} _tempObj['单价'] = _tableDataSource[i] && tableDataSource[i] || {}
} }
}else{ }else{
_tempObj['对应货品'] = selectedGoods.length > 0 ? selectedGoods[0].id : 0 _tempObj['对应货品'] = selectedGoods.length > 0 ? selectedGoods[0].id : 0
_tempObj['单价'] = _tableDataSource[i] && tableDataSource[i]['单价'] || {} _tempObj['单价'] = _tableDataSource[i] && tableDataSource[i] && tableDataSource[i]['单价'] || {}
} }
// 价格属性变动引发的构建清空价格(仅清空一次) // 价格属性变动引发的构建清空价格(仅清空一次)
if(clearPrice.current){ if(clearPrice.current){
......
...@@ -26,7 +26,7 @@ import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect' ...@@ -26,7 +26,7 @@ import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect'
import { searchBrandOptionEffect, searchCustomerCategoryOptionEffect } from './effect' import { searchBrandOptionEffect, searchCustomerCategoryOptionEffect } from './effect'
import EyePreview from '@/components/EyePreview' import EyePreview from '@/components/EyePreview'
import moment from 'moment' import moment from 'moment'
import { GetProductChannelCommodityGetShopResponse } from '@/services' import { GetProductChannelCommodityGetShopResponse } from '@/services/ProductApi'
// 定义选择的行数据的类型 // 定义选择的行数据的类型
interface Item { interface Item {
...@@ -68,6 +68,8 @@ const DirectChannel: React.FC<{}> = () => { ...@@ -68,6 +68,8 @@ const DirectChannel: React.FC<{}> = () => {
dataIndex: ['channelCommodity', 'commodity', 'name'], dataIndex: ['channelCommodity', 'commodity', 'name'],
key: 'id', key: 'id',
className: 'commonPickColor', className: 'commonPickColor',
width: 300,
ellipsis: true,
render: (text:any, record:any) => <EyePreview render: (text:any, record:any) => <EyePreview
url={`/memberCenter/commodityAbility/commodity/products/directChannel/detail?id=${record.id}`} url={`/memberCenter/commodityAbility/commodity/products/directChannel/detail?id=${record.id}`}
> >
......
...@@ -257,4 +257,11 @@ ...@@ -257,4 +257,11 @@
background-color: #909399 !important; background-color: #909399 !important;
} }
} }
}
.overFlowEllipsis {
width: 300px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
} }
\ No newline at end of file
...@@ -109,7 +109,9 @@ const Products: React.FC<{}> = () => { ...@@ -109,7 +109,9 @@ const Products: React.FC<{}> = () => {
dataIndex: 'name', dataIndex: 'name',
key: 'name', key: 'name',
className: 'commonPickColor', className: 'commonPickColor',
render: (text: any, record: any) => <span className="commonPickColor" onClick={() => handleSee(record)}>{text}&nbsp;<EyeOutlined /></span> width: 300,
ellipsis: true,
render: (text: any, record: any) => <a title={text} onClick={() => handleSee(record)}>{text}&nbsp;<EyeOutlined /></a>
}, },
{ {
title: '品类', title: '品类',
......
...@@ -68,7 +68,7 @@ export const channelSchema: ISchema = { ...@@ -68,7 +68,7 @@ export const channelSchema: ISchema = {
defaultActiveFirstOption: false, defaultActiveFirstOption: false,
filterOption: false, filterOption: false,
notFoundContent: null, notFoundContent: null,
style: { width: '174px', lineHeight: '32px' }, // style: { width: '174px', lineHeight: '32px' },
searchValue: null, searchValue: null,
dataoption: [], dataoption: [],
}, },
...@@ -83,7 +83,7 @@ export const channelSchema: ISchema = { ...@@ -83,7 +83,7 @@ export const channelSchema: ISchema = {
defaultActiveFirstOption: false, defaultActiveFirstOption: false,
filterOption: false, filterOption: false,
notFoundContent: null, notFoundContent: null,
style: { width: '174px', lineHeight: '32px' }, // style: { width: '174px', lineHeight: '32px' },
searchValue: null, searchValue: null,
dataoption: [] dataoption: []
}, },
...@@ -102,7 +102,7 @@ export const channelSchema: ISchema = { ...@@ -102,7 +102,7 @@ export const channelSchema: ISchema = {
], ],
'x-component-props': { 'x-component-props': {
placeholder: '商品来源', placeholder: '商品来源',
style: { width: '174px' }, // style: { width: '174px' },
}, },
}, },
statusList: { statusList: {
...@@ -123,7 +123,7 @@ export const channelSchema: ISchema = { ...@@ -123,7 +123,7 @@ export const channelSchema: ISchema = {
], ],
'x-component-props': { 'x-component-props': {
placeholder: '商品状态', placeholder: '商品状态',
style: { width: '174px' }, // style: { width: '174px' },
}, },
}, },
priceTypeList: { priceTypeList: {
...@@ -144,7 +144,7 @@ export const channelSchema: ISchema = { ...@@ -144,7 +144,7 @@ export const channelSchema: ISchema = {
], ],
'x-component-props': { 'x-component-props': {
placeholder: '产品定价', placeholder: '产品定价',
style: { width: '174px' }, // style: { width: '174px' },
}, },
}, },
'NO_NAME_FIELD_$2': { 'NO_NAME_FIELD_$2': {
......
...@@ -262,7 +262,7 @@ const CommodityDetail = (props) => { ...@@ -262,7 +262,7 @@ const CommodityDetail = (props) => {
} }
/** /**
* 获取会员权益餐宿 * 获取会员权益参数
* @param memberId * @param memberId
* @param memberRoleId * @param memberRoleId
*/ */
......
...@@ -35,10 +35,10 @@ const AboutUs: React.FC<AboutUsPropsType> = (props) => { ...@@ -35,10 +35,10 @@ const AboutUs: React.FC<AboutUsPropsType> = (props) => {
link = `/shop/about?shopId=${shopUrlParam}` link = `/shop/about?shopId=${shopUrlParam}`
break break
case LAYOUT_TYPE.channel: case LAYOUT_TYPE.channel:
link = `${GlobalConfig.channelRootRoute}/about?id=${shopUrlParam}` link = `${GlobalConfig.channelRootRoute}/about?channelId=${shopUrlParam}`
break break
case LAYOUT_TYPE.ichannel: case LAYOUT_TYPE.ichannel:
link = `${GlobalConfig.ichannelRootRoute}/about?id=${shopUrlParam}` link = `${GlobalConfig.ichannelRootRoute}/about?channelId=${shopUrlParam}`
break break
} }
return link return link
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
position: relative; position: relative;
margin: auto 97px auto 20px; margin: auto 97px auto 20px;
&>img { img {
display: block; display: block;
margin: 0 auto; margin: 0 auto;
max-width: 145px; max-width: 145px;
......
...@@ -53,7 +53,9 @@ const Header: React.FC<HeaderPropsType> = (props) => { ...@@ -53,7 +53,9 @@ const Header: React.FC<HeaderPropsType> = (props) => {
<div className={styles.header}> <div className={styles.header}>
<div className={styles.header_container}> <div className={styles.header_container}>
<div className={styles.logo}> <div className={styles.logo}>
<img src={shopInfo?.logo} /> <a href={`${type === LAYOUT_TYPE.channel ? GlobalConfig.channelRootRoute : GlobalConfig.ichannelRootRoute}?channelId=${shopUrlParam}`}>
<img src={shopInfo?.logo} />
</a>
</div> </div>
<div className={styles.mall_search}> <div className={styles.mall_search}>
<div className={styles.mall_search_box}> <div className={styles.mall_search_box}>
......
import React from 'react' import React from 'react'
import styles from './index.less' import styles from './index.less'
import { LAYOUT_TYPE } from '@/constants' import { LAYOUT_TYPE } from '@/constants'
import { GlobalConfig } from '@/global/config'
interface ShopHeaderPropsType { interface ShopHeaderPropsType {
title?: string; title?: string;
...@@ -11,13 +12,31 @@ interface ShopHeaderPropsType { ...@@ -11,13 +12,31 @@ interface ShopHeaderPropsType {
const CommonHeader: React.FC<ShopHeaderPropsType> = (props) => { const CommonHeader: React.FC<ShopHeaderPropsType> = (props) => {
const { title, logoUrl } = props const { title, logoUrl, type, shopUrlParam } = props
const getLink = () => {
let url: string = ''
switch(type) {
case LAYOUT_TYPE.channel:
url = `${GlobalConfig.channelRootRoute}?channelId=${shopUrlParam}`
break
case LAYOUT_TYPE.ichannel:
url = `${GlobalConfig.ichannelRootRoute}?channelId=${shopUrlParam}`
break
default:
url = '/'
break
}
return url
}
return ( return (
<div className={styles.common_header}> <div className={styles.common_header}>
<div className={styles.common_header_container}> <div className={styles.common_header_container}>
<div className={styles.logo}> <div className={styles.logo}>
<img src={logoUrl} /> <a href={getLink()}>
<img src={logoUrl} />
</a>
</div> </div>
<div className={styles.common_header_split}></div> <div className={styles.common_header_split}></div>
<div className={styles.common_header_title}>{title}</div> <div className={styles.common_header_title}>{title}</div>
......
...@@ -184,7 +184,7 @@ const Recommand: React.FC<RecommandPropsType> = (props) => { ...@@ -184,7 +184,7 @@ const Recommand: React.FC<RecommandPropsType> = (props) => {
return link return link
} }
return ( return( list && list.length > 0) ? (
<div className={styles.recommand}> <div className={styles.recommand}>
<div className={styles.recommand_title}>买家还在看</div> <div className={styles.recommand_title}>买家还在看</div>
<div className={styles.recommand_list}> <div className={styles.recommand_list}>
...@@ -206,7 +206,7 @@ const Recommand: React.FC<RecommandPropsType> = (props) => { ...@@ -206,7 +206,7 @@ const Recommand: React.FC<RecommandPropsType> = (props) => {
} }
</div> </div>
</div> </div>
) ) : null
} }
export default inject('SiteStore')(observer(Recommand)) export default inject('SiteStore')(observer(Recommand))
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
height: 48px; height: 48px;
margin-right: 8px; margin-right: 8px;
&>img { img {
width: 48px; width: 48px;
height: 48px; height: 48px;
} }
......
...@@ -95,7 +95,9 @@ const ShopHeader: React.FC<ShopHeaderPropsType> = (props) => { ...@@ -95,7 +95,9 @@ const ShopHeader: React.FC<ShopHeaderPropsType> = (props) => {
<div className={styles.shop_header_split}></div> <div className={styles.shop_header_split}></div>
<div className={styles.shop_header_info}> <div className={styles.shop_header_info}>
<div className={styles.shop_header_info_logo}> <div className={styles.shop_header_info_logo}>
<img src={shopInfo?.logo} /> <a href={`/shop?shopId=${shopUrlParam}`}>
<img src={shopInfo?.logo} />
</a>
</div> </div>
<div className={styles.shop_header_info_content}> <div className={styles.shop_header_info_content}>
<div className={styles.shop_header_info_content_name}> <div className={styles.shop_header_info_content_name}>
......
import React, { useEffect, useState } from 'react' import React, { Fragment, useEffect, useState } from 'react'
import { import {
BasicLayoutProps as ProLayoutProps, BasicLayoutProps as ProLayoutProps,
getMenuData getMenuData
} from '@ant-design/pro-layout' } from '@ant-design/pro-layout'
import SelectLang from '@/layouts/components/SelectLang' import SelectLang from '@/layouts/components/SelectLang'
import { useIntl } from 'umi' import { useIntl, Helmet } from 'umi'
import { LAYOUT_TYPE } from "@/constants" import { LAYOUT_TYPE } from "@/constants"
import { inject, observer } from 'mobx-react' import { inject, observer } from 'mobx-react'
import TopBar from '../components/TopBar' import TopBar from '../components/TopBar'
...@@ -82,34 +82,41 @@ const LXIChannelLayout: React.FC<LXIChannelLayoutPropsType> = (props) => { ...@@ -82,34 +82,41 @@ const LXIChannelLayout: React.FC<LXIChannelLayoutPropsType> = (props) => {
}, [shopInfo]) }, [shopInfo])
return ( return (
<div className={styles.lxmall_page}> <Fragment>
<TopBar langComponent={<SelectLang />} name={shopInfo?.company} type={LAYOUT_TYPE.ichannel} shopUrlParam={channelId} /> <Helmet>
<div className={styles.content}>
{ {
!menuRouter?.hideHeader && ( shopInfo ? <title>{shopInfo.company}</title> : null
<>
<ChannelHeader id={query.shopId} shopUrlParam={channelId} shopInfo={shopInfo} type={LAYOUT_TYPE.ichannel} />
<MainNav menuData={menuData} pathname={location.pathname} type={LAYOUT_TYPE.ichannel} memberId={query.memberId} shopId={query.shopId} shopUrlParam={channelId} />
</>
)
}
{
!loading ? shopInfo ? children && React.Children.map(children, (child: any) => {
return React.cloneElement(child,
{
layoutType: LAYOUT_TYPE.ichannel,
shopId: query.shopId,
memberId: query.memberId,
shopUrlParam: channelId,
shopInfo
},
);
}) : <SearchShopResult type={2} /> : null
} }
</Helmet>
<div className={styles.lxmall_page}>
<TopBar langComponent={<SelectLang />} name={shopInfo?.company} type={LAYOUT_TYPE.ichannel} shopUrlParam={channelId} />
<div className={styles.content}>
{
!menuRouter?.hideHeader && (
<>
<ChannelHeader id={query.shopId} shopUrlParam={channelId} shopInfo={shopInfo} type={LAYOUT_TYPE.ichannel} />
<MainNav menuData={menuData} pathname={location.pathname} type={LAYOUT_TYPE.ichannel} memberId={query.memberId} shopId={query.shopId} shopUrlParam={channelId} />
</>
)
}
{
!loading ? shopInfo ? children && React.Children.map(children, (child: any) => {
return React.cloneElement(child,
{
layoutType: LAYOUT_TYPE.ichannel,
shopId: query.shopId,
memberId: query.memberId,
shopUrlParam: channelId,
shopInfo
},
);
}) : <SearchShopResult type={2} /> : null
}
</div>
<Footer />
<SideNav type={LAYOUT_TYPE.ichannel} shopUrlParam={channelId} />
</div> </div>
<Footer /> </Fragment>
<SideNav type={LAYOUT_TYPE.ichannel} shopUrlParam={channelId} />
</div>
) )
} }
......
...@@ -80,6 +80,7 @@ const CreditPayWay: React.FC<CreditPayWayPropsType> = (props) => { ...@@ -80,6 +80,7 @@ const CreditPayWay: React.FC<CreditPayWayPropsType> = (props) => {
let param = { let param = {
id: Number(orderId), id: Number(orderId),
paymentInformationId: Number(payInfo.paymentInformationId), paymentInformationId: Number(payInfo.paymentInformationId),
payTypeId: payInfo.paymentChannelsId,
payPassword: Number(payPassword) payPassword: Number(payPassword)
} }
setConfirmLoading(true) setConfirmLoading(true)
......
...@@ -70,8 +70,9 @@ const TransferPayWay: React.FC<TransferPayWayPropsType> = (props) => { ...@@ -70,8 +70,9 @@ const TransferPayWay: React.FC<TransferPayWayPropsType> = (props) => {
return return
} }
let param = { let param = {
id: orderId, id: Number(orderId),
paymentInformationId: payInfo.paymentInformationId, paymentInformationId: payInfo.paymentInformationId,
payTypeId: payInfo.paymentChannelsId,
payOrderUrls: JSON.stringify([payOrderUrl]) payOrderUrls: JSON.stringify([payOrderUrl])
} }
setConfirmLoading(true) setConfirmLoading(true)
......
import React from 'react' import React, { useEffect } from 'react'
import { GetOrderOrderPayDetailsResponse } from '@/services/OrderApi'
import { LAYOUT_TYPE } from '@/constants'
import wechatIcon from '@/assets/imgs/wechat_icon.png' import wechatIcon from '@/assets/imgs/wechat_icon.png'
import wechatImg from '@/assets/imgs/wechat.png' import wechatImg from '@/assets/imgs/wechat.png'
import { priceFormat } from '@/utils/numberFomat'
import { PublicApi } from '@/services/api'
import styles from './index.less' import styles from './index.less'
import { useState } from 'react'
interface WechatPayWayPropsType { interface WechatPayWayPropsType {
payInfo: GetOrderOrderPayDetailsResponse,
orderInfo: any,
orderId: number,
onChange: Function,
layoutType?: LAYOUT_TYPE,
shopUrlParam?: string
} }
const WechatPayWay: React.FC<WechatPayWayPropsType> = (props) => { const WechatPayWay: React.FC<WechatPayWayPropsType> = (props) => {
const { payInfo, orderId, onChange, orderInfo, layoutType, shopUrlParam } = props
const [wechatPayUrl, setWechatPayUrl] = useState<string>('')
useEffect(() => {
pay()
}, [])
const pay = () => {
let param = {
id: Number(orderId),
paymentInformationId: payInfo.paymentInformationId,
payTypeId: payInfo.paymentChannelsId,
}
//@ts-ignore
PublicApi.postOrderPendingOrderPay(param).then(res => {
// setWechatPayUrl(res.data)
}).catch(() => {
onChange(false)
})
}
return ( return (
<> <>
...@@ -22,7 +53,7 @@ const WechatPayWay: React.FC<WechatPayWayPropsType> = (props) => { ...@@ -22,7 +53,7 @@ const WechatPayWay: React.FC<WechatPayWayPropsType> = (props) => {
</div> </div>
<div className={styles.wechat_payway_needpay}> <div className={styles.wechat_payway_needpay}>
<label>当前需支付:</label> <label>当前需支付:</label>
<span>20,000</span> <span>{priceFormat(payInfo.payPrice)}</span>
<label>RMB</label> <label>RMB</label>
</div> </div>
</div> </div>
......
...@@ -107,7 +107,7 @@ const PayPage: React.FC<PayPagePropsType> = (props) => { ...@@ -107,7 +107,7 @@ const PayPage: React.FC<PayPagePropsType> = (props) => {
case PayWayType.credit: case PayWayType.credit:
return <CreditPayWay payInfo={payInfo} orderInfo={orderInfo} orderId={orderId} onChange={(state) => handlePayChangge(state)} {...props} /> return <CreditPayWay payInfo={payInfo} orderInfo={orderInfo} orderId={orderId} onChange={(state) => handlePayChangge(state)} {...props} />
case PayWayType.wechat: case PayWayType.wechat:
return <WechatPayWay /> return <WechatPayWay payInfo={payInfo} orderInfo={orderInfo} orderId={orderId} onChange={(state) => handlePayChangge(state)} {...props} />
case PayWayType.bank: case PayWayType.bank:
return <BankPayWay /> return <BankPayWay />
case PayWayType.transfer: case PayWayType.transfer:
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
padding-right: 60px; padding-right: 60px;
} }
.shop_about_btn { .shop_about_btn {
padding: 0 15px; padding: 0 15px;
height: 32px; height: 32px;
...@@ -347,4 +347,28 @@ ...@@ -347,4 +347,28 @@
} }
} }
} }
}
.mallComfirm {
position: relative;
:global {
.ant-modal-confirm-btns {
.ant-btn {
&:hover {
color: var(--mall_main_color);
border-color: var(--mall_main_color);
}
}
.ant-btn-primary {
background-color: var(--mall_main_color);
border-color: var(--mall_main_color);
&:hover {
color: #ffffff;
}
}
}
}
} }
\ No newline at end of file
import React, { useState, useEffect } from 'react' import React, { useState, useEffect } from 'react'
import { Rate, Button, message } from 'antd' import { Rate, Button, message, Modal } from 'antd'
import { LeftOutlined, RightOutlined } from '@ant-design/icons' import { LeftOutlined, RightOutlined } from '@ant-design/icons'
import cx from 'classnames' import cx from 'classnames'
import shop_icon from '@/assets/imgs/shop_icon.png' import shop_icon from '@/assets/imgs/shop_icon.png'
...@@ -44,17 +44,34 @@ const ShopAbout: React.FC<ShopAboutPropType> = (props) => { ...@@ -44,17 +44,34 @@ const ShopAbout: React.FC<ShopAboutPropType> = (props) => {
const applyFroVip = () => { const applyFroVip = () => {
if (shopInfo) { if (shopInfo) {
let param = { Modal.confirm({
memberId: shopInfo.memberId, centered: true,
roleId: shopInfo.roleId className: styles.mallComfirm,
} content: layoutType === LAYOUT_TYPE.shop ? `是否申请成为该店铺会员?` : '是否申请成为该渠道所属下级渠道会员?',
setApplyLoading(true) onOk: () => {
PublicApi.postMemberAbilityMallSubApply(param).then((res) => { return new Promise((resolve, reject) => {
if (res.code === 1000) { } let param = {
setApplyLoading(false) memberId: shopInfo.memberId,
}).catch(() => { roleId: shopInfo.roleId
setApplyLoading(false) }
setApplyLoading(true)
PublicApi.postMemberAbilityMallSubApply(param).then((res) => {
if (res.code === 1000) {
resolve()
} else {
reject()
}
setApplyLoading(false)
}).catch(() => {
setApplyLoading(false)
reject()
})
})
}
}) })
} }
} }
...@@ -106,7 +123,7 @@ const ShopAbout: React.FC<ShopAboutPropType> = (props) => { ...@@ -106,7 +123,7 @@ const ShopAbout: React.FC<ShopAboutPropType> = (props) => {
{ {
layoutType === LAYOUT_TYPE.shop && <div className={cx(styles.shop_about_btn, collectState ? styles.active : "")} onClick={() => handleCollect()}>{collectState ? '已收藏本店' : '收藏本店'}</div> layoutType === LAYOUT_TYPE.shop && <div className={cx(styles.shop_about_btn, collectState ? styles.active : "")} onClick={() => handleCollect()}>{collectState ? '已收藏本店' : '收藏本店'}</div>
} }
<Button loading={applyLoading} className={cx(styles.shop_about_btn, styles.primary)} onClick={() => applyFroVip()}>申请成为本店会员</Button> <Button loading={applyLoading} className={cx(styles.shop_about_btn, styles.primary)} onClick={() => applyFroVip()}>{layoutType === LAYOUT_TYPE.shop ? '申请成为本店会员' : '申请加盟'}</Button>
</div> </div>
</div> </div>
<div className={cx(styles.shop_about_info_item, styles.auto_width)}> <div className={cx(styles.shop_about_info_item, styles.auto_width)}>
...@@ -137,7 +154,7 @@ const ShopAbout: React.FC<ShopAboutPropType> = (props) => { ...@@ -137,7 +154,7 @@ const ShopAbout: React.FC<ShopAboutPropType> = (props) => {
</div> </div>
<div className={styles.shop_about_split}> <div className={styles.shop_about_split}>
<div className={styles.shop_about_split_line}></div> <div className={styles.shop_about_split_line}></div>
<div className={styles.shop_about_split_text}>公司 介绍</div> <div className={styles.shop_about_split_text}>公司介绍</div>
<div className={styles.shop_about_split_line}></div> <div className={styles.shop_about_split_line}></div>
</div> </div>
<div className={styles.shop_workshopimg_list}> <div className={styles.shop_workshopimg_list}>
......
...@@ -306,6 +306,8 @@ const PositionSetting:React.FC<PositionSettingProps> = (props) => { ...@@ -306,6 +306,8 @@ const PositionSetting:React.FC<PositionSettingProps> = (props) => {
dataIndex: 'name', dataIndex: 'name',
align: 'center', align: 'center',
key: 'name', key: 'name',
width: 210,
ellipsis: true,
}, },
{ {
title: '品类', title: '品类',
......
...@@ -45,20 +45,20 @@ const OrderHandReceivedModal:React.FC<OrderHandReceivedModalProps> = ({currentRe ...@@ -45,20 +45,20 @@ const OrderHandReceivedModal:React.FC<OrderHandReceivedModalProps> = ({currentRe
formData && formData &&
<> <>
<Row> <Row>
<Col span={6}>发货地址: </Col> <Col span={6}><p>发货地址: </p></Col>
<Col>{formData.name}</Col> <Col><p>{formData.name}</p></Col>
</Row> </Row>
<Row> <Row>
<Col span={6}>发货时间: </Col> <Col span={6}><p>发货时间: </p></Col>
<Col>{moment(formData.deliverTime).format('YYYY-MM-DD')}</Col> <Col><p>{moment(formData.deliverTime).format('YYYY-MM-DD')}</p></Col>
</Row> </Row>
<Row> <Row>
<Col span={6}>物流单号: </Col> <Col span={6}><p>物流单号: </p></Col>
<Col>{formData.deliverNo}</Col> <Col><p><a href={`https://www.kuaidi100.com/chaxun?nu=${formData.deliverNo}`} target="_blank">{formData.deliverNo}</a></p></Col>
</Row> </Row>
<Row> <Row>
<Col span={6}>物流公司: </Col> <Col span={6}><p>物流公司: </p></Col>
<Col>{formData.logisticsCompany}</Col> <Col><p>{formData.logisticsCompany}</p></Col>
</Row> </Row>
</> </>
} }
......
.orderCollectCard {
:global {
.ant-form-item-explain-error {
position: absolute;
top: 92%;
}
}
}
\ No newline at end of file
...@@ -29,6 +29,7 @@ import { changeRouterTitleByStatus } from '../../_public/order/utils' ...@@ -29,6 +29,7 @@ import { changeRouterTitleByStatus } from '../../_public/order/utils'
import { ReadyAddOrderDetailContext } from '../context' import { ReadyAddOrderDetailContext } from '../context'
import AuditProcess from '@/components/AuditProcess' import AuditProcess from '@/components/AuditProcess'
import styles from './index.less'
export interface PurchaseOrderDetailProps {} export interface PurchaseOrderDetailProps {}
...@@ -329,7 +330,7 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => { ...@@ -329,7 +330,7 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
[] []
} }
></AuditProcess> } ></AuditProcess> }
<Card className='' style={{marginTop: 24}}> <Card className={styles.orderCollectCard} style={{marginTop: 24}}>
<NiceForm <NiceForm
loading={formLoading} loading={formLoading}
previewPlaceholder=' ' previewPlaceholder=' '
......
...@@ -28,10 +28,10 @@ export const baseOrderListColumns: any[] = [ ...@@ -28,10 +28,10 @@ export const baseOrderListColumns: any[] = [
key: 'orderThe', key: 'orderThe',
}, },
{ {
title: '供应会员', title: '采购会员',
align: 'center', align: 'center',
dataIndex: 'supplyMembersName', dataIndex: 'memberName',
key: 'supplyMembersName', key: 'memberName',
}, },
{ {
title: '下单时间', 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