取消sd必填

This commit is contained in:
lai
2024-03-27 10:08:08 +08:00
parent c2e95f607b
commit 151175fb3f

View File

@@ -503,7 +503,6 @@ function transformData(data: any) {
let transformedData = data.map((item: any) => {
if (
!item.sst ||
!item.sd ||
!item.smallRows.every((smallRow: any) => smallRow.dnn)
) {
message.error({
@@ -513,7 +512,7 @@ function transformData(data: any) {
throw new Error('sst, sd, and all dnn are required fields');
}
let sstSd = item.sst + '-' + item.sd;
let sstSd = item.sd?item.sst + '-' + item.sd:item.sst;
let smallRowData = item.smallRows
.map((smallRow: any) => {
let parts = [smallRow.dnn];
@@ -545,7 +544,7 @@ function transformFormData(data: any) {
let json: any = {
id: bigIDFlag++,
sst: item.split('&')[0].split('-')[0],
sd: item.split('&')[0].split('-')[1],
sd: item.split('&')[0].split('-')[1]?item.split('&')[0].split('-')[1]:'',
smallRows: [],
};
item