Commit d0b6e9eb authored by 前端-许佳敏's avatar 前端-许佳敏
parents c61353f9 96675f1e
......@@ -228,13 +228,18 @@ const ChannelInfo: React.FC<ShopInfoPropsType> = (props) => {
if (!mallItem) {
return ""
}
let newSiteUrl = siteUrl
if (newSiteUrl.indexOf('http') < 0) {
newSiteUrl = `http://` + newSiteUrl
}
if (mallItem.environment === 1) {
switch (mallItem.type) {
case 3:
result = `${siteUrl}/channelmall?channelId=${btoa(JSON.stringify({ shopId: shopInfo.shopId, memberId: shopInfo.memberId }))}`
result = `${newSiteUrl}/channelmall?channelId=${btoa(JSON.stringify({ shopId: shopInfo.shopId, memberId: shopInfo.memberId }))}`
break
case 4:
result = `${siteUrl}/ichannelmall?channelId=${btoa(JSON.stringify({ shopId: shopInfo.shopId, memberId: shopInfo.memberId }))}`
result = `${newSiteUrl}/ichannelmall?channelId=${btoa(JSON.stringify({ shopId: shopInfo.shopId, memberId: shopInfo.memberId }))}`
break
// case 5:
// result = `${siteUrl}/channelmall/pointsMall?channelId=${btoa(JSON.stringify({ shopId: shopInfo.shopId, memberId: shopInfo.memberId }))}`
......
......@@ -3,7 +3,8 @@ import { history } from 'umi';
import { Button, Card, Tabs, message } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import {
SaveOutlined, EditFilled,
SaveOutlined,
EditFilled,
} from '@ant-design/icons'
import ReutrnEle from '@/components/ReturnEle'
......@@ -20,9 +21,6 @@ import ProductDescFormCloud from './addProductsItem/productDescFormCloud'
import { useLocalStore, observer } from 'mobx-react'
import { store } from '@/store'
import { PublicApi } from '@/services/api'
import { render } from '@/app';
const demoFetch = require('../../../../demo').fetchConfig
const { TabPane } = Tabs
......@@ -78,7 +76,6 @@ const AddProducts: React.FC<{}> = (props) => {
// 获取页面使用模板
const productDescriptionTemplate = async () => {
let globalData = await demoFetch()
//@ts-ignore
PublicApi.getTemplateGoodsFindUseGoodsTemplate({ siteId }).then(res => {
if (res.code === 1000)
......
......@@ -37,19 +37,12 @@ const layoutFormList = {
push: 2
},
}
const tailLayout = {
wrapperCol: {
offset: 2,
span: 12,
},
}
interface Iprops {
onChangeAttributeList: (attributeLists:any)=> void;
onRef: (refs: any) => void;
}
interface AreaParams {
provinceCode: any;
provinceName: any;
......@@ -382,14 +375,6 @@ const BasicInfoForm: React.FC<Iprops> = (props) => {
>
{showCategory && <><span className="commonStatusValid"></span>{renderCategoryType()}</>}
</Form.Item>
{/* <Form.Item {...tailLayout}>
<Button type="primary" htmlType="submit">
保存
</Button>
<Button className={styles.ml20}>
取消
</Button>
</Form.Item> */}
</Form>
</>)
}
......
import React, { useState, useEffect, useRef } from 'react'
import { history } from 'umi'
import { Form, Select, Radio, Input, Checkbox, InputNumber } from 'antd'
import { Form, Select, Radio, Checkbox, InputNumber } from 'antd'
import { PublicApi } from '@/services/api'
import { GetLogisticsSelectListCompanyResponse, GetLogisticsSelectListShipperAddressResponse, GetLogisticsSelectListFreightTemplateResponse } from '@/services'
import { store } from '@/store'
......
import React, { useState, useEffect, useRef } from 'react'
import React, { useEffect, useRef } from 'react'
import { history } from 'umi'
import { Form, Select, Radio, Input } from 'antd'
import { Form, Radio, Input } from 'antd'
import { store } from '@/store'
import { validatorByte } from '@/utils/regExp'
const { ProductStore } = store
......@@ -18,7 +18,6 @@ export interface Iprops {
onRef: (refs: any) => void;
}
const { Option } = Select
const { TextArea } = Input
const OtherForm: React.FC<Iprops> = (props) => {
......
import React, { useState, useEffect, useRef, useContext, useCallback, useMemo } from 'react'
import React, { useState, useEffect, useRef, useMemo } from 'react'
import {history} from 'umi'
import { Button, Form, Select, Checkbox, Tooltip, Radio, Input, Table, Modal, Row, Col, InputNumber, message } from 'antd'
import { Button, Form, Select, Checkbox, Tooltip, Radio, Input, Table, Modal, Row, Col, InputNumber } from 'antd'
import styles from './index.less'
import { PublicApi } from '@/services/api'
import { StandardTable } from 'god'
import { ColumnType } from 'antd/lib/table/interface'
import { EyeOutlined, QuestionCircleOutlined, SettingOutlined, PlusOutlined, MinusOutlined, } from '@ant-design/icons'
import { QuestionCircleOutlined, SettingOutlined, PlusOutlined, MinusOutlined, } from '@ant-design/icons'
import { inject, observer } from 'mobx-react'
import { store } from '@/store'
import { IProductSelectAttribute } from '@/module/productModule'
import moment from 'moment'
import { observable } from 'mobx'
const _ = require("lodash");
......@@ -49,7 +46,6 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
const [setPriceModal, setSetPriceModal] = useState(false)
const [ladderPrice, setLadderPrice] = useState(false)
const [curretSetPriceRow, setCurrentSetPriceRow] = useState<any>()
// const [stateTableData, setStateTableData] = useState<any[]>()
const [combineAttributeArray, setCombineAttributeArray] = useState<any[]>([])
const [attributeObjArr, setAttributeObjArr] = useState<any[]>([])
const [attributeValObjArr, setAttributeValObjArr] = useState<any[]>([])
......@@ -422,7 +418,6 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
setPriceForm.resetFields()
setLadderPrice(false)
setPlanPrice(v.target.value)
// priceTypeRef.current = v.target.value
}
const setPriceOk = () => {
......
import React, { useState, useEffect, useRef, useContext } from 'react'
import React, { useState, useEffect, useRef } from 'react'
import {history} from 'umi'
import { Button, Form, Select, Checkbox, Tabs, Input, DatePicker } from 'antd'
import styles from './index.less'
import { Form, Select, Checkbox, Tabs, Input, DatePicker } from 'antd'
import { inject, observer } from 'mobx-react'
import { store } from '@/store'
......@@ -270,14 +269,6 @@ const ProductAttributeForm: React.FC<Iprops> = (props) => {
)
}
</Tabs>
{/* <Form.Item {...tailLayout}>
<Button type="primary" htmlType="submit">
保存
</Button>
<Button className={styles.ml20}>
取消
</Button>
</Form.Item> */}
</Form>
{attributesData?.length === 0 && <span style={{opacity: 0.6}}>暂无数据!</span>}
</>)
......
import React, { useState, useEffect, useRef } from 'react'
import {history} from 'umi'
import { Button, Form, Select, Checkbox, message, Input, Table, Modal, Row, Col, Alert, Upload, Radio } from 'antd'
import { message, Modal, Row, Col, Alert, Upload, Radio } from 'antd'
import { PlusOutlined } from '@ant-design/icons'
import CustomTabs, { ItemPane } from '@/components/CustomTabs'
import styles from './index.less'
import { UploadFile, UploadChangeParam } from 'antd/lib/upload/interface';
import { UploadFile } from 'antd/lib/upload/interface';
import { UPLOAD_TYPE } from '@/constants'
import { inject, observer } from 'mobx-react'
......@@ -36,12 +35,8 @@ const ProductImageForm: React.FC<{}> = (props) => {
// 编辑下 flag为false 不清空;编辑下 flag为true 新建清空
if(history.location.query?.id && !flagRef.current) {
flagRef.current = true
console.log('不清空')
} else {
// constructImageListByRender([])
// setSetImageType(true)
onChangeSetImageType({target: { value: true }})
console.log('清空')
}
}, [selectCategoryId])
......
import React, { useState, useEffect, useContext, useRef } from 'react'
import React, { useState, useEffect, useRef } from 'react'
import {history} from 'umi'
import { Button, Form, Select, Checkbox } from 'antd'
import styles from './index.less'
import { Form, Checkbox } from 'antd'
// import styles from './index.less'
import { PublicApi } from '@/services/api'
import { StandardTable } from 'god'
import { ColumnType } from 'antd/lib/table/interface'
......@@ -20,11 +20,7 @@ const layout = {
},
}
export interface Iprops {
}
const SelectGoodsForm: React.FC<Iprops> = (props) => {
const SelectGoodsForm: React.FC<{}> = (props) => {
const ref = useRef<any>({})
const [selectGoodsForm] = Form.useForm()
const [isSelectGoods, setIsSelectGoods] = useState<boolean>(true) // 货品table显示隐藏
......
......@@ -15,10 +15,15 @@
.logo {
display: inline-block;
padding: 0 130px 0 17px;
width: 145px;
height: 50px;
position: relative;
margin: auto 97px auto 20px;
&>img {
width: 145px;
display: block;
margin: 0 auto;
max-width: 145px;
height: 50px;
}
}
......
......@@ -3,7 +3,7 @@ import { history } from 'umi'
import { Input } from 'antd'
import { GetTemplateChannelFindChannelResponse } from '@/services/TemplateApi'
import isEmpty from 'lodash/isEmpty'
import './index.less'
import styles from './index.less'
import { LAYOUT_TYPE } from '@/constants'
interface HeaderPropsType {
......@@ -49,15 +49,15 @@ const Header: React.FC<HeaderPropsType> = (props) => {
}
return (
<div className="header">
<div className="header_container">
<div className="logo">
<div className={styles.header}>
<div className={styles.header_container}>
<div className={styles.logo}>
<img src={shopInfo?.logo} />
</div>
<div className="mall_search">
<div className="mall_search_box">
<Input className="mall_search_input" value={searchValue} placeholder="请输入关键词" onChange={e => setSearchValue(e.target.value)} onPressEnter={() => handleSearchCommodity()} />
<div className="search_btn" onClick={() => handleSearchCommodity()}>搜索</div>
<div className={styles.mall_search}>
<div className={styles.mall_search_box}>
<Input className={styles.mall_search_input} value={searchValue} placeholder="请输入关键词" onChange={e => setSearchValue(e.target.value)} onPressEnter={() => handleSearchCommodity()} />
<div className={styles.search_btn} onClick={() => handleSearchCommodity()}>搜索</div>
</div>
</div>
</div>
......
......@@ -11,13 +11,17 @@
height: 110px;
display: flex;
align-items: center;
position: relative;
.logo {
padding-left: 14px;
overflow: hidden;
img {
width: 145px;
display: block;
margin: 0 auto;
height: 50px;
max-width: 145px;
}
}
......
......@@ -33,9 +33,7 @@ const CommonHeader: React.FC<ShopHeaderPropsType> = (props) => {
<div className={styles.common_header}>
<div className={styles.common_header_container}>
<div className={styles.logo}>
{/* <Link to={getHomeLink()}> */}
<img src={logoUrl} />
{/* </Link> */}
</div>
<div className={styles.common_header_split}></div>
<div className={styles.common_header_title}>{title}</div>
......
......@@ -12,12 +12,16 @@
height: 110px;
display: flex;
align-items: center;
position: relative;
.logo {
padding-left: 14px;
&>img {
width: 145px;
// width: 145px;
display: block;
margin: 0 auto;
max-width: 145px;
height: 50px;
}
}
......
......@@ -214,16 +214,20 @@ const Order: React.FC<OrderPropsType> = (props) => {
const submitOrder = () => {
let params: any = {
orderModel: getOrderMode(), // 下单模式
deliveryAddresId: selectAddressInfo.id,
addresName: selectAddressInfo.receiverName,
isDefault: selectAddressInfo.isDefault,
province: selectAddressInfo.provinceName,
city: selectAddressInfo.cityName,
area: selectAddressInfo.districtName,
addres: selectAddressInfo.address,
tel: selectAddressInfo.phone,
needTheInvoice: needTheInvoice ? 1 : 0,
}
if (orderInfo.logistics.deliveryType === 1 && !!selectAddressInfo) {
params.deliveryAddresId = selectAddressInfo.id
params.addresName = selectAddressInfo.receiverName
params.isDefault = selectAddressInfo.isDefault
params.province = selectAddressInfo.provinceName
params.city = selectAddressInfo.cityName
params.area = selectAddressInfo.districtName
params.addres = selectAddressInfo.address
params.tel = selectAddressInfo.phone
}
let orderProductRequests = []
for (let item of orderList) {
for (let orderItem of item.orderList) {
......@@ -269,7 +273,7 @@ const Order: React.FC<OrderPropsType> = (props) => {
const checkOrder = () => {
message.destroy()
if (!selectAddressInfo) {
if (orderInfo.logistics.deliveryType === 1 && !selectAddressInfo) {
message.info('请选择收货地址')
return
}
......
......@@ -40,4 +40,21 @@
font-weight: 500;
color: #172B4D;
}
}
.badgeWrap {
&-title {
color: #6B778C;
}
&-content {
line-height: 22px;
font-weight: 500;
color: #172B4D;
}
}
.foot {
padding: 34px 25px 8px;
border-top: 1px solid #F4F5F7;
}
\ No newline at end of file
import React from 'react';
import React, { useState } from 'react';
import {
Row,
Col,
......@@ -26,6 +26,11 @@ interface IntroduceRowProps {
const IntroduceRow: React.FC<IntroduceRowProps> = ({
quotaData = [],
}) => {
const [visibleRecord, setVisibleRecord] = useState(false);
const handleRecordCheckboxChange = e => {
setVisibleRecord(e.target.checked);
};
return (
<Row gutter={23}>
......@@ -39,8 +44,8 @@ const IntroduceRow: React.FC<IntroduceRowProps> = ({
subTitle=""
total={null}
data={quotaData}
height={248}
padding={[24, 0, 24, 0]}
height={276}
padding={[34, 0, 34, 0]}
colors={['#41CC9E', '#EF6260']}
/>
</Col>
......@@ -57,10 +62,16 @@ const IntroduceRow: React.FC<IntroduceRowProps> = ({
<div className={styles.foot}>
<Row>
<Col span={12}>
<Badge color="#EF6260" text="剩余可用额度(元):" />
<div className={styles.badgeWrap}>
<Badge color="#EF6260" text={(<span className={styles['badgeWrap-title']}>剩余可用额度(元):</span>)} />
<span className={styles['badgeWrap-content']}>100,000</span>
</div>
</Col>
<Col span={12}>
<div className={styles.badgeWrap}>
<Badge color="#DFE1E6" text={(<span className={styles['badgeWrap-title']}>总额度(元):</span>)} />
<span className={styles['badgeWrap-content']}>200,000</span>
</div>
</Col>
</Row>
</div>
......@@ -72,7 +83,7 @@ const IntroduceRow: React.FC<IntroduceRowProps> = ({
extra={(
<div className={styles.recordExtra}>
<Space>
<Checkbox>查看交易记录</Checkbox>
<Checkbox onChange={handleRecordCheckboxChange}>查看交易记录</Checkbox>
<Select value="1" style={{ width: 256 }}>
<Option value="1">2020/06/11 ~ 2020/07/11</Option>
<Option value="2">2020/08/11 ~ 2020/09/11</Option>
......@@ -81,33 +92,63 @@ const IntroduceRow: React.FC<IntroduceRowProps> = ({
</div>
)}
>
<Row gutter={100} align="middle">
<Col span={14}>
<div className={styles.repayment}>
<div className={styles['repayment-left']}>
{!visibleRecord ? (
<>
<Row
gutter={100}
align="middle"
style={{
marginBottom: 24,
}}
>
<Col span={14}>
<div className={styles.repayment}>
<div className={styles['repayment-left']}>
<div className={styles.statistic}>
<div className={styles['statistic-title']}>剩余应还(元):</div>
<div className={styles['statistic-amount']}>100,000</div>
</div>
<div className={styles['repayment-end']}>
<span className={styles['repayment-time']}>
2020-08-32到期
</span>
<StatusTag type="danger" title="逾期 3 天" />
</div>
</div>
<div className={styles['repayment-right']}>
<Button type="primary">立即还款</Button>
</div>
</div>
</Col>
<Col span={10}>
<div className={styles.statistic}>
<div className={styles['statistic-title']}>剩余应还(元):</div>
<div className={styles['statistic-title']}>本期账单(元):</div>
<div className={styles['statistic-amount']}>100,000</div>
</div>
<div className={styles['repayment-end']}>
<span className={styles['repayment-time']}>
2020-08-32到期
</span>
<StatusTag type="danger" title="逾期 3 天" />
</div>
</div>
<div className={styles['repayment-right']}>
<Button type="primary">立即还款</Button>
</div>
</Col>
</Row>
<div className={styles.foot}>
<Row>
<Col span={12}>
<div className={styles.badgeWrap}>
<Badge color="#EF6260" text={(<span className={styles['badgeWrap-title']}>剩余可用额度(元):</span>)} />
<span className={styles['badgeWrap-content']}>100,000</span>
</div>
</Col>
<Col span={12}>
<div className={styles.badgeWrap}>
<Badge color="#DFE1E6" text={(<span className={styles['badgeWrap-title']}>总额度(元):</span>)} />
<span className={styles['badgeWrap-content']}>200,000</span>
</div>
</Col>
</Row>
</div>
</Col>
<Col span={10}>
<div className={styles.statistic}>
<div className={styles['statistic-title']}>本期账单(元):</div>
<div className={styles['statistic-amount']}>100,000</div>
</div>
</Col>
</Row>
</>
) : (
<div>
2
</div>
)}
</MellowCard>
</Col>
</Row>
......
......@@ -228,12 +228,17 @@ const ShopInfo: React.FC<ShopInfoPropsType> = (props) => {
return ""
}
if (mallItem.environment === 1) {
let newSiteUrl = siteUrl
if (newSiteUrl.indexOf('http') < 0) {
newSiteUrl = `http://` + newSiteUrl
}
switch (mallItem.type) {
case 1:
result = `${siteUrl}/shop?shopId=${btoa(JSON.stringify({ shopId: shopInfo.id, memberId: shopInfo.memberId }))}`
result = `${newSiteUrl}/shop?shopId=${btoa(JSON.stringify({ shopId: shopInfo.id, memberId: shopInfo.memberId }))}`
break
case 2:
result = `${siteUrl}/shop/pointsMall?shopId=${btoa(JSON.stringify({ shopId: shopInfo.id, memberId: shopInfo.memberId }))}`
result = `${newSiteUrl}/shop/pointsMall?shopId=${btoa(JSON.stringify({ shopId: shopInfo.id, memberId: shopInfo.memberId }))}`
break
default:
result = ""
......
......@@ -28,14 +28,15 @@ const AddRule:React.FC<{}> = (props) => {
// 整体表单提交
const formSubmit = async (values) => {
setIsDisabled(true)
values.products = values.products.map(item => ({
productId: item.id,
commodityId: item.commodityId,
name: item.name,
customerCategoryName: item.customerCategoryName,
priceType: item.priceType,
brandName: item.brandName
}))
if(values?.products)
values.products = values.products.map(item => ({
productId: item.id,
commodityId: item.commodityId,
name: item.name,
customerCategoryName: item.customerCategoryName,
priceType: item.priceType,
brandName: item.brandName
}))
values.isElectronicContract = values.isElectronicContract ? 1 : 0
const params = omit(values, ['state']) // 移除不需要的字段
......
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