Commit 2c8cd070 authored by 前端-彭佳文's avatar 前端-彭佳文

Merge branch 'v2-220418' into 'v2-220418'

V2 220418 See merge request linkseeks-design/pro-platform!149
parents e2316c0e 5791af8e
......@@ -84,12 +84,8 @@ const PriceLibrary: React.FC<{}> = () => {
id: 'priceManage.priceStrategy.columns.currency',
})}
defaultValue={text}
onPressEnter={(e: any) =>
updatePrice({
goodsPriceId: record.id,
marketPrice: e.target.value,
})
}
onBlur={(e: any) => updatePrice(record, e)}
onPressEnter={(e: any) => updatePrice(record, e)}
/>
);
},
......@@ -174,7 +170,15 @@ const PriceLibrary: React.FC<{}> = () => {
`${history.location.pathname}/detail?goodsPriceId=${record.id}`,
);
};
const updatePrice = params => {
const updatePrice = (record, e) => {
const val = e.target.value;
if (!val || val === record.marketPrice) {
return;
}
const params = {
goodsPriceId: record.id,
marketPrice: val,
};
getProductPriceManagementAddGoodsPrice(params).then(res => {
if (res.code === 1000) {
message.success(res.message);
......
import React, { useState, useRef, useEffect } from 'react';
import { getIntl, history } from 'umi';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Button, Card, Dropdown, Menu, Space, Badge, Popconfirm } from 'antd';
import { Button, Card, Dropdown, Menu, Space, Badge, Popconfirm, message } from 'antd';
import {
PlusOutlined,
DownOutlined,
......@@ -98,9 +98,16 @@ const Bills: React.FC<{}> = () => {
postProductInvoicesBatchReview({
ids,
reviewType,
}, {
ctlType: 'none',
})
.then(res => {
if (res.code !== 1000) {
if(res.code === 9999) {
message.info(res.message)
} else {
message.info(intl.formatMessage({ id: `${res.code}`, defaultMessage: res.message}))
}
return;
}
if (callback) {
......
......@@ -47,8 +47,8 @@ export const billsTypeDetailSchema: ISchema = {
'x-component-props': {
placeholder: intl.formatMessage({ id: 'stockSellStorage.zuichang20gezifu10ge' }),
},
required: true,
'x-rules': [
{ required: true },
{
limitByte: true, // 自定义校验规则
maxByte: 20,
......
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