Commit d6da235f authored by XieZhiXiong's avatar XieZhiXiong
parents 0fae3569 d88c37e4
...@@ -700,6 +700,11 @@ export default { ...@@ -700,6 +700,11 @@ export default {
'commodity.products.addProductsItem.priceAttributeForm.form.taxRate':'Tax Rate', 'commodity.products.addProductsItem.priceAttributeForm.form.taxRate':'Tax Rate',
'commodity.products.addProductsItem.priceAttributeForm.form.taxRate.message.1':'The tax rate must be filled in', 'commodity.products.addProductsItem.priceAttributeForm.form.taxRate.message.1':'The tax rate must be filled in',
'commodity.products.addProductsItem.priceAttributeForm.form.taxRate.message.2':'Tax rate is limited to two decimal places', 'commodity.products.addProductsItem.priceAttributeForm.form.taxRate.message.2':'Tax rate is limited to two decimal places',
'commodity.products.addProductsItem.priceAttributeForm.form.isFreeTax' : 'Whether the duty-free',
'commodity.products.addProductsItem.priceAttributeForm.form.isFreeTax.check' : 'Yes',
'commodity.products.addProductsItem.priceAttributeForm.form.freeTaxRate' : 'Commodity tax rate',
'commodity.products.addProductsItem.priceAttributeForm.form.freeTaxRate.message.1' : 'Tax rate must be filled out',
'commodity.products.addProductsItem.priceAttributeForm.form.freeTaxRate.message.2' : 'The tax rate is limited to two decimal places',
'commodity.products.addProductsItem.priceAttributeForm.form.button.1':'Set points in batch', 'commodity.products.addProductsItem.priceAttributeForm.form.button.1':'Set points in batch',
'commodity.products.addProductsItem.priceAttributeForm.form.button.2':'Set price in batch', 'commodity.products.addProductsItem.priceAttributeForm.form.button.2':'Set price in batch',
'commodity.products.addProductsItem.priceAttributeForm.table.rowKey':'Index', 'commodity.products.addProductsItem.priceAttributeForm.table.rowKey':'Index',
......
...@@ -701,6 +701,11 @@ export default { ...@@ -701,6 +701,11 @@ export default {
'commodity.products.addProductsItem.priceAttributeForm.form.taxRate' : '세율', 'commodity.products.addProductsItem.priceAttributeForm.form.taxRate' : '세율',
'commodity.products.addProductsItem.priceAttributeForm.form.taxRate.message.1' : '세율은 반드시 기입해야 한다', 'commodity.products.addProductsItem.priceAttributeForm.form.taxRate.message.1' : '세율은 반드시 기입해야 한다',
'commodity.products.addProductsItem.priceAttributeForm.form.taxRate.message.2' : '세율은 단지 두 자리 소수에 불과하다', 'commodity.products.addProductsItem.priceAttributeForm.form.taxRate.message.2' : '세율은 단지 두 자리 소수에 불과하다',
'commodity.products.addProductsItem.priceAttributeForm.form.isFreeTax' : '면세할 수 있는지',
'commodity.products.addProductsItem.priceAttributeForm.form.isFreeTax.check' : '이',
'commodity.products.addProductsItem.priceAttributeForm.form.freeTaxRate' : '상품 세금 비율',
'commodity.products.addProductsItem.priceAttributeForm.form.freeTaxRate.message.1' : '세금 비율을 반드시 기입해야 한다',
'commodity.products.addProductsItem.priceAttributeForm.form.freeTaxRate.message.2' : '세비 비율이 두 자릿수로 한정되다',
'commodity.products.addProductsItem.priceAttributeForm.form.button.1' : '대량 포인트 설정', 'commodity.products.addProductsItem.priceAttributeForm.form.button.1' : '대량 포인트 설정',
'commodity.products.addProductsItem.priceAttributeForm.form.button.2' : '대량 설정 가격', 'commodity.products.addProductsItem.priceAttributeForm.form.button.2' : '대량 설정 가격',
'commodity.products.addProductsItem.priceAttributeForm.table.rowKey' : '인덱스', 'commodity.products.addProductsItem.priceAttributeForm.table.rowKey' : '인덱스',
......
...@@ -701,6 +701,11 @@ export default { ...@@ -701,6 +701,11 @@ export default {
'commodity.products.addProductsItem.priceAttributeForm.form.taxRate' : '税率', 'commodity.products.addProductsItem.priceAttributeForm.form.taxRate' : '税率',
'commodity.products.addProductsItem.priceAttributeForm.form.taxRate.message.1' : '税率必须填写', 'commodity.products.addProductsItem.priceAttributeForm.form.taxRate.message.1' : '税率必须填写',
'commodity.products.addProductsItem.priceAttributeForm.form.taxRate.message.2' : '税率仅限两位小数', 'commodity.products.addProductsItem.priceAttributeForm.form.taxRate.message.2' : '税率仅限两位小数',
'commodity.products.addProductsItem.priceAttributeForm.form.isFreeTax' : '是否免税',
'commodity.products.addProductsItem.priceAttributeForm.form.isFreeTax.check' : '是',
'commodity.products.addProductsItem.priceAttributeForm.form.freeTaxRate' : '商品税费比率',
'commodity.products.addProductsItem.priceAttributeForm.form.freeTaxRate.message.1' : '税费比率必须填写',
'commodity.products.addProductsItem.priceAttributeForm.form.freeTaxRate.message.2' : '税费比率仅限两位小数',
'commodity.products.addProductsItem.priceAttributeForm.form.button.1' : '批量设置积分', 'commodity.products.addProductsItem.priceAttributeForm.form.button.1' : '批量设置积分',
'commodity.products.addProductsItem.priceAttributeForm.form.button.2' : '批量设置价格', 'commodity.products.addProductsItem.priceAttributeForm.form.button.2' : '批量设置价格',
'commodity.products.addProductsItem.priceAttributeForm.table.rowKey' : '索引', 'commodity.products.addProductsItem.priceAttributeForm.table.rowKey' : '索引',
......
...@@ -54,6 +54,7 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => { ...@@ -54,6 +54,7 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
const flagRef = useRef<boolean>(false) const flagRef = useRef<boolean>(false)
const [isChangePriceType, setIsChangePriceType] = useState<boolean>(false) // 价格类型是否有变动 const [isChangePriceType, setIsChangePriceType] = useState<boolean>(false) // 价格类型是否有变动
const [isTax, setIsTax] = useState<boolean>(true) // 是否含税 const [isTax, setIsTax] = useState<boolean>(true) // 是否含税
const [isFreeTax, setIsFreeTax] = useState<boolean>(true) // 是否免税
const [assistantUniquePrice, setAssistantUniquePrice] = useState<any>(0) // 副单价 const [assistantUniquePrice, setAssistantUniquePrice] = useState<any>(0) // 副单价
const [assistantUniqueLadderPrice, setAssistantUniqueLadderPrice] = useState<any[]>([]) // 副阶梯单价 const [assistantUniqueLadderPrice, setAssistantUniqueLadderPrice] = useState<any[]>([]) // 副阶梯单价
const [assistantUniquePriceRate, setAssistantUniquePriceRate] = useState<any>(0) // 副单价换算比率 const [assistantUniquePriceRate, setAssistantUniquePriceRate] = useState<any>(0) // 副单价换算比率
...@@ -632,6 +633,10 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => { ...@@ -632,6 +633,10 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
setIsTax(e.target.checked) setIsTax(e.target.checked)
} }
const onChangeFreeTax = (e) => {
setIsFreeTax(e.target.checked)
}
const formValueChange = (changeValue, values) => { const formValueChange = (changeValue, values) => {
if (values.ladderPrice) { if (values.ladderPrice) {
setAssistantUniqueLadderPrice(() => { setAssistantUniqueLadderPrice(() => {
...@@ -823,24 +828,54 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => { ...@@ -823,24 +828,54 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
</Form.Item> </Form.Item>
{ {
isTax ? isTax ?
<Form.Item <Form.Item
name="taxRate" name="taxRate"
label={intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.form.taxRate' })} label={intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.form.taxRate' })}
rules={[ rules={[
{ {
required: true, required: true,
message: intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.form.taxRate.message.1' }), message: intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.form.taxRate.message.1' }),
}, },
{ {
pattern: /^\d+(\.\d{1,2})?$/, pattern: /^\d+(\.\d{1,2})?$/,
message: intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.form.taxRate.message.2' }), message: intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.form.taxRate.message.2' }),
}, },
]} ]}
> >
<Input suffix="%" /> <Input suffix="%" />
</Form.Item> </Form.Item>
: null :
null
} }
{/* <Form.Item
name="isFreeTax"
label={intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.form.isTax' })}
valuePropName="checked"
initialValue={true}
>
<Checkbox onChange={onChangeFreeTax}>{intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.form.isTax.check' })}</Checkbox>
</Form.Item>
{
isFreeTax ?
<Form.Item
name="freeTaxRate"
label={intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.form.freeTaxRate' })}
rules={[
{
required: true,
message: intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.form.freeTaxRate.message.1' }),
},
{
pattern: /^\d+(\.\d{1,2})?$/,
message: intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.form.freeTaxRate.message.2' }),
},
]}
>
<Input suffix="%" />
</Form.Item>
:
null
} */}
</Form> </Form>
{/* 批量设置按钮 */} {/* 批量设置按钮 */}
{ {
......
...@@ -167,8 +167,9 @@ export const RelevanceGoodDrawer: React.FC<RelevanceGoodDrawerProps> = ({ ...@@ -167,8 +167,9 @@ export const RelevanceGoodDrawer: React.FC<RelevanceGoodDrawerProps> = ({
await schemaAction.setFieldValue('categoryId', selectRow[0]['customerCategory']['fullId'].split('.').map(item => Number(item).toString())) await schemaAction.setFieldValue('categoryId', selectRow[0]['customerCategory']['fullId'].split('.').map(item => Number(item).toString()))
await schemaAction.setFieldValue('unitId', selectRow[0]['unitId']) await schemaAction.setFieldValue('unitId', selectRow[0]['unitId'])
await schemaAction.setFieldValue('unitName', selectRow[0]['unitName']) await schemaAction.setFieldValue('unitName', selectRow[0]['unitName'])
await schemaAction.setFieldValue('has', true)
await schemaAction.setFieldValue('id', selectRow[0]['id'])
}, 300); }, 300);
await schemaAction.setFieldValue('has', true)
setSelectRow([]) setSelectRow([])
setSelectedRowKeys([]) setSelectedRowKeys([])
} }
......
...@@ -151,6 +151,11 @@ export const goodFormSchema: ISchema = { ...@@ -151,6 +151,11 @@ export const goodFormSchema: ISchema = {
title: intl.formatMessage({ id: 'table.purchase.shifouhuopinlie' }), title: intl.formatMessage({ id: 'table.purchase.shifouhuopinlie' }),
visible: false, visible: false,
}, },
id: {
type: 'string',
title: '主键id',
visible: false,
},
} }
} }
} }
......
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