Commit 351d189e authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix:

parent 18820e0a
......@@ -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}
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>
......
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