Commit a3c3a06b authored by XieZhiXiong's avatar XieZhiXiong
parents 63517686 40eb3535
......@@ -63,7 +63,6 @@ export enum LAYOUT_TYPE {
channelScoreMall = 'channelScoreMall',
}
// 本地环境跳过权限校验
export const isDev = process.env.NODE_ENV === "development"
// export const isDev = false
......@@ -92,8 +91,8 @@ export const VIP_RULE_COMMENT = 3; // 评论
export const MEMBER_STATUS_NORMAL = 1; // 正常的
export const MEMBER_STATUS_FROZEN = 2; // 冻结的
export const MEMBER_STATUS = {
[MEMBER_STATUS_NORMAL]: '正常',
[MEMBER_STATUS_FROZEN]: '冻结',
[MEMBER_STATUS_NORMAL]: '正常',
[MEMBER_STATUS_FROZEN]: '冻结',
};
// 会员类型
......@@ -102,10 +101,10 @@ export const MEMBER_TYPE_INDIVIDUAL = 2; // 个人会员
export const MEMBER_TYPE_CHANNEL_CORPORATE = 3; // 渠道企业会员
export const MEMBER_TYPE_CHANNEL_INDIVIDUAL = 4; // 渠道个人会员
export const MEMBER_TYPE = {
[MEMBER_TYPE_CORPORATE]: '企业会员',
[MEMBER_TYPE_INDIVIDUAL]: '个人会员',
[MEMBER_TYPE_CHANNEL_CORPORATE]: '渠道企业会员',
[MEMBER_TYPE_CHANNEL_INDIVIDUAL]: '渠道个人会员',
[MEMBER_TYPE_CORPORATE]: '企业会员',
[MEMBER_TYPE_INDIVIDUAL]: '个人会员',
[MEMBER_TYPE_CHANNEL_CORPORATE]: '渠道企业会员',
[MEMBER_TYPE_CHANNEL_INDIVIDUAL]: '渠道个人会员',
};
// 会员内部状态
......@@ -117,11 +116,11 @@ export const MEMBER_INNER_STATUS_FAILED = 4; // 审核不通过
export const MEMBER_INNER_STATUS_SUCCESS = 5; // 审核通过
export const MEMBER_INNER_STATUS = {
[MEMBER_INNER_STATUS_REGISTERED]: '申请注册',
[MEMBER_INNER_STATUS_UNCOMMITTED]: '待提交审核',
[MEMBER_INNER_STATUS_UNREVIEWED_1]: '待一级审核',
[MEMBER_INNER_STATUS_UNREVIEWED_2]: '待二级审核',
[MEMBER_INNER_STATUS_FAILED]: '审核不通过',
[MEMBER_INNER_STATUS_SUCCESS]: '审核通过',
[MEMBER_INNER_STATUS_UNCOMMITTED]: '待提交审核',
[MEMBER_INNER_STATUS_UNREVIEWED_1]: '待一级审核',
[MEMBER_INNER_STATUS_UNREVIEWED_2]: '待二级审核',
[MEMBER_INNER_STATUS_FAILED]: '审核不通过',
[MEMBER_INNER_STATUS_SUCCESS]: '审核通过',
};
// 会员外部状态
......@@ -130,8 +129,8 @@ export const MEMBER_OUTER_STATUS_UNREVIEWED = 1; // 待审核
export const MEMBER_OUTER_STATUS_FAILED = 2; // 审核不通过
export const MEMBER_OUTER_STATUS_SUCCESS = 3; // 审核通过
export const MEMBER_OUTER_STATUS = {
[MEMBER_OUTER_STATUS_UNCOMMITTED]: '待提交',
[MEMBER_OUTER_STATUS_UNREVIEWED]: '待审核',
[MEMBER_OUTER_STATUS_FAILED]: '审核不通过',
[MEMBER_OUTER_STATUS_SUCCESS]: '审核通过',
[MEMBER_OUTER_STATUS_UNCOMMITTED]: '待提交',
[MEMBER_OUTER_STATUS_UNREVIEWED]: '待审核',
[MEMBER_OUTER_STATUS_FAILED]: '审核不通过',
[MEMBER_OUTER_STATUS_SUCCESS]: '审核通过',
};
......@@ -151,7 +151,14 @@ const CategoryAttributes: React.FC<{}> = () => {
render: (text: any, record: any) => {
return (
<>
<Button type='link' onClick={() => clickRelief(record.id)}>解除关联</Button>
<Popconfirm
title="是否解除关联?"
onConfirm={()=>clickRelief(record.id)}
okText="是"
cancelText="否"
>
<Button type='link'>解除关联</Button>
</Popconfirm>
</>
)
}
......
import React, { useState, useEffect, useRef, ReactNode } from 'react'
import { history } from 'umi'
import { Button, Card, Select, Row, Col, Input } from 'antd'
import { Button, Card, Select, Row, Col, Input, InputNumber } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import {
CaretUpOutlined,
......@@ -222,6 +222,7 @@ const Products: React.FC<{}> = () => {
<Col span={12} style={{display:'flex', justifyContent: 'flex-start'}}>
<Col span={8}>
<Input.Search
autoComplete="off"
name="name"
placeholder="商品名称"
value={filterParams.name}
......@@ -244,7 +245,13 @@ const Products: React.FC<{}> = () => {
<Row gutter={[16, 8]} justify="end">
<Col span={24} style={{display:'flex', justifyContent: 'flex-start'}}>
<Col span={4}>
<Input name="memberName" value={filterParams.memberName} onChange={(e)=>setFilterParams({...filterParams, memberName: e.target.value})} placeholder="商家名称"></Input>
<Input
name="memberName"
value={filterParams.memberName}
onChange={(e)=>setFilterParams({...filterParams, memberName: e.target.value})}
placeholder="商家名称"
autoComplete="off"
/>
</Col>
<Col span={4}>
<Select
......@@ -282,13 +289,12 @@ const Products: React.FC<{}> = () => {
</Col>
<Col span={4}>
<Input.Group compact>
<Input
type="number"
<InputNumber
value={filterParams.Min}
style={{ width: '40%', textAlign: 'center' }}
min={0}
placeholder="最低价格"
onChange={(e)=>setFilterParams({...filterParams, Min: +e.target.value})}
onChange={(e)=>setFilterParams({...filterParams, Min: e})}
/>
<Input
style={{
......@@ -302,8 +308,7 @@ const Products: React.FC<{}> = () => {
placeholder="~"
disabled
/>
<Input
type="number"
<InputNumber
value={filterParams.Max}
style={{
width: '40%',
......@@ -312,7 +317,7 @@ const Products: React.FC<{}> = () => {
}}
min={0}
placeholder="最高价格"
onChange={(e)=>setFilterParams({...filterParams, Max: +e.target.value})}
onChange={(e)=>setFilterParams({...filterParams, Max: e})}
/>
</Input.Group>
</Col>
......
......@@ -106,8 +106,9 @@ const viewProducts: React.FC<{}> = () => {
const columns: ColumnType<any>[] = [
{
title: '序号',
dataIndex: 'memberRoleId',
key: 'memberRoleId',
dataIndex: 'id',
key: 'id',
render: (text: any, record: any, index: number) => index + 1
},
{
title: '角色',
......
import React, { useState, useEffect, useRef, ReactNode } from 'react'
// import { history } from 'umi'
import { Button, Card, Select, Row, Col, Input } from 'antd'
import { Button, Card, Select, Row, Col, Input, InputNumber } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import {
CaretUpOutlined,
......@@ -138,9 +138,9 @@ const Products: React.FC<{}> = () => {
else if (record.status === 2)
component = (<><span className="commonStatusModify"></span>待审核</>)
else if (record.status === 3)
component = (<><span className="commonStatusValid"></span>审核不通过</>)
component = (<><span className="commonStatusInvalid"></span>审核不通过</>)
else if (record.status === 4)
component = (<><span className="commonStatusInvalid"></span>审核通过</>)
component = (<><span className="commonStatusValid"></span>审核通过</>)
else if (record.status === 5)
component = (<span style={{ color: '#00B37A', padding: '2px 5px', background: 'rgba(235,247,242,1)', borderRadius: '4px' }}>已上架</span>)
else if (record.status === 6)
......@@ -224,6 +224,7 @@ const Products: React.FC<{}> = () => {
<Col span={12} style={{display:'flex', justifyContent: 'flex-start'}}>
<Col span={8}>
<Input.Search
autoComplete="off"
name="name"
placeholder="商品名称"
value={filterParams.name}
......@@ -246,7 +247,13 @@ const Products: React.FC<{}> = () => {
<Row gutter={[16, 8]} justify="end">
<Col span={24} style={{display:'flex', justifyContent: 'flex-start'}}>
<Col span={4}>
<Input name="memberName" value={filterParams.memberName} onChange={(e)=>setFilterParams({...filterParams, memberName: e.target.value})} placeholder="商家名称"></Input>
<Input
name="memberName"
value={filterParams.memberName}
onChange={(e)=>setFilterParams({...filterParams, memberName: e.target.value})}
placeholder="商家名称"
autoComplete="off"
/>
</Col>
<Col span={4}>
<Select
......@@ -294,13 +301,13 @@ const Products: React.FC<{}> = () => {
</Col>
<Col span={4}>
<Input.Group compact>
<Input
<InputNumber
type="number"
value={filterParams.Min}
style={{ width: '40%', textAlign: 'center' }}
min={0}
min={0}
placeholder="最低价格"
onChange={(e)=>setFilterParams({...filterParams, Min: +e.target.value})}
onChange={(e)=>setFilterParams({...filterParams, Min: e})}
/>
<Input
style={{
......@@ -314,8 +321,7 @@ const Products: React.FC<{}> = () => {
placeholder="~"
disabled
/>
<Input
type="number"
<InputNumber
value={filterParams.Max}
style={{
width: '40%',
......@@ -324,7 +330,7 @@ const Products: React.FC<{}> = () => {
}}
min={0}
placeholder="最高价格"
onChange={(e)=>setFilterParams({...filterParams, Max: +e.target.value})}
onChange={(e)=>setFilterParams({...filterParams, Max: e})}
/>
</Input.Group>
</Col>
......
......@@ -354,7 +354,7 @@ const viewProducts: React.FC<{}> = () => {
<p>商品卖点:</p>
</Col>
<Col span={20}>
<p>{productDetail?.sellingPoint.map(_item => <Tag key={_item}>{_item}</Tag>)}</p>
<p>{productDetail?.sellingPoint && productDetail?.sellingPoint.map(_item => <Tag key={_item}>{_item}</Tag>)}</p>
</Col>
</Row>
<Row>
......
......@@ -15,17 +15,17 @@ const TemplateItem: React.FC<TemplateItemPropsType> = (props) => {
const { templateInfo, type } = props
const Environment_Status = {
0: {
name: "所有"
},
1: {
name: "PC "
name: "web"
},
2: {
name: "H5 "
name: "H5"
},
3: {
name: "APP "
name: "小程序"
},
4: {
name: "APP"
}
}
......@@ -35,7 +35,7 @@ const TemplateItem: React.FC<TemplateItemPropsType> = (props) => {
<div className={styles.img_box_mask}>
<Link to={`/pageCustomized/template/detail?type=${type}&id=${templateInfo.id}`} className={styles.detail_btn}>查看详情</Link>
</div>
<div className={cx(styles.type_tag, templateInfo.environment === 2 ? styles.h5 : '')}>{Environment_Status[templateInfo.environment].name}</div>
<div className={cx(styles.type_tag, templateInfo.environment === 2 ? styles.h5 : '')}>{Environment_Status[templateInfo.environment]?.name}</div>
</div>
<div className={styles.template_info}>
<div className={styles.template_info_name}>
......
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