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