Commit 4a26098d authored by guang.wu's avatar guang.wu

fix: 修改最多选中条数

parent 9324cacf
...@@ -4,7 +4,7 @@ const project = pkgInfo.name; ...@@ -4,7 +4,7 @@ const project = pkgInfo.name;
module.exports = { module.exports = {
org: 'sentry', org: 'sentry',
project, project,
authToken: '3f1f6f3789594e3a81280c1cd8d4d1008037a7abad714698b60b6f358c3d7562', authToken: 'fae70cc211b940eb9420265fb6529adab88e49377cc5466797d27f0f8b400ce0',
url: 'http://newsentry.quantgroups.com', url: 'http://newsentry.quantgroups.com',
release: `${project}@1.0.0`, release: `${project}@1.0.0`,
ignore: ['node_modules', 'tests'], ignore: ['node_modules', 'tests'],
......
...@@ -5,8 +5,8 @@ export const dateStateEnum = { ...@@ -5,8 +5,8 @@ export const dateStateEnum = {
1: { text: '周结', maxlength: 8 }, 1: { text: '周结', maxlength: 8 },
2: { text: '半月结', maxlength: 4 }, 2: { text: '半月结', maxlength: 4 },
3: { text: '月结', maxlength: 2 }, 3: { text: '月结', maxlength: 2 },
4: { text: '日结', maxlength: 10 }, 4: { text: '日结', maxlength: 20 },
5: { text: '半日结', maxlength: 10 }, 5: { text: '半日结', maxlength: 20 },
}; };
export const orderStateNum = { export const orderStateNum = {
......
...@@ -36,17 +36,18 @@ const SettlementSheet = props => { ...@@ -36,17 +36,18 @@ const SettlementSheet = props => {
}; };
// 检查帐期类型的最多下载条数 // 检查帐期类型的最多下载条数
const checkedBillType = data => { const checkedBillType = data => {
console.log('data :>> ', data);
if (!data.length) { if (!data.length) {
notification.error({ message: '请选择数据' }); notification.error({ message: '请选择数据' });
return false; return false;
} }
const billPeriodType = data[0]?.billPeriodType; const billPeriodType = data[0]?.billPeriodType;
const billPeriodData = dateStateEnum[billPeriodType]; const billPeriodData = dateStateEnum[billPeriodType];
if (data.length <= billPeriodData.maxlength) { if (data.length <= billPeriodData?.maxlength) {
return true; return true;
} }
notification.error({ notification.error({
message: `${billPeriodData.text}帐期最多可选${billPeriodData.maxlength}条`, message: `${billPeriodData.text}帐期最多可选${billPeriodData?.maxlength || 0}`,
}); });
return false; return 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