|
@@ -496,17 +496,17 @@ export default {
|
|
|
for (let i = 0; i < list.length; i++) {
|
|
for (let i = 0; i < list.length; i++) {
|
|
|
list[i].yanZhengLeiXing = list[i].yanZhengLeiXing
|
|
list[i].yanZhengLeiXing = list[i].yanZhengLeiXing
|
|
|
? list[i].yanZhengLeiXing
|
|
? list[i].yanZhengLeiXing
|
|
|
- .replace(/' '/g, '')
|
|
|
|
|
- .replace(/\(/g, '(')
|
|
|
|
|
- .replace(/\)/g, ')')
|
|
|
|
|
|
|
+ .replaceAll(' ', '')
|
|
|
|
|
+ .replaceAll('(', '(')
|
|
|
|
|
+ .replaceAll(')', ')')
|
|
|
: ''
|
|
: ''
|
|
|
list[i].canYuRenYuan = list[i].canYuRenYuan
|
|
list[i].canYuRenYuan = list[i].canYuRenYuan
|
|
|
- ? list[i].canYuRenYuan.replace(/' '/g, '').replace(/,/g, ',')
|
|
|
|
|
|
|
+ ? list[i].canYuRenYuan.replaceAll(' ', '').replaceAll(',', ',')
|
|
|
: ''
|
|
: ''
|
|
|
- if (list[i].tiGongZhe == '/') {
|
|
|
|
|
|
|
+ if (list[i].tiGongZhe?.trim() == '/') {
|
|
|
list[i].tiGongZhe = ''
|
|
list[i].tiGongZhe = ''
|
|
|
}
|
|
}
|
|
|
- if (list[i].biDuiFang == '/') {
|
|
|
|
|
|
|
+ if (list[i].biDuiFang?.trim() == '/') {
|
|
|
list[i].biDuiFang = ''
|
|
list[i].biDuiFang = ''
|
|
|
}
|
|
}
|
|
|
const item = list[i]
|
|
const item = list[i]
|
|
@@ -518,26 +518,40 @@ export default {
|
|
|
},
|
|
},
|
|
|
// 导入验证
|
|
// 导入验证
|
|
|
validateItem(item, index) {
|
|
validateItem(item, index) {
|
|
|
- // console.log(item);
|
|
|
|
|
|
|
+ console.log(item)
|
|
|
|
|
|
|
|
const { userList = [] } = this.$store.getters || {}
|
|
const { userList = [] } = this.$store.getters || {}
|
|
|
if (
|
|
if (
|
|
|
- item.yanZhengLeiXing &&
|
|
|
|
|
- !['能力验证(PT)', '室间质评(EQA)', '室间比对'].includes(
|
|
|
|
|
- item.yanZhengLeiXing
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ !item.yanZhengLeiXing ||
|
|
|
|
|
+ (item.yanZhengLeiXing &&
|
|
|
|
|
+ !['能力验证(PT)', '室间质评(EQA)', '室间比对'].includes(
|
|
|
|
|
+ item.yanZhengLeiXing
|
|
|
|
|
+ ))
|
|
|
|
|
+ ) {
|
|
|
|
|
+ this.$message.warning(`第${index + 2}行验证类型为空或不存在!`)
|
|
|
|
|
+
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
|
|
+ if (!item.huoDongMing) {
|
|
|
|
|
+ this.$message.warning(`第${index + 2}行活动名称不能为空!`)
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
|
|
+ if (
|
|
|
|
|
+ (item.tiGongZhe && item.biDuiFang) ||
|
|
|
|
|
+ (!item.tiGongZhe && !item.biDuiFang)
|
|
|
) {
|
|
) {
|
|
|
this.$message.warning(
|
|
this.$message.warning(
|
|
|
- `第${index + 1}行验证类型不存在,请按照规则填写!`
|
|
|
|
|
|
|
+ `第${
|
|
|
|
|
+ index + 2
|
|
|
|
|
+ }行能力验证提供者和室间质评组织方或室间比对方不能为空且只能填写其中一个!`
|
|
|
)
|
|
)
|
|
|
-
|
|
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
|
if (
|
|
if (
|
|
|
item.canYuRenYuan &&
|
|
item.canYuRenYuan &&
|
|
|
!this.checkName(item, userList, 'canYuRenYuan')
|
|
!this.checkName(item, userList, 'canYuRenYuan')
|
|
|
) {
|
|
) {
|
|
|
- this.$message.warning(`第${index + 1}行参加人员不存在`)
|
|
|
|
|
|
|
+ this.$message.warning(`第${index + 2}行参加人员不存在!`)
|
|
|
|
|
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|