Commit 1f4e972c authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix: 处理商品渠道商品价格校验提示错误问题,隐藏设置价格弹框数值输入框加减按钮,渠道商品新增物流+自提模式

parent 15e232ca
......@@ -324,6 +324,19 @@
display: none;
}
// 去除inputNumber的箭头(弹框)
.ant-input-number-handler-wrap {
display: none;
}
.ant-input-number {
&:hover {
.ant-input-number-handler-wrap {
display: none;
opacity: 0;
}
}
}
/* 处理某些电脑显示与缩放比推荐>100%的影响 */
@media all
......
......@@ -330,6 +330,7 @@ export default {
'commodity.products.modifyDirectChannel.tab.3.form.deliveryType.option.1':'Logistics (default)',
'commodity.products.modifyDirectChannel.tab.3.form.deliveryType.option.2':'Self mention',
'commodity.products.modifyDirectChannel.tab.3.form.deliveryType.option.3':'No delivery required',
'commodity.products.modifyDirectChannel.tab.3.form.deliveryType.option.4' : 'Logistics+self-delivery',
'commodity.products.modifyDirectChannel.tab.3.form.carriageType':'Shipping Method',
'commodity.products.modifyDirectChannel.tab.3.form.carriageType.message':'Please choose the shipping method',
'commodity.products.modifyDirectChannel.tab.3.form.carriageType.option.1':'The seller bears the freight (default)',
......@@ -531,6 +532,7 @@ export default {
'commodity.products.addChannelItem.setLogistics.form.deliveryType.option.1':'Logistics (default)',
'commodity.products.addChannelItem.setLogistics.form.deliveryType.option.2':'Self mention',
'commodity.products.addChannelItem.setLogistics.form.deliveryType.option.3':'No delivery required',
'commodity.products.addChannelItem.setLogistics.form.deliveryType.option.4' : 'Logistics+self-delivery',
'commodity.products.addChannelItem.setLogistics.form.carriageType':'Shipping Method',
'commodity.products.addChannelItem.setLogistics.form.carriageType.message':'Please choose the shipping method',
'commodity.products.addChannelItem.setLogistics.form.carriageType.option.1':'The seller bears the freight (default)',
......
......@@ -331,6 +331,7 @@ export default {
'commodity.products.modifyDirectChannel.tab.3.form.deliveryType.option.1' : '물류(기본값)',
'commodity.products.modifyDirectChannel.tab.3.form.deliveryType.option.2' : '스스로 제기하다',
'commodity.products.modifyDirectChannel.tab.3.form.deliveryType.option.3' : '배송 필요 없음',
'commodity.products.modifyDirectChannel.tab.3.form.deliveryType.option.4' : '물류+셀프 인수',
'commodity.products.modifyDirectChannel.tab.3.form.carriageType' : '운임 방식',
'commodity.products.modifyDirectChannel.tab.3.form.carriageType.message' : '배송 방법 선택',
'commodity.products.modifyDirectChannel.tab.3.form.carriageType.option.1' : '판매자 부담 배송(기본값)',
......@@ -532,6 +533,7 @@ export default {
'commodity.products.addChannelItem.setLogistics.form.deliveryType.option.1' : '물류(기본값)',
'commodity.products.addChannelItem.setLogistics.form.deliveryType.option.2' : '스스로 제기하다',
'commodity.products.addChannelItem.setLogistics.form.deliveryType.option.3' : '배송 필요 없음',
'commodity.products.addChannelItem.setLogistics.form.deliveryType.option.4' : '물류+셀프 인수',
'commodity.products.addChannelItem.setLogistics.form.carriageType' : '운임 방식',
'commodity.products.addChannelItem.setLogistics.form.carriageType.message' : '배송 방법 선택',
'commodity.products.addChannelItem.setLogistics.form.carriageType.option.1' : '판매자 부담 배송(기본값)',
......
......@@ -331,6 +331,7 @@ export default {
'commodity.products.modifyDirectChannel.tab.3.form.deliveryType.option.1' : '物流(默认)',
'commodity.products.modifyDirectChannel.tab.3.form.deliveryType.option.2' : '自提',
'commodity.products.modifyDirectChannel.tab.3.form.deliveryType.option.3' : '无需配送',
'commodity.products.modifyDirectChannel.tab.3.form.deliveryType.option.4' : '物流+自提',
'commodity.products.modifyDirectChannel.tab.3.form.carriageType' : '运费方式',
'commodity.products.modifyDirectChannel.tab.3.form.carriageType.message' : '请选择运费方式',
'commodity.products.modifyDirectChannel.tab.3.form.carriageType.option.1' : '卖家承担运费(默认)',
......@@ -532,6 +533,7 @@ export default {
'commodity.products.addChannelItem.setLogistics.form.deliveryType.option.1' : '物流(默认)',
'commodity.products.addChannelItem.setLogistics.form.deliveryType.option.2' : '自提',
'commodity.products.addChannelItem.setLogistics.form.deliveryType.option.3' : '无需配送',
'commodity.products.addChannelItem.setLogistics.form.deliveryType.option.4' : '物流+自提',
'commodity.products.addChannelItem.setLogistics.form.carriageType' : '运费方式',
'commodity.products.addChannelItem.setLogistics.form.carriageType.message' : '请选择运费方式',
'commodity.products.addChannelItem.setLogistics.form.carriageType.option.1' : '卖家承担运费(默认)',
......
......@@ -116,10 +116,11 @@ const SetLogistics: React.FC<Iprops> = (props) => {
<Radio value={1}>{intl.formatMessage({ id: 'commodity.products.addChannelItem.setLogistics.form.deliveryType.option.1' })}</Radio>
<Radio value={2}>{intl.formatMessage({ id: 'commodity.products.addChannelItem.setLogistics.form.deliveryType.option.2' })}</Radio>
<Radio value={3}>{intl.formatMessage({ id: 'commodity.products.addChannelItem.setLogistics.form.deliveryType.option.3' })}</Radio>
<Radio value={4}>{intl.formatMessage({ id: 'commodity.products.addChannelItem.setLogistics.form.deliveryType.option.4' })}</Radio>
</Radio.Group>
</Form.Item>
{
deliveryType === 1 && <><Form.Item
(deliveryType === 1 || deliveryType === 4) && <><Form.Item
name="carriageType"
label={intl.formatMessage({ id: 'commodity.products.addChannelItem.setLogistics.form.carriageType' })}
rules={[
......@@ -203,7 +204,7 @@ const SetLogistics: React.FC<Iprops> = (props) => {
</Form.Item>
}
{
deliveryType === 1 && <Form.Item
(deliveryType === 1 || deliveryType === 4) && <Form.Item
name="company"
label={intl.formatMessage({ id: 'commodity.products.addChannelItem.setLogistics.form.company' })}
>
......
......@@ -388,6 +388,7 @@ const SetPrice: React.FC<IProps> = (props) => {
{...layoutSetPrice}
name="settingPrice"
form={setPriceForm}
autoComplete="off"
initialValues={{ ladderPrice: false }}
>
{
......@@ -472,13 +473,13 @@ const SetPrice: React.FC<IProps> = (props) => {
rules={[
{ required: true, message: intl.formatMessage({ id: 'commodity.products.addChannelItem.setPrice.modal.1.numberPrice.message.1' }) },
{
pattern: /^\d+(\.\d{1,4})?$/,
pattern: /^([0](\.\d{1,4}))$|^([1-9][0-9]*(\.\d{1,4})?)$|^[0]$/,
message: intl.formatMessage({ id: 'commodity.products.addChannelItem.setPrice.modal.1.numberPrice.message.2' }),
}
]}
style={{ marginLeft: 20 }}
>
<Input placeholder={intl.formatMessage({ id: 'commodity.products.addChannelItem.setPrice.modal.1.numberPrice.placeholder' })} />
<InputNumber min={0} placeholder={intl.formatMessage({ id: 'commodity.products.addChannelItem.setPrice.modal.1.numberPrice.placeholder' })} />
</Form.Item>
</Col>
<Col span={4}>
......@@ -501,7 +502,7 @@ const SetPrice: React.FC<IProps> = (props) => {
message: priceType === 3 ? intl.formatMessage({ id: 'commodity.products.addChannelItem.setPrice.modal.1.uniquePrice.message.1' }) : intl.formatMessage({ id: 'commodity.products.addChannelItem.setPrice.modal.1.uniquePrice.message.2' })
},
{
pattern: priceType !== 3 ? /^\d+(\.\d{1,4})?$/ : /^[1-9]\d*$/,
pattern: priceType !== 3 ? /^([0](\.\d{1,4}))$|^([1-9][0-9]*(\.\d{1,4})?)$|^[0]$/ : /^[1-9]\d*$/,
message: priceType !== 3 ? intl.formatMessage({ id: 'commodity.products.addChannelItem.setPrice.modal.1.uniquePrice.message.3' }) : intl.formatMessage({ id: 'commodity.products.addChannelItem.setPrice.modal.1.uniquePrice.message.4' }),
}
]}
......
......@@ -1057,13 +1057,13 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
rules={[
{ required: true, message: intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.modal.form.numberPrice.message.1' }) },
{
pattern: /^([0](\.\d{1,4}))$|^([1-9][0-9]*(\.\d{1,4})?)$/,
pattern: /^([0](\.\d{1,4}))$|^([1-9][0-9]*(\.\d{1,4})?)$|^[0]$/,
message: intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.modal.form.numberPrice.message.2' }),
}
]}
style={{ marginLeft: 20 }}
>
<Input placeholder={intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.modal.form.numberPrice.placeholder' })} />
<InputNumber min={0} placeholder={intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.modal.form.numberPrice.placeholder' })} />
</Form.Item>
</Col>
<Col span={4}>
......@@ -1113,7 +1113,7 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
message: planPrice === 3 ? intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.modal.form.uniquePrice.message.1' }) : intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.modal.form.uniquePrice.message.2' })
},
{
pattern: planPrice !== 3 ? /^([0](\.\d{1,4}))$|^([1-9][0-9]*(\.\d{1,4})?)$/ : /^[1-9]\d*$/,
pattern: planPrice !== 3 ? /^([0](\.\d{1,4}))$|^([1-9][0-9]*(\.\d{1,4})?)$|^[0]$/ : /^[1-9]\d*$/,
message: planPrice !== 3 ? intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.modal.form.uniquePrice.message.3' }) : intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.modal.form.uniquePrice.message.4' }),
}
]}
......
import React, { useState, useRef } from 'react'
import { useIntl } from 'umi';
import { Button, Form, Card, Modal, Checkbox, Row, Col, Input, Badge, } from 'antd'
import { Button, Form, Card, Modal, Checkbox, Row, Col, Input, Badge, InputNumber, } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import {
PlusOutlined,
......@@ -316,13 +316,13 @@ const FastModifyPrice: React.FC<{}> = () => {
rules={[
{ required: true, message: intl.formatMessage({ id: 'commodity.products.fastModifyPrice.form.numberPrice.message.1' }) },
{
pattern: /^\d+(\.\d{1,4})?$/,
pattern: /^([0](\.\d{1,4}))$|^([1-9][0-9]*(\.\d{1,4})?)$|^[0]$/,
message: intl.formatMessage({ id: 'commodity.products.fastModifyPrice.form.numberPrice.message.2' }),
}
]}
style={{ marginLeft: 20 }}
>
<Input placeholder={intl.formatMessage({ id: 'commodity.products.fastModifyPrice.form.numberPrice.placeholder' })} />
<InputNumber min={0} placeholder={intl.formatMessage({ id: 'commodity.products.fastModifyPrice.form.numberPrice.placeholder' })} />
</Form.Item>
</Col>
<Col span={4}>
......@@ -344,12 +344,12 @@ const FastModifyPrice: React.FC<{}> = () => {
message: priceType === 3 ? intl.formatMessage({ id: 'commodity.products.fastModifyPrice.form.uniquePrice.message.1' }) : intl.formatMessage({ id: 'commodity.products.fastModifyPrice.form.uniquePrice.message.2' })
},
{
pattern: priceType !== 3 ? /^\d+(\.\d{1,4})?$/ : /^[1-9]\d*$/,
pattern: priceType !== 3 ? /^([0](\.\d{1,4}))$|^([1-9][0-9]*(\.\d{1,4})?)$|^[0]$/ : /^[1-9]\d*$/,
message: priceType !== 3 ? intl.formatMessage({ id: 'commodity.products.fastModifyPrice.form.uniquePrice.message.3' }) : intl.formatMessage({ id: 'commodity.products.fastModifyPrice.form.uniquePrice.message.4' }),
}
]}
>
<Input placeholder={priceType === 3 ? intl.formatMessage({ id: 'commodity.products.fastModifyPrice.form.uniquePrice.placeholder.1' }) : intl.formatMessage({ id: 'commodity.products.fastModifyPrice.form.uniquePrice.placeholder.2' })} />
<InputNumber min={0} style={{ width: '100%' }} placeholder={priceType === 3 ? intl.formatMessage({ id: 'commodity.products.fastModifyPrice.form.uniquePrice.placeholder.1' }) : intl.formatMessage({ id: 'commodity.products.fastModifyPrice.form.uniquePrice.placeholder.2' })} />
</Form.Item>
}
</Form>
......
......@@ -547,10 +547,11 @@ const ModifyDirectChannel: React.FC<{}> = () => {
<Radio value={1}>{intl.formatMessage({ id: 'commodity.products.modifyDirectChannel.tab.3.form.deliveryType.option.1' })}</Radio>
<Radio value={2}>{intl.formatMessage({ id: 'commodity.products.modifyDirectChannel.tab.3.form.deliveryType.option.2' })}</Radio>
<Radio value={3}>{intl.formatMessage({ id: 'commodity.products.modifyDirectChannel.tab.3.form.deliveryType.option.3' })}</Radio>
<Radio value={4}>{intl.formatMessage({ id: 'commodity.products.modifyDirectChannel.tab.3.form.deliveryType.option.4' })}</Radio>
</Radio.Group>
</Form.Item>
{
deliveryType === 1 && <><Form.Item
(deliveryType === 1 || deliveryType === 4)&& <><Form.Item
name="carriageType"
label={intl.formatMessage({ id: 'commodity.products.modifyDirectChannel.tab.3.form.carriageType' })}
rules={[
......@@ -624,7 +625,7 @@ const ModifyDirectChannel: React.FC<{}> = () => {
label={intl.formatMessage({ id: 'commodity.products.modifyDirectChannel.tab.3.form.sendAddress' })}
>
<Select
placeholder={intl.formatMessage({ id: 'commodity.products.modifyDirectChannel.tab.3.form.placeholder' })}
placeholder={intl.formatMessage({ id: 'commodity.products.modifyDirectChannel.tab.3.form.sendAddress.placeholder' })}
allowClear
>
{
......@@ -634,12 +635,12 @@ const ModifyDirectChannel: React.FC<{}> = () => {
</Form.Item>
}
{
deliveryType === 1 && <Form.Item
(deliveryType === 1 || deliveryType === 4) && <Form.Item
name="company"
label={intl.formatMessage({ id: 'commodity.products.modifyDirectChannel.tab.3.form.company' })}
>
<Select
placeholder={intl.formatMessage({ id: 'commodity.products.modifyDirectChannel.tab.3.form.placeholder' })}
placeholder={intl.formatMessage({ id: 'commodity.products.modifyDirectChannel.tab.3.form.company.placeholder' })}
allowClear
>
{
......@@ -665,6 +666,7 @@ const ModifyDirectChannel: React.FC<{}> = () => {
{...layoutSetPrice}
name="settingPrice"
form={setPriceForm}
autoComplete="off"
initialValues={{ ladderPrice: false }}
>
{
......@@ -754,13 +756,13 @@ const ModifyDirectChannel: React.FC<{}> = () => {
message: intl.formatMessage({ id: 'commodity.products.modifyDirectChannel.modal.form.numberPrice.message.1' })
},
{
pattern: /^\d+(\.\d{1,4})?$/,
pattern: /^([0](\.\d{1,4}))$|^([1-9][0-9]*(\.\d{1,4})?)$|^[0]$/,
message: intl.formatMessage({ id: 'commodity.products.modifyDirectChannel.modal.form.numberPrice.message.2' }),
}
]}
style={{ marginLeft: 20 }}
>
<Input placeholder={intl.formatMessage({ id: 'commodity.products.modifyDirectChannel.modal.form.numberPrice.placeholder' })} />
<InputNumber min={0} placeholder={intl.formatMessage({ id: 'commodity.products.modifyDirectChannel.modal.form.numberPrice.placeholder' })} />
</Item>
</Col>
<Col span={4}>
......@@ -783,7 +785,7 @@ const ModifyDirectChannel: React.FC<{}> = () => {
message: priceTypeRef.current === 3 ? intl.formatMessage({ id: 'commodity.products.modifyDirectChannel.modal.form.uniquePrice.message.1' }) : intl.formatMessage({ id: 'commodity.products.modifyDirectChannel.modal.form.uniquePrice.message.2' })
},
{
pattern: priceTypeRef.current !== 3 ? /^\d+(\.\d{1,4})?$/ : /^[1-9]\d*$/,
pattern: priceTypeRef.current !== 3 ? /^([0](\.\d{1,4}))$|^([1-9][0-9]*(\.\d{1,4})?)$|^[0]$/ : /^[1-9]\d*$/,
message: priceTypeRef.current !== 3 ? intl.formatMessage({ id: 'commodity.products.modifyDirectChannel.modal.form.uniquePrice.message.3' }) : intl.formatMessage({ id: 'commodity.products.modifyDirectChannel.modal.form.uniquePrice.message.4' }),
}
]}
......
......@@ -153,6 +153,7 @@ const PriceModal: React.FC<PriceModalProps> = (props) => {
{...layoutSetPrice}
name="settingPrice"
form={setPriceForm}
autoComplete="off"
initialValues={{ ladderPrice: false }}
>
<Form.Item
......@@ -234,13 +235,13 @@ const PriceModal: React.FC<PriceModalProps> = (props) => {
rules={[
{ required: true, message: intl.formatMessage({ id: 'priceManage.priceStrategy.priceModal.numberPrice.rule.1' }) },
{
pattern: /^\d+(\.\d{1,4})?$/,
pattern: /^([0](\.\d{1,4}))$|^([1-9][0-9]*(\.\d{1,4})?)$|^[0]$/,
message: intl.formatMessage({ id: 'priceManage.priceStrategy.priceModal.numberPrice.rule.2' }),
}
]}
style={{ marginLeft: 20 }}
>
<Input placeholder={intl.formatMessage({ id: 'priceManage.priceStrategy.priceModal.numberPrice' })} />
<InputNumber min={0} placeholder={intl.formatMessage({ id: 'priceManage.priceStrategy.priceModal.numberPrice' })} />
</Form.Item>
</Col>
<Col span={4}>
......@@ -263,7 +264,7 @@ const PriceModal: React.FC<PriceModalProps> = (props) => {
message: intl.formatMessage({ id: 'priceManage.priceStrategy.priceModal.uniquePrice.rule.1' })
},
{
pattern: /^\d+(\.\d{1,4})?$/,
pattern: /^([0](\.\d{1,4}))$|^([1-9][0-9]*(\.\d{1,4})?)$|^[0]$/,
message: intl.formatMessage({ id: 'priceManage.priceStrategy.priceModal.uniquePrice.rule.2' }),
}
]}
......
......@@ -3,7 +3,6 @@ import { Table, Form, Input, Row, Col } from 'antd'
import { OrderDetailContext } from '../../_public/order/context'
import { EditOutlined } from '@ant-design/icons'
import styled from 'styled-components'
import { createFormActions } from '@formily/antd'
import MellowCard from '@/components/MellowCard'
import { OrderKindType } from '@/constants/order'
import { AddressPop } from '../addressPop'
......
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